|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.fu_berlin.ties.classify.PredictionDistribution
A distribution over the classes predicted by a classifier. The contained predictions are sorted in descending order, so the most probably prediction comes first.
Constructor Summary | |
PredictionDistribution()
Creates a new instance. |
|
PredictionDistribution(Prediction pred)
Creates a new instance, adding a prediction. |
Method Summary | |
void |
add(Prediction pred)
Adds a new prediction to this distribution. |
Prediction |
best()
Returns the best (most probably) prediction in this distribution. |
Iterator |
iterator()
Returns an iterator over the predictions in this distribution, in descending order (most probably class comes first). |
int |
size()
Returns the number of predictions (classes) in this distribution. |
String |
toString()
Returns a string representation of this object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public PredictionDistribution()
public PredictionDistribution(Prediction pred)
pred
- the prediction to addMethod Detail |
public void add(Prediction pred) throws IllegalArgumentException
pred
- the prediction to add
IllegalArgumentException
- if the distribution already contains
a prediction considered equal by PredictionComparator
public Prediction best()
public Iterator iterator()
public int size()
public String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |