Package se.hb.jcp.cp.measures
Class AggregatedObservedMeasures
- java.lang.Object
-
- se.hb.jcp.cp.measures.AggregatedObservedMeasures
-
public class AggregatedObservedMeasures extends java.lang.ObjectMaintains running averages for a set of observed measures.- Author:
- anders.gidenstam(at)hb.se
-
-
Constructor Summary
Constructors Constructor Description AggregatedObservedMeasures()Creates the default set of aggregating observed measures.AggregatedObservedMeasures(IObservedMeasure[] measures)Creates a set of aggregating observed measures from an array of single prediction ones.
-
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 measures.AggregatedObservedMeasuregetMeasure(int i)Gets one of the aggregated observed measures in this set.intsize()Returns the number of measures in this set.
-
-
-
Constructor Detail
-
AggregatedObservedMeasures
public AggregatedObservedMeasures()
Creates the default set of aggregating observed measures.
-
AggregatedObservedMeasures
public AggregatedObservedMeasures(IObservedMeasure[] measures)
Creates a set of aggregating observed measures from an array of single prediction ones.- Parameters:
measures- the observed measures.
-
-
Method Detail
-
add
public void add(ConformalClassification prediction, double trueLabel)
Adds the supplied conformal prediction to the aggregated measures.- Parameters:
prediction- a ConformalClassification.trueLabel- the true label of the instance.
-
getMeasure
public AggregatedObservedMeasure getMeasure(int i)
Gets one of the aggregated observed measures in this set.- Parameters:
i- the index (0 to size()-1) of the measure.- Returns:
- a AggregatedObservedMeasure.
-
size
public int size()
Returns the number of measures in this set.- Returns:
- the number of measures in this set.
-
-