LinearModelL1penalties: LinearModelL1penalties

Description Usage Arguments Value

View source: R/LinearModelL1.R

Description

train different models based on the different penalty values in the penalty_vec and create a matric of weights for all of the penalties W.mat (n_features+1 x n_penalties), weight matrix on original scale can be used to make predictions via cbind(1, X.mat)

Usage

1
LinearModelL1penalties(X.mat, y.vec, penalty.vec, step.size)

Arguments

X.mat

an unscaled matrix of [ n_observations : n_features ]

y.vec

labels for the observations [ n_observations : 1 ]

penalty.vec

a vector of possible penelty values to test [ n_penalties : 1 ]

step.size

the incrimental size to descent by

Value

a matrix of weights for each feature for each penalty used [ n_features + 1 : n_penalties ] (first row is the bias)


ChaddFrasier/planetLearn documentation built on July 5, 2020, 2:32 a.m.