Skip to content

Commit

Permalink
added example for oaks with ZIPLN
Browse files Browse the repository at this point in the history
  • Loading branch information
jchiquet committed Sep 10, 2024
1 parent 859031a commit 1e3b8e5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions inst/case_studies/oaks_tree.R
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,16 @@ factoextra::fviz_pca_biplot(

## Network inference with sparce covariance estimation

system.time(myZIPLNnets <- ZIPLNnetwork(Abundance ~ 0 + tree + offset(log(Offset)), zi = "single", data = oaks, control = ZIPLNnetwork_param(min_ratio = 0.1)))

system.time(myPLNnets <- PLNnetwork(Abundance ~ 0 + tree + offset(log(Offset)), data = oaks, control = PLNnetwork_param(min_ratio = 0.1)))
plot(myPLNnets)
plot(getBestModel(myPLNnets, "EBIC"))
# stability_selection(myPLNnets)
# plot(getBestModel(myPLNnets, "StARS", stability = .975))

system.time(myZIPLNnets <- ZIPLNnetwork(Abundance ~ 0 + tree + offset(log(Offset)), zi = "single", data = oaks, control = ZIPLNnetwork_param(min_ratio = 0.1)))
plot(myZIPLNnets)
plot(getBestModel(myZIPLNnets, "EBIC"))

## Mixture model to recover tree structure
system.time(my_mixtures <- PLNmixture(Abundance ~ 1 + offset(log(Offset)), data = oaks, clusters = 1:5))

Expand Down

0 comments on commit 1e3b8e5

Please sign in to comment.