initialize,D2C-method | R Documentation |
creation of a D2C object which preprocesses the list of DAGs and observations contained in sDAG and fits a Random Forest classifier
## S4 method for signature 'D2C'
initialize(.Object, sDAG, descr = new("D2C.descriptor"),
verbose = TRUE, ratioMissingNode = 0, ratioEdges = 1,
max.features = 20, goParallel = FALSE, type = "is.parent")
.Object |
: the D2C object |
sDAG |
: simulateDAG object |
descr |
: D2C.descriptor object containing the parameters of the descriptor |
verbose |
: if TRUE it prints the state of progress |
ratioMissingNode |
: percentage of existing nodes which are not considered. This is used to emulate latent variables. |
ratioEdges |
: percentage of existing edges which are added to the training set |
max.features |
: maximum number of features used by the Random Forest classifier randomForest. The features are selected by the importance returned by the function importance. |
goParallel |
: if TRUE it uses parallelism |
type |
: type of predicted dependency. It takes values in { |
Gianluca Bontempi, Maxime Flauder (2015) From dependency to causality: a machine learning approach. JMLR, 2015, http://jmlr.org/papers/v16/bontempi15a.html
require(RBGL)
require(gRbase)
require(foreach)
descr=new("D2C.descriptor")
descr.example<-new("D2C.descriptor",bivariate=FALSE,ns=3,acc=TRUE)
trainDAG<-new("simulatedDAG",NDAG=2, N=50,noNodes=10,
functionType = "linear", seed=0,sdn=0.5)
example<-new("D2C",sDAG=trainDAG, descr=descr.example)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.