|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.AbstractCollection<E> java.util.AbstractList<E> java.util.ArrayList<Classification> cc.mallet.classify.Trial
public class Trial
Stores the results of classifying a collection of Instances, and provides many methods for evaluating the results. If you just need one evaluation result, you may find it easier to one of the corresponding methods in Classifier, which simply call the methods here.
InstanceList
,
Classifier
,
Classification
,
Serialized FormField Summary |
---|
Fields inherited from class java.util.AbstractList |
---|
modCount |
Constructor Summary | |
---|---|
Trial(Classifier c,
InstanceList ilist)
|
Method Summary | |
---|---|
boolean |
add(Classification c)
|
void |
add(int index,
Classification c)
|
boolean |
addAll(java.util.Collection<? extends Classification> collection)
|
boolean |
addAll(int index,
java.util.Collection<? extends Classification> collection)
|
double |
getAccuracy()
Return the fraction of instances that have the correct label as their best predicted label. |
double |
getAverageRank()
Return the average rank of the correct class label as returned by Labeling.getRank(correctLabel) on the predicted Labeling. |
Classifier |
getClassifier()
|
double |
getF1(int index)
Calculate the F1-measure for a particular target index from an array list of classifications |
double |
getF1(Labeling label)
|
double |
getF1(java.lang.Object labelEntry)
Calculate the F1-measure of the classifier on an instance list for a particular target entry |
double |
getPrecision(int index)
Calculate the precision for a particular target index from an array list of classifications |
double |
getPrecision(Labeling label)
|
double |
getPrecision(java.lang.Object labelEntry)
Calculate the precision of the classifier on an instance list for a particular target entry |
double |
getRecall(int labelIndex)
Calculate the recall for a particular target index from an array list of classifications |
double |
getRecall(Labeling label)
|
double |
getRecall(java.lang.Object labelEntry)
Calculate the recall of the classifier on an instance list for a particular target entry |
Methods inherited from class java.util.ArrayList |
---|
clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize |
Methods inherited from class java.util.AbstractList |
---|
equals, hashCode, iterator, listIterator, listIterator, subList |
Methods inherited from class java.util.AbstractCollection |
---|
containsAll, removeAll, retainAll, toString |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.List |
---|
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList |
Constructor Detail |
---|
public Trial(Classifier c, InstanceList ilist)
Method Detail |
---|
public boolean add(Classification c)
add
in interface java.util.Collection<Classification>
add
in interface java.util.List<Classification>
add
in class java.util.ArrayList<Classification>
public void add(int index, Classification c)
add
in interface java.util.List<Classification>
add
in class java.util.ArrayList<Classification>
public boolean addAll(java.util.Collection<? extends Classification> collection)
addAll
in interface java.util.Collection<Classification>
addAll
in interface java.util.List<Classification>
addAll
in class java.util.ArrayList<Classification>
public boolean addAll(int index, java.util.Collection<? extends Classification> collection)
addAll
in interface java.util.List<Classification>
addAll
in class java.util.ArrayList<Classification>
public Classifier getClassifier()
public double getAccuracy()
public double getPrecision(java.lang.Object labelEntry)
public double getPrecision(Labeling label)
public double getPrecision(int index)
public double getRecall(java.lang.Object labelEntry)
public double getRecall(Labeling label)
public double getRecall(int labelIndex)
public double getF1(java.lang.Object labelEntry)
public double getF1(Labeling label)
public double getF1(int index)
public double getAverageRank()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |