Package se.hb.jcp.cp.measures
Class AggregatedObservedMeasure
- java.lang.Object
-
- se.hb.jcp.cp.measures.AggregatedObservedMeasure
-
public class AggregatedObservedMeasure extends java.lang.ObjectMaintains a running average of an observed measure.- Author:
- anders.gidenstam(at)hb.se
-
-
Constructor Summary
Constructors Constructor Description AggregatedObservedMeasure(IObservedMeasure measure)Creates an aggregating observed measure from the single prediction one.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(ConformalClassification prediction, double trueLabel)Adds the supplied conformal prediction to the aggregated measure.doublegetMean()Gets the current mean of the aggregated observed measure.intgetNumberOfObservations()Gets the current number of observations of the measure.java.lang.StringtoString()
-
-
-
Constructor Detail
-
AggregatedObservedMeasure
public AggregatedObservedMeasure(IObservedMeasure measure)
Creates an aggregating observed measure from the single prediction one.- Parameters:
measure- the observed measure.
-
-
Method Detail
-
add
public void add(ConformalClassification prediction, double trueLabel)
Adds the supplied conformal prediction to the aggregated measure.- Parameters:
prediction- a ConformalClassification.trueLabel- the true label of the instance.
-
getNumberOfObservations
public int getNumberOfObservations()
Gets the current number of observations of the measure.- Returns:
- the current number of observations.
-
getMean
public double getMean()
Gets the current mean of the aggregated observed measure.- Returns:
- the current mean of the aggregated observed measure.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-