Description Usage Arguments Details Value Examples

The main function for scale-free forest density estimation.

1 | ```
scalefreeForest(xtrain, xheld, lambda = seq(0.005, 0.15, 0.005), iter.max = 100, range = NULL, verbose = TRUE)
``` |

`xtrain` |
An |

`xheld` |
An |

`lambda` |
A sequence of positive numbers to control the regularization of the log degree penalty. The default value is |

`iter.max` |
The maximal number of steps in the iterative reweighted Kruskal's algorithm. The default value is |

`range` |
The range for each of the variables. The default value is |

`verbose` |
If |

The training data set is used to construct scale-free forests and the corresponding density estimators, while the held-out data set is then used to determine the optimal scale-free forest by maximizing the held-out log-likelihood.

`loglike` |
Maximal held-out log-likelihood for the optimal scale-free forest density estimators corresponding to the regularization parameters. |

`adj` |
Adjacency matrices of the optimal scale-free forests corresponding to the regularization parameters. |

`best.loglike` |
Maximal held-out log-likelihood over all the regularization parameters. |

`best.adj` |
Adjacency matrix of the optimal scale-free forest corresponding to the maximum of the held-out log-likelihood over all the regularization parameters. |

1 2 3 4 5 | ```
library(igraph)
fit <- scalefreeForest(xtrain, xheld)
sf <- fit$best.adj
plot(sf)
``` |

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.