# If you use any content of this package, please cite the following paper:

@article{marx:18:climb,
  title={Causal Discovery by Telling Apart Parents and Children},
  author={Marx, Alexander and Vreeken, Jilles},
  journal={arXiv preprint arXiv:1808.06356},
  year={2018}
}

# Installation & execution
Stay in the current folder and run the following command to compile the Rcpp code for the calculation of the Stochastic Complexity and SCI--here called SCIh.

# 
R CMD build StochasticComplexity
R CMD INSTALL StochasticComplexity_1.0.tar.gz
(optional)
rm -f StochasticComplexity_1.0.tar.gz

These methods can be used afterwards by using the command "library("StochasticComplexity")" in the R console and includes the functions
stochasticComplexity(x)
and
conditionalStochasticComplexity(x,y)
see documentation.

# Execution of Climb
The Climb algorithm can be executed in R by entering the R console and typing
source("causal_mb.R")

The method Climb takes the inputs:
  * t: the column index of the target in the data set D
  * D: the data set consisting of categorical (integer pos valued) data--data.frame
  * [optional] SCI.variant: could be used for different independence test, but may need rewrite i.e. calculating suffStat for G^2 (default is SCI)
  * [optional] pc.variant: algorithm to find the PC--few are implemented in file "pc_algorithm.R"

# Execution of tests
The synthetic data generator can be found in "data_generator.R", and test that have been shown in the paper are implemented in the "test___.R" files.



