R/PLNnetworkfamily-class.R
Networkfamily.Rd
The functions PLNnetwork()
and ZIPLNnetwork()
both produce an instance of this class, which can be thought of as a vector of PLNnetworkfit
s ZIPLNfit_sparse
s (indexed by penalty parameter)
This class comes with a set of methods mostly used to compare
network fits (in terms of goodness of fit) or extract one from
the family (based on penalty parameter and/or goodness of it).
See the documentation for getBestModel()
,
getModel()
and plot() for the user-facing ones.
The functions PLNnetwork()
, ZIPLNnetwork()
and the classes PLNnetworkfit
, ZIPLNfit_sparse
PLNmodels::PLNfamily
-> Networkfamily
penalties
the sparsity level of the network in the successively fitted models
stability_path
the stability path of each edge as returned by the stars procedure
stability
mean edge stability along the penalty path
criteria
a data frame with the values of some criteria (variational log-likelihood, (E)BIC, ICL and R2, stability) for the collection of models / fits BIC, ICL and EBIC are defined so that they are on the same scale as the model log-likelihood, i.e. with the form, loglik - 0.5 penalty
new()
Initialize all models in the collection
Networkfamily$new(penalties, data, control)
optimize()
Call to the C++ optimizer on all models of the collection
coefficient_path()
Extract the regularization path of a Networkfamily
getBestModel()
Extract the best network in the family according to some criteria
Networkfamily$getBestModel(crit = c("BIC", "EBIC", "StARS"), stability = 0.9)
plot()
Display various outputs (goodness-of-fit criteria, robustness, diagnostic) associated with a collection of network fits (a Networkfamily
)
Networkfamily$plot(
criteria = c("loglik", "pen_loglik", "BIC", "EBIC"),
reverse = FALSE,
log.x = TRUE
)
criteria
vector of characters. The criteria to plot in c("loglik", "pen_loglik", "BIC", "EBIC")
. Defaults to all of them.
reverse
A logical indicating whether to plot the value of the criteria in the "natural" direction (loglik - 0.5 penalty) or in the "reverse" direction (-2 loglik + penalty). Default to FALSE, i.e use the natural direction, on the same scale as the log-likelihood.
log.x
logical: should the x-axis be represented in log-scale? Default is TRUE
.
plot_stars()
Plot stability path