Learn R Programming

D2C (version 1.2.1)

initialize,simulatedDAG-method: creation of a "simulatedDAG" containing a list of DAGs and associated observations

Description

creation of a "simulatedDAG" containing a list of DAGs and associated observations

Usage

"initialize"(.Object, NDAG = 1, noNodes = sample(10:20, size = 1), functionType = "linear", quantize = FALSE, verbose = TRUE, N = sample(100:500, size = 1), seed = 1234, sdn = 0.5, goParallel = FALSE)

Arguments

.Object
: simulatedDAG object
NDAG
: number of DAGs to be created and simulated
noNodes
: number of Nodes of the DAGs. If it is a two-valued vector , the value of Nodes is randomly sampled in the interval
functionType
: type of the dependency. It is of class "character" and is one of ("linear", "quadratic","sigmoid")
quantize
: if TRUE it discretize the observations into two bins. If it is a two-valued vector [a,b], the value of quantize is randomly sampled in the interval [a,b]
verbose
: if TRUE it prints out the state of progress
N
: number of sampled observations for each DAG. If it is a two-valued vector [a,b], the value of N is randomly sampled in the interval [a,b]
seed
: random seed
sdn
: standard deviation of aditive noise. If it is a two-valued vector, the value of N is randomly sampled in the interval
goParallel
: if TRUE it uses parallelism

References

Gianluca Bontempi, Maxime Flauder (2014) From dependency to causality: a machine learning approach. Under submission

Examples

Run this code
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=10, N=c(50,100),noNodes=c(15,40),
             functionType = "linear", seed=0,sdn=c(0.45,0.75))

Run the code above in your browser using DataLab