diff --git a/404.html b/404.html index 906f3531..d16d0a47 100644 --- a/404.html +++ b/404.html @@ -39,7 +39,7 @@
diff --git a/LICENSE-text.html b/LICENSE-text.html index 74dfb188..ff9ecbfc 100644 --- a/LICENSE-text.html +++ b/LICENSE-text.html @@ -17,7 +17,7 @@ diff --git a/apple-touch-icon-120x120.png b/apple-touch-icon-120x120.png index cae4abf0..db26807b 100644 Binary files a/apple-touch-icon-120x120.png and b/apple-touch-icon-120x120.png differ diff --git a/apple-touch-icon-152x152.png b/apple-touch-icon-152x152.png index fcbe83b1..fb141c9b 100644 Binary files a/apple-touch-icon-152x152.png and b/apple-touch-icon-152x152.png differ diff --git a/apple-touch-icon-180x180.png b/apple-touch-icon-180x180.png index 63fa17c7..d036cf9e 100644 Binary files a/apple-touch-icon-180x180.png and b/apple-touch-icon-180x180.png differ diff --git a/apple-touch-icon-60x60.png b/apple-touch-icon-60x60.png index 4c1681d7..c45aee4f 100644 Binary files a/apple-touch-icon-60x60.png and b/apple-touch-icon-60x60.png differ diff --git a/apple-touch-icon-76x76.png b/apple-touch-icon-76x76.png index 450b847a..aa553982 100644 Binary files a/apple-touch-icon-76x76.png and b/apple-touch-icon-76x76.png differ diff --git a/apple-touch-icon.png b/apple-touch-icon.png index 63fa17c7..d036cf9e 100644 Binary files a/apple-touch-icon.png and b/apple-touch-icon.png differ diff --git a/articles/Import_data.html b/articles/Import_data.html index 1a02da8f..003e1e82 100644 --- a/articles/Import_data.html +++ b/articles/Import_data.html @@ -40,7 +40,7 @@ @@ -109,7 +109,7 @@vignettes/Import_data.Rmd
Import_data.Rmd
vignettes/PLN.Rmd
PLN.Rmd
vignettes/PLNLDA.Rmd
PLNLDA.Rmd
vignettes/PLNPCA.Rmd
PLNPCA.Rmd
Again, the best model is obtained for \(q=3\) classes.
diff --git a/articles/PLNmixture.html b/articles/PLNmixture.html index 13a36464..f7a43f85 100644 --- a/articles/PLNmixture.html +++ b/articles/PLNmixture.html @@ -40,7 +40,7 @@ @@ -110,7 +110,7 @@vignettes/PLNmixture.Rmd
PLNmixture.Rmd
myMix_BIC$memberships
## [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 2 2 2 2 2 2 2 1 1 1 1 1 1 1
-## [39] 1 1 1 1 1 1 1 1 1 1 2
+## [1] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 2 1 1 1 1 1 1 1 2 2 2 2 2 2 2
+## [39] 2 2 2 2 2 2 2 2 2 2 1
myMix_BIC$mixtureParam
## [1] 0.8163265 0.1836735
+## [1] 0.1836735 0.8163265
1 | 0 | +1 |
1 | 0 | +1 |
1 | 0 | +1 |
1 | 0 | +1 |
1 | 0 | +1 |
1 | 0 | +1 |
sigma(myMix_BIC) %>% purrr::map(as.matrix) %>% purrr::map(diag)
## [[1]]
-## Che Hyc Hym Hys Psy Aga Glo Ath
-## 0.7187567 0.7187567 0.7187567 0.7187567 0.7187567 0.7187567 0.7187567 0.7187567
-## Cea Ced Set All Han Hfo Hsp Hve
-## 0.7187567 0.7187567 0.7187567 0.7187567 0.7187567 0.7187567 0.7187567 0.7187567
-## Sta
-## 0.7187567
-##
-## [[2]]
## Che Hyc Hym Hys Psy Aga Glo Ath
## 0.962438 0.962438 0.962438 0.962438 0.962438 0.962438 0.962438 0.962438
## Cea Ced Set All Han Hfo Hsp Hve
## 0.962438 0.962438 0.962438 0.962438 0.962438 0.962438 0.962438 0.962438
## Sta
-## 0.962438
+## 0.962438
+##
+## [[2]]
+## Che Hyc Hym Hys Psy Aga Glo Ath
+## 0.7187567 0.7187567 0.7187567 0.7187567 0.7187567 0.7187567 0.7187567 0.7187567
+## Cea Ced Set All Han Hfo Hsp Hve
+## 0.7187567 0.7187567 0.7187567 0.7187567 0.7187567 0.7187567 0.7187567 0.7187567
+## Sta
+## 0.7187567
## A multivariate Poisson Lognormal fit with spherical covariance model.
## ==================================================================
-## nb_param loglik BIC ICL
-## 18 -828.206 -863.233 -1388.325
+## nb_param loglik BIC ICL
+## 18 -252.7 -287.726 167.536
## ==================================================================
## * Useful fields
## $model_par, $latent, $latent_pos, $var_par, $optim_par
@@ -633,28 +633,28 @@
predicted.class %>% head() %>% knitr::kable(digits = 2)
1 | 0 | +1 |
1 | 0 | +1 |
1 | 0 | +1 |
1 | 0 | +1 |
1 | 0 | +1 |
1 | 0 | +1 |
Setting type = "response"
, we can predict the most
@@ -665,9 +665,9 @@
## 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
-## 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 2 2
+## 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 2 1 1
## 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
-## 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2
+## 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1
## Levels: 1 2
We can assess that the predictions are quite similar to the real
group (this is not a proper validation of the method as we used data
diff --git a/articles/PLNmixture_files/figure-html/plot clustering-1.png b/articles/PLNmixture_files/figure-html/plot clustering-1.png
index 4ed1d174..cc63d75c 100644
Binary files a/articles/PLNmixture_files/figure-html/plot clustering-1.png and b/articles/PLNmixture_files/figure-html/plot clustering-1.png differ
diff --git a/articles/PLNmixture_files/figure-html/plot reordered data-1.png b/articles/PLNmixture_files/figure-html/plot reordered data-1.png
index 2185f631..b0f2ed4a 100644
Binary files a/articles/PLNmixture_files/figure-html/plot reordered data-1.png and b/articles/PLNmixture_files/figure-html/plot reordered data-1.png differ
diff --git a/articles/PLNmixture_files/figure-html/predicted_position-1.png b/articles/PLNmixture_files/figure-html/predicted_position-1.png
index 355a23ec..6720580a 100644
Binary files a/articles/PLNmixture_files/figure-html/predicted_position-1.png and b/articles/PLNmixture_files/figure-html/predicted_position-1.png differ
diff --git a/articles/PLNnetwork.html b/articles/PLNnetwork.html
index ff6ae1f2..92594d83 100644
--- a/articles/PLNnetwork.html
+++ b/articles/PLNnetwork.html
@@ -40,7 +40,7 @@
"step_sizes" pair of minimal (default: 1e-6) and maximal (default: 50) allowed step sizes. Only used in RPROP "etas" pair of multiplicative increase and decrease factors. Default is (0.5, 1.2). Only used in RPROP "centered" if TRUE, compute the centered RMSProp where the gradient is normalized by an estimation of its variance weight_decay (L2 penalty). Default to FALSE. Only used in RMSPROPSparse structure estimation for multivariate
count data with PLN-network
PLN team
- 2023-11-17
+ 2023-11-28
Source: vignettes/PLNnetwork.Rmd
PLNnetwork.Rmd
Structure of a
PLNnetworkfit
<
my_graph <- plot(model_StARS, plot = FALSE)
my_graph
## IGRAPH 1c819b7 UNW- 17 1 --
+
## IGRAPH 9825f91 UNW- 17 1 --
## + attr: name (v/c), label (v/c), label.cex (v/n), size (v/n),
## | label.color (v/c), frame.color (v/l), weight (e/n), color (e/c),
## | width (e/n)
-## + edge from 1c819b7 (vertex names):
+## + edge from 9825f91 (vertex names):
## [1] Hfo--Hsp
plot(model_StARS)
Description of the Trichoptera data set
PLN team
- 2023-11-17
+ 2023-11-28
Source: vignettes/Trichoptera.Rmd
Trichoptera.Rmd
Details
The list of parameters config_post
controls the post-treatment processing (for PLN and PLNLDA), with the following entries:
jackknife boolean indicating whether jackknife should be performed to evaluate bias and variance of the model parameters. Default is FALSE.
The list of parameters config_post
controls the post-treatment processing (for most PLN*()
functions), with the following entries (defaults may vary depending on the specific function, check config_post_default_*
for defaults values):
jackknife boolean indicating whether jackknife should be performed to evaluate bias and variance of the model parameters. Default is FALSE.
bootstrap integer indicating the number of bootstrap resamples generated to evaluate the variance of the model parameters. Default is 0 (inactivated).
variational_var boolean indicating whether variational Fisher information matrix should be computed to estimate the variance of the model parameters (highly underestimated). Default is FALSE.
sandwich_var boolean indicating whether sandwich estimation should be used to estimate the variance of the model parameters (highly underestimated). Default is FALSE.
postTreatment()
Update R2, fisher and std_err fields and visualization
PLNLDAfit$postTreatment(grouping, responses, covariates, offsets, config)
PLNLDAfit$postTreatment(
+ grouping,
+ responses,
+ covariates,
+ offsets,
+ config_post,
+ config_optim
+)
a list for controlling the optimizer (either "nlopt" or "torch" backend). See details
a list for controlling the post-treatments (optional bootstrap, jackknife, R2, etc.). See details
Set up the parameters initialization: by default, the model is initialized with a multivariate linear model applied on log-transformed data, and with the same formula as the one provided by the user. However, the user can provide a PLNfit (typically obtained from a previous fit), @@ -139,7 +144,7 @@
"step_sizes" pair of minimal (default: 1e-6) and maximal (default: 50) allowed step sizes. Only used in RPROP
"etas" pair of multiplicative increase and decrease factors. Default is (0.5, 1.2). Only used in RPROP
"centered" if TRUE, compute the centered RMSProp where the gradient is normalized by an estimation of its variance weight_decay (L2 penalty). Default to FALSE. Only used in RMSPROP
The list of parameters config_post
controls the post-treatment processing (for PLN and PLNLDA), with the following entries:
jackknife boolean indicating whether jackknife should be performed to evaluate bias and variance of the model parameters. Default is FALSE.
The list of parameters config_post
controls the post-treatment processing (for most PLN*()
functions), with the following entries (defaults may vary depending on the specific function, check config_post_default_*
for defaults values):
jackknife boolean indicating whether jackknife should be performed to evaluate bias and variance of the model parameters. Default is FALSE.
bootstrap integer indicating the number of bootstrap resamples generated to evaluate the variance of the model parameters. Default is 0 (inactivated).
variational_var boolean indicating whether variational Fisher information matrix should be computed to estimate the variance of the model parameters (highly underestimated). Default is FALSE.
sandwich_var boolean indicating whether sandwich estimation should be used to estimate the variance of the model parameters (highly underestimated). Default is FALSE.
nullModel
The list of parameters config
controls the post-treatment processing, with the following entries:
jackknife boolean indicating whether jackknife should be performed to evaluate bias and variance of the model parameters. Default is FALSE.
The list of parameters config_post
controls the post-treatment processing, with the following entries:
jackknife boolean indicating whether jackknife should be performed to evaluate bias and variance of the model parameters. Default is FALSE.
bootstrap integer indicating the number of bootstrap resamples generated to evaluate the variance of the model parameters. Default is 0 (inactivated).
variational_var boolean indicating whether variational Fisher information matrix should be computed to estimate the variance of the model parameters (highly underestimated). Default is FALSE.
rsquared boolean indicating whether approximation of R2 based on deviance should be computed. Default is TRUE
"step_sizes" pair of minimal (default: 1e-6) and maximal (default: 50) allowed step sizes. Only used in RPROP
"etas" pair of multiplicative increase and decrease factors. Default is (0.5, 1.2). Only used in RPROP
"centered" if TRUE, compute the centered RMSProp where the gradient is normalized by an estimation of its variance weight_decay (L2 penalty). Default to FALSE. Only used in RMSPROP
The list of parameters config_post
controls the post-treatment processing (for PLN and PLNLDA), with the following entries:
jackknife boolean indicating whether jackknife should be performed to evaluate bias and variance of the model parameters. Default is FALSE.
The list of parameters config_post
controls the post-treatment processing (for most PLN*()
functions), with the following entries (defaults may vary depending on the specific function, check config_post_default_*
for defaults values):
jackknife boolean indicating whether jackknife should be performed to evaluate bias and variance of the model parameters. Default is FALSE.
bootstrap integer indicating the number of bootstrap resamples generated to evaluate the variance of the model parameters. Default is 0 (inactivated).
variational_var boolean indicating whether variational Fisher information matrix should be computed to estimate the variance of the model parameters (highly underestimated). Default is FALSE.
sandwich_var boolean indicating whether sandwich estimation should be used to estimate the variance of the model parameters (highly underestimated). Default is FALSE.
postTreatment()
Update fields after optimization
config
a list for controlling the post-treatment.
config_post
a list for controlling the post-treatments (optional bootstrap, jackknife, R2, etc.).
config_optim
a list for controlling the optimization parameters used during post_treatments
a list for controlling the optimizer (either "nlopt" or "torch" backend). See details
a list for controlling the post-treatments (optional bootstrap, jackknife, R2, etc.).
Set up the parameters initialization: by default, the model is initialized with a multivariate linear model applied on log-transformed data, and with the same formula as the one provided by the user. However, the user can provide a PLNfit (typically obtained from a previous fit), diff --git a/reference/PLNmixturefamily.html b/reference/PLNmixturefamily.html index c5db0566..1c90564f 100644 --- a/reference/PLNmixturefamily.html +++ b/reference/PLNmixturefamily.html @@ -19,7 +19,7 @@
diff --git a/reference/PLNmixturefit.html b/reference/PLNmixturefit.html index 10fab90b..16e7da44 100644 --- a/reference/PLNmixturefit.html +++ b/reference/PLNmixturefit.html @@ -20,7 +20,7 @@ @@ -395,7 +395,8 @@PLNnetwork_param(
- backend = "nlopt",
+ backend = c("nlopt", "torch"),
+ inception_cov = c("full", "spherical", "diagonal"),
trace = 1,
n_penalties = 30,
min_ratio = 0.1,
penalize_diagonal = TRUE,
penalty_weights = NULL,
+ config_post = list(),
config_optim = list(),
inception = NULL
)
optimization back used, either "nlopt" or "torch". Default is "nlopt"
Covariance structure used for the inception model used to initialize the PLNfamily. Defaults to "full" and can be constrained to "diagonal" and "spherical".
a integer for verbosity.
either a single or a list of p x p matrix of weights (default filled with 1) to adapt the amount of shrinkage to each pairs of node. Must be symmetric with positive values.
a list for controlling the post-treatment (optional bootstrap, jackknife, R2, etc).
a list for controlling the optimizer (either "nlopt" or "torch" backend). See details
## 10 samples of 5 species with equal abundances, no covariance and target depths of 10,000
rPLN()
-#> Y1 Y2 Y3 Y4 Y5
-#> S1 2308 207 2433 1756 10978
-#> S2 4463 8324 834 696 2445
-#> S3 621 90 3537 1825 446
-#> S4 920 605 419 3277 560
-#> S5 1633 3419 1099 798 371
-#> S6 2172 913 1897 393 390
-#> S7 3646 2114 8716 425 755
-#> S8 2413 128 7070 12838 813
-#> S9 689 347 1440 1561 1916
-#> S10 410 1179 9398 428 6130
+#> Y1 Y2 Y3 Y4 Y5
+#> S1 1320 3452 2193 342 793
+#> S2 1491 3740 506 309 732
+#> S3 529 469 6081 2582 2437
+#> S4 742 648 3052 743 7344
+#> S5 9045 920 932 1933 3613
+#> S6 1820 1420 339 480 1243
+#> S7 1143 3183 710 2513 931
+#> S8 1731 877 785 758 2159
+#> S9 291 706 1883 1280 690
+#> S10 1462 2470 1473 1427 1204
#> attr(,"offsets")
#> [,1] [,2] [,3] [,4] [,5]
#> [1,] 7.100902 7.100902 7.100902 7.100902 7.100902
@@ -157,9 +157,9 @@ Examples
mu <- rep(c(1, -1), each = 5)
Sigma <- matrix(0.8, 10, 10); diag(Sigma) <- 1
rPLN(n=2, mu = mu, Sigma = Sigma, depths = c(1e3, 1e5))
-#> Y1 Y2 Y3 Y4 Y5 Y6 Y7 Y8 Y9 Y10
-#> S1 31 232 82 202 102 11 10 12 38 5
-#> S2 37753 34084 29391 39777 57906 8812 13571 7770 5998 6440
+#> Y1 Y2 Y3 Y4 Y5 Y6 Y7 Y8 Y9 Y10
+#> S1 353 263 207 170 663 80 70 62 47 28
+#> S2 10840 8378 6899 6461 10086 1480 2925 2557 1657 1316
#> attr(,"offsets")
#> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8]
#> [1,] 3.671389 3.671389 3.671389 3.671389 3.671389 3.671389 3.671389 3.671389
diff --git a/reference/sigma.PLNfit.html b/reference/sigma.PLNfit.html
index 31af57a8..c9be28ea 100644
--- a/reference/sigma.PLNfit.html
+++ b/reference/sigma.PLNfit.html
@@ -17,7 +17,7 @@