initialize-D2C-method: creation of a D2C object which preprocesses the list of DAGs...

initialize,D2C-methodR Documentation

creation of a D2C object which preprocesses the list of DAGs and observations contained in sDAG and fits a Random Forest classifier

Description

creation of a D2C object which preprocesses the list of DAGs and observations contained in sDAG and fits a Random Forest classifier

Usage

## 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")

Arguments

.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 { is.parent, is.child, is.ancestor, is.descendant, is.mb }

References

Gianluca Bontempi, Maxime Flauder (2015) From dependency to causality: a machine learning approach. JMLR, 2015, http://jmlr.org/papers/v16/bontempi15a.html

Examples

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)

gbonte/D2C documentation built on Sept. 8, 2023, 11:22 p.m.