Skip to content

Declares a model type the Feature Selection framework. There are currently 3 model type options:

  • Logistic Regression Models (lr)

  • Linear Regression Models (lm)

  • Naive Bayes Models (nb)

Typically these functions can be called with their defaults, especially if called upon a tr_data class object (see libml).

Usage

model_type_lr(response = "Response")

model_type_nb(response = "Response")

model_type_lm(response = "Response")

Arguments

response

character(1). The string of the column name to use as the response variable. Assumed to be a binary factor type unless linear regression is desired.

Value

An object of the appropriate class according to the model type chosen, one of: fs_lr, fs_nb, or fs_lm.

Author

Stu Field, Kirk DeLisle

Examples

# Logistic Regression
model_type_lr()
#> ── Model: logistic regression ─────────────────────────────────────────
#>  response    'Response'
#> ───────────────────────────────────────────────────────────────────────

# Robust Parameter Naive Bayes (default)
model_type_nb()
#> ── Model: naive Bayes ─────────────────────────────────────────────────
#>  response    'Response'
#> ───────────────────────────────────────────────────────────────────────

# Linear Regression
model_type_lm()
#> ── Model: linear regression ───────────────────────────────────────────
#>  response    'Response'
#> ───────────────────────────────────────────────────────────────────────