Description Usage Arguments Value References Examples
predict if there is a connection between node i and node j
1 2 |
object |
: a D2C object |
i |
: index of putative cause (1 ≤ i ≤ n) |
j |
: index of putative effect (1 ≤ j ≤ n) |
data |
: dataset of observations from the DAG |
list with response and prob of the prediction
Gianluca Bontempi, Maxime Flauder (2014) From dependency to causality: a machine learning approach. Under submission
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | require(RBGL)
require(gRbase)
require(foreach)
data(example)
## load the D2C object
testDAG<-new("simulatedDAG",NDAG=1, N=50,noNodes=5,
functionType = "linear", seed=1,sdn=c(0.25,0.5))
## creates a simulatedDAG object for testing
plot(testDAG@list.DAGs[[1]])
## plot the topology of the simulatedDAG
predict(example,1,2, testDAG@list.observationsDAGs[[1]])
## predict if the edge 1->2 exists
predict(example,4,3, testDAG@list.observationsDAGs[[1]])
## predict if the edge 4->3 exists
predict(example,4,1, testDAG@list.observationsDAGs[[1]])
## predict if the edge 4->1 exists
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.