Fit sparse PCA on a grid of alpha

FitSparsePCA(M, r = 1, min.size = 1, alphaGrid = 10^(seq(-4, 0, by = 0.1)))

Arguments

M

Gaussian proxy for the original dataset. Possibly obtained using PLNmodels.

r

Number of missing actors.

min.size

Minimal number of neighbors for each missing actor.

alphaGrid

Grid for parsity controlling parameter.

Value

  • sPcaOpt: optimal spca object.

  • alphaOpt: best alpha value among the provided grid.

  • loglik: vector of log likelihood obtained for each value of alpha.

  • bic: vecotr of BIC values.

  • cliques: optimal clique of neighbors.

Examples

data=generate_missing_data(n=100,p=10,r=1,type="scale-free", plot=TRUE)
TrueClique=data$TC PLNfit=norm_PLN(data$Y) findclique=FitSparsePCA(PLNfit$MO,r=1) initClique=findclique$cliques TrueClique
#> [[1]] #> [1] 1 4 7 8 9 #>
initClique
#> [[1]] #> [1] 2 4 5 6 7 8 9 10 #>