public final class CategoricalPrediction extends Prediction
NumericPrediction
,
Serialized FormConstructor and Description |
---|
CategoricalPrediction(double[] categoryCounts) |
CategoricalPrediction(int[] categoryCounts) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
double[] |
getCategoryCounts() |
double[] |
getCategoryProbabilities() |
FeatureType |
getFeatureType() |
int |
getMostProbableCategoryEncoding() |
int |
hashCode() |
String |
toString() |
void |
update(Example train) |
void |
update(int encoding,
int count) |
getCount
public CategoricalPrediction(int[] categoryCounts)
public CategoricalPrediction(double[] categoryCounts)
categoryCounts
- "counts" for each category, which may be fractionalpublic double[] getCategoryCounts()
public double[] getCategoryProbabilities()
public int getMostProbableCategoryEncoding()
public FeatureType getFeatureType()
getFeatureType
in class Prediction
FeatureType.CATEGORICAL
public void update(Example train)
update
in class Prediction
public void update(int encoding, int count)
public String toString()
toString
in class Prediction
Copyright © 2014–2018. All rights reserved.