|
||||||||||
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.FMetrics
de.fu_berlin.ties.eval.SummaryFMetrics
public class SummaryFMetrics
FMetrics
extension that additionally
calculates a StatisticalSummary
of the
intermediate precision, recall, and F1 metrics resulting from different
update
operations. Values added by
inc...
operations
are not considered for summaries.
Especially the standard deviations might be interested -- thus they are
serialized in addition to the values stored by
the superclass. The summaries cannot be restored during
deserialization
because not all required
information is serialized.
Field Summary | |
---|---|
static String |
PREFIX_STD_DEVIATION
Prefix of serialization keys for standard deviations. |
Fields inherited from class de.fu_berlin.ties.eval.FMetrics |
---|
KEY_F1_MEASURE, KEY_FALSE_NEG, KEY_FALSE_POS, KEY_PRECISION, KEY_RECALL, KEY_TRUE_POS |
Constructor Summary | |
---|---|
SummaryFMetrics()
Creates a new empty instance. |
|
SummaryFMetrics(FieldMap fieldMap)
Creates a new instance from a field map, fulfilling the Storable contract. |
Method Summary | |
---|---|
FieldMap |
storeFields()
Stores all relevant fields of this object in a field map for serialization. |
void |
update(long addTruePos,
long addFalseNeg,
long addFalsePos)
Updates the statistics, increasing the stored values as specified and updating the statistical summaries. |
org.apache.commons.math.stat.descriptive.StatisticalSummary |
viewF1Summary()
Returns a summary view on the F1 values. |
org.apache.commons.math.stat.descriptive.StatisticalSummary |
viewPrecisionSummary()
Returns a summary view on the precision values. |
org.apache.commons.math.stat.descriptive.StatisticalSummary |
viewRecallSummary()
Returns a summary view on the recall values. |
Methods inherited from class de.fu_berlin.ties.eval.FMetrics |
---|
getF1Measure, getFalseNeg, getFalsePos, getFMeasure, getPrecision, getRecall, getTruePos, incFalseNeg, incFalsePos, incTruePos, update |
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 PREFIX_STD_DEVIATION
Constructor Detail |
---|
public SummaryFMetrics()
public SummaryFMetrics(FieldMap fieldMap) throws IllegalArgumentException
Storable
contract. Any summary
information stored in the initial instance will be lost, thus summaries
calculated after restoring will be inaccurate.
fieldMap
- map containing the serialized fields
IllegalArgumentException
- if at least one of the parameters is
negative or missingMethod Detail |
---|
public FieldMap storeFields()
FieldMap.createObject(Class)
on the created
field map. The calculated values precision, recall, and F-measure and
their standard deviations are also stored (they are ignored when
deserializing a stored instance).
storeFields
in interface Storable
storeFields
in class FMetrics
public final void update(long addTruePos, long addFalseNeg, long addFalsePos) throws IllegalArgumentException
update
in class FMetrics
addTruePos
- the number of new true positives to addaddFalseNeg
- the number of new false negatives to addaddFalsePos
- the number of new false positives to add
IllegalArgumentException
- if at least one of the parameters is
negativepublic org.apache.commons.math.stat.descriptive.StatisticalSummary viewF1Summary()
viewF1Summary
in interface FMetricsSummary
public org.apache.commons.math.stat.descriptive.StatisticalSummary viewPrecisionSummary()
viewPrecisionSummary
in interface FMetricsSummary
public org.apache.commons.math.stat.descriptive.StatisticalSummary viewRecallSummary()
viewRecallSummary
in interface FMetricsSummary
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |