public class ODE extends BaseUpdateableClassifier
AODE
Modifier and Type | Field and Description |
---|---|
protected double[][][][] |
counts
First index is the number of target values
2nd index is the number of values for the dependent variable 3rd is the number of categorical variables, including the dependent one 4th is the count for the variable value |
protected int |
dependent
The attribute we will be dependent on
|
protected int |
depTargets
The number of possible values for the dependent variable
|
protected int |
predTargets
The number of possible values in the target class
|
protected double[][] |
priors
The prior probability of each combination of target and dependent variable
|
protected double |
priorSum |
Modifier | Constructor and Description |
---|---|
|
ODE(int dependent)
Creates a new ODE classifier
|
protected |
ODE(ODE toClone)
Copy constructor
|
Modifier and Type | Method and Description |
---|---|
CategoricalResults |
classify(DataPoint data)
Performs classification on the given data point.
|
ODE |
clone() |
protected double |
getLogPrb(int[] catVals,
int c) |
void |
setUp(CategoricalData[] categoricalAttributes,
int numericAttributes,
CategoricalData predicting)
Prepares the classifier to begin learning from its
UpdateableClassifier.update(jsat.classifiers.DataPoint, int) method. |
boolean |
supportsWeightedData()
Indicates whether the model knows how to train using weighted data points.
|
void |
update(DataPoint dataPoint,
int targetClass)
Updates the classifier by giving it a new data point to learn from.
|
getEpochs, setEpochs, trainC, trainC, trainEpochs
protected int dependent
protected int predTargets
protected int depTargets
protected double[][][][] counts
protected double[][] priors
protected double priorSum
public ODE(int dependent)
dependent
- the categorical feature to be dependent ofprotected ODE(ODE toClone)
toClone
- the ODE to copypublic CategoricalResults classify(DataPoint data)
Classifier
data
- the data point to classifypublic boolean supportsWeightedData()
Classifier
public ODE clone()
clone
in interface Classifier
clone
in interface UpdateableClassifier
clone
in class BaseUpdateableClassifier
public void setUp(CategoricalData[] categoricalAttributes, int numericAttributes, CategoricalData predicting)
UpdateableClassifier
UpdateableClassifier.update(jsat.classifiers.DataPoint, int)
method.categoricalAttributes
- an array containing the categorical
attributes that will be in each data pointnumericAttributes
- the number of numeric attributes that will be in
each data pointpredicting
- the information for the target class that will be
predictedpublic void update(DataPoint dataPoint, int targetClass)
UpdateableClassifier
dataPoint
- the data point to learntargetClass
- the target class of the data pointprotected double getLogPrb(int[] catVals, int c)
catVals
- the catigorical values for a data pointc
- the target value to get the probability ofCopyright © 2017. All rights reserved.