Description Usage Arguments Value Examples

The function for the causal structure learning.

1 2 3 |

`D` |
Input Data. |

`G` |
An initial graph for hill climbing. Default: empty graph. |

`min_increase` |
Minimum score increase for faster convergence. |

`score_type` |
You can choose "bic","log","aic" score to learn the causal struture. Default: bic |

`file` |
Specifies the output folder and its path to save the model at each iteration. |

`verbose` |
Show the progress bar for each iteration. |

`save_model` |
Save the meta data during the iteration so that you can easily restore progress and evaluate the model during iteration. |

`bw` |
the smoothing bandwidth which is the parameter of the function stats::density(Kernel stats::density Estimation) |

`booster` |
Choose the regression method, it could be "lm", "gbtree" and "gblinear". The "lm" and "gblinear" is the linear regression methods and "gbtree" is the nonlinear regression method. Default: gbtree |

`gamma` |
The parameter in xgboost: minimum loss reduction required to make a further partition on a leaf node of the tree. the larger, the more conservative the algorithm will be. |

`nrounds` |
the maximum number of trees for xgboost.Default:30. |

`...` |
other parameters for xgboost.see also: help(xgboost) |

The adjacency matrix of the casual structure.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | ```
## Not run:
#x->y->z
set.seed(0)
x=rnorm(4000)
y=x^2+runif(4000,-1,1)*0.1
z=y^2+runif(4000,-1,1)*0.1
data=data.frame(x,y,z)
fhc(data,gamma=10,booster = "gbtree")
#x->y->z linear data
set.seed(0)
x=rnorm(4000)
y=3*x+runif(4000,-1,1)*0.1
z=3*y+runif(4000,-1,1)*0.1
data=data.frame(x,y,z)
fhc(data,booster = "lm")
#randomGraph with linear data
set.seed(0)
G=randomGraph(dim=10,indegree=1.5)
data=synthetic_data_linear(G=G,sample_num=4000)
fitG=fhc(data,booster = "lm")
indicators(fitG,G)
## End(Not run)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.