arid_logreg: Given a matrix X of explanatory variables, a response y...

Description Usage Arguments Value Examples

View source: R/aridanalysis.R

Description

Given a matrix X of explanatory variables, a response y numeric variable, this function fits either a 'binomial' or 'multinomial' logistic regression model and returns a class object similar to sci-kit learn's object

Usage

1
arid_logreg(X, y, regularization = NULL, lambda = NULL)

Arguments

X

(data frame): the explanatory variables matrix

y

(numeric): the response variable numeric vector

regularization

(character): what level of regularization to use in the model (default NULL)

lambda

(double): the regularization strength parameter to use (default: NULL)

Value

arid_logreg: a class object after fitting a 'binomial' or 'multinomial' logistic regression model

Examples

1
2
3
X <- matrix(rnorm(40 * 3), 40, 3)
y <- sample(c(0,1), 40, replace = TRUE)
arid_logreg(X, y)

UBC-MDS/aRidanalysis documentation built on March 31, 2021, 5:19 p.m.