Skip to contents

The function for training user-defined Logistic regression model.

This function supports: binary classification

Usage

logisticRegression(
  algo = "Logistic Regression",
  engine = "glmnet",
  mode = "classification",
  trainingData = NULL,
  splitedData = NULL,
  formula = NULL,
  rec = NULL,
  v = 5,
  gridNum = 5,
  iter = 10,
  metric = "roc_auc",
  seed = 1234
)

Arguments

algo

A name of the algorithm which can be customized by user (default: "Logistic Regression").

engine

The name of software that should be used to fit the model (Option: "glmnet" (default)).

mode

The model type. It should be "classification" or "regression" (Option: "classification" (default)).

trainingData

The training data.

splitedData

The whole dataset including the information of each fold

formula

formula for modeling

rec

Recipe object containing preprocessing information for cross-validation

v

Applying v-fold cross validation in modeling process (default: 5)

gridNum

Initial number of iterations to run before starting the optimization algorithm.

iter

The maximum number of search iterations.

metric

Metric to evaluate the performance (classification: "roc_auc" (default), "accuracy" / regression: "rmse" (default), "rsq").

seed

Seed for reproducible results.

Details

Hyperparameters for tuning: penalty, mixture