get_alphas: Get the alpha values corresponding to the required sparsity

Description Usage Arguments Examples

Description

Checks the sparsity levels are correct and returns corresponding alpha values. Alpha values should add to one. The values correspond to the percentage of penalty put on each of the penalised terms in the sgspls penalty. Current implementation forces some penalisation on the group component.

Usage

1
get_alphas(indiv_sparsity, subgroup_sparsity)

Arguments

indiv_sparsity

matrix of values between 0 and 1 for the individual sparsity penalty per component

subgroup_sparsity

matrix of values between 0 and 1 for the subgroup sparsity penalty per component

Examples

1
2
# Return the alphas used for the required sparsities
get_alphas(indiv_sparsity = c(0.4,0), subgroup_sparsity = c(0.2,1))

matt-sutton/sgspls documentation built on June 22, 2019, 10:21 a.m.