public abstract class BaseClassifier extends BaseModel implements AbstractClassifier
Base class for all classification models. As such, it provides a constructor and functions to control whether the class variable is treated as discrete or not.
This class also includes a "class cutoff" used with continuous class variables, which is used to convert it to a discrete value. For a predicted class, x, the discrete is floor(x) if rem(x,1) is less than the cutoff and ceil(x) otherwise.
Any models that implements this interface must determine the probability of each class occurring if the class variable is discrete
Modifier and Type | Field and Description |
---|---|
protected java.lang.String[] |
ClassNames
Names of classes this model can distinguish between
|
protected int |
NClasses
Number of classes to distinguish between
|
AttributeSelector, trained, TrainingStats, validated, ValidationStats
Constructor and Description |
---|
BaseClassifier() |
Modifier and Type | Method and Description |
---|---|
BaseClassifier |
clone() |
java.lang.String[] |
getClassNames()
Get names of classes this model distinguishes between.
|
int |
getNClasses() |
void |
run(Dataset TestData)
Run a model on provided data.
|
void |
train(Dataset D,
boolean b)
Train a model on a specified training set and then evaluate performance
on the training set, if desired
|
about, crossValidate, crossValidate, crossValidate, done, externallyValidate, getAttributeSelector, getCitations, getFilter, getTrainTime, getValidationMethod, handleSetCommand, isTrained, isValidated, loadState, printCommand, printDescription, printModel_protected, printModel, printModelDescriptionDetails, resetModel, run_protected, runCommand, saveCommand, saveState, setAttributeSelector, setComponent, setFilter, train_protected, train
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
printUsage, setOptions
protected int NClasses
protected java.lang.String[] ClassNames
public BaseClassifier clone()
public int getNClasses()
getNClasses
in interface AbstractClassifier
public java.lang.String[] getClassNames()
AbstractClassifier
getClassNames
in interface AbstractClassifier
public void train(Dataset D, boolean b)
BaseModel