TargetedLearning.LReg

Exported


TargetedLearning.LReg

This module wraps some functionality from GLMNet.jl for logistic regression.

source: TargetedLearning/src/LReg.jl:6


linpred(lr::TargetedLearning.LReg.LR{T<:AbstractFloat}, newx)

Returns the linear component of predicted values from a logistic regression fit with a new X matrix

Arguments

Keyword Arguments

source: TargetedLearning/src/LReg.jl:41


lreg(x, y)

Fits a logistic regression model

Arguments

Keyword Arguments

Details

An intercept is not included by default. If you want one, make sure the first column of your design matrix is all ones. Because of how GLMNet handles intercepts and how LReg interfaces with it, this must be the first column. If you do that, don't forget to add the column in the same place to newx when you call predict.

subset is useful if you want to include only some columns of the design matrix but you want to call predict with a newx matrix with the same number of columns as x. The coefficients corresponding to columns of x which are not used in the fit are set to zero. If you would like to call predict with a newx matrix that includes only the columns that you fit on, you should subset x yourself before calling lreg.

source: TargetedLearning/src/LReg.jl:110


predict(lr::TargetedLearning.LReg.LR{T<:AbstractFloat}, newx)

Returns the predicted on the probability scale values from a logistic regression fit with a new X matrix

Arguments

** Keyword Arguments

source: TargetedLearning/src/LReg.jl:69


TargetedLearning.LReg.LR{T<:AbstractFloat}

The LR type contains the coefficent vector of a logistic regression fit, as well as indexes of included columns in the design matrix.

source: TargetedLearning/src/LReg.jl:20