Learn R Programming

PhylogeneticEM (version 1.0.0)

init.EM.lasso: Initialisation of the shifts using Lasso.

Description

init.EM.lasso does the following regression : ||Y_data-T.delta||_(Sigma_YY^(-1)) + lambda |delta|_1 using the function glmnet::glmnet of package glmnet, throught function lasso_regression_K_fixed. T is the incidence matrix of the tree, and delta the vectorial representation of the shifts (see functions incidence.matrix and shifts.list_to_vector for further details).

Usage

init.EM.lasso(phylo, Y_data, Y_data_imp = Y_data, Y_data_vec_known = as.vector(Y_data), process, times_shared = compute_times_ca(phylo), distances_phylo, nbr_of_shifts, K_lag_init = 0, use_sigma = TRUE, params_sigma = NULL, variance.init = diag(1, p, p), random.init = FALSE, value.root.init = rep(0, p), exp.root.init = rep(1, p), var.root.init = diag(1, p, p), edges.init = NULL, values.init = matrix(0, p, length(edges.init)), relativeTimes.init = NULL, selection.strength.init = 1, optimal.value.init = rep(0, p), T_tree = incidence.matrix(phylo), subtree.list = NULL, miss = FALSE, sBM_variance = FALSE, stationary.root.init = FALSE, impute_init_Rphylopars = FALSE, masque_data, independent = FALSE, ...)

Arguments

Y_data
data at the tips.
times_shared
(matrix) : times of shared ancestry, result of function compute_times_ca.
distances_phylo
(matrix) : phylogenetics distance, result of function compute_dist_phy
nbr_of_shifts
number of shifts used in the EM algorithm

Value

params_init the list of initial parameters to be used, in the right format.

Details

A cholesky decomposition of function Sigma_YY^(-1) is used. lambda is choosen so that delta has the right number of non zero components.