Learn R Programming

crtests (version 0.2.1)

classification_model: Generic function for creating a classification model

Description

Generic function for creating a classification model

Usage

classification_model(method, test, x, y, training_data, ...)
"classification_model"(method, test, x, y, training_data, ...)
"classification_model"(method, test, x, y, training_data, ...)
"classification_model"(method, test, x, y, training_data, ...)

Arguments

method
The method for classification.
test
The test being conducted
x
The independent variables.
y
The dependent (class) variable. Should be a factor for most algorithms
training_data
The complete data set for training
...
Extra arguments to pass to the classification algorithm

Value

The produced model

Methods (by class)

  • default: Default function for creating a classification model get s the method and calls it using x, y, and data
  • rpart: Rpart specific function for creating a classification model RPart requires a formula for classification, which is not provided by the default function
  • boosting: Create a classification model using Freund & Schapire's adaboost.M1