getClasses: Recover the classes that a model uses

Description Usage Arguments Value Note

View source: R/OOP_util.R

Description

This function recovers the classes present in this model That is, it returns the levels used in the original predicted variable. Of course, this is only relevant if the model was built using categorical data; otherwise an error will be returned.

Usage

1
getClasses(model)

Arguments

model

is the model from which to recover the classes

Value

a character vector of classes

Note

The nearest neighbour models in package:FNN and package:class do not enclose their results in a class; when NPEL.Classification builds objects of these types it wraps them in a class so they are recognizable by S3 methods, and attaches the formula and data. Hence, if a model was built directly using these packages the result will not run this function.


henkelstone/NPEL.Classification documentation built on May 17, 2019, 3:42 p.m.