|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.fu_berlin.ties.io.BaseStorable
de.fu_berlin.ties.eval.Accuracy
Counts true and false items and measures the accuracy: A = true / (true + false).
Instances of this class are not thread-safe.
Field Summary | |
static String |
KEY_ACCURACY
Serialization key for the accuracy. |
static String |
KEY_FALSE_COUNT
Serialization key for the number of false items. |
static String |
KEY_TRUE_COUNT
Serialization key for the number of true items. |
Constructor Summary | |
Accuracy()
Creates a new empty instance. |
|
Accuracy(FieldMap fieldMap)
Creates a new instance from a field map, fulfilling the Storable contract. |
Method Summary | |
double |
getAccuracy()
Calculates and returns the accuracy: A = true / (true + false). |
long |
getFalseCount()
Returns the number of false decisions. |
long |
getTrueCount()
Returns the number of true decisions. |
void |
incFalseCount()
Increases the number of false decisions by one. |
void |
incTrueCount()
Increases the number of true decisions by one. |
FieldMap |
storeFields()
Stores all relevant fields of this object in a field map for serialization. An equivalent object can be created by calling FieldMap.createObject(Class) on the created
field map. |
Methods inherited from class de.fu_berlin.ties.io.BaseStorable |
toString, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final String KEY_ACCURACY
public static final String KEY_FALSE_COUNT
public static final String KEY_TRUE_COUNT
Constructor Detail |
public Accuracy()
public Accuracy(FieldMap fieldMap) throws IllegalArgumentException
Storable
contract.
fieldMap
- map containing the serialized fields
IllegalArgumentException
- if at least one of the parameters is
negative or missingMethod Detail |
public double getAccuracy()
public long getFalseCount()
public long getTrueCount()
public void incFalseCount()
public void incTrueCount()
public FieldMap storeFields()
FieldMap.createObject(Class)
on the created
field map.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |