Package se.hb.jcp.cp
Class ConformalClassification
- java.lang.Object
-
- se.hb.jcp.cp.ConformalClassification
-
- Direct Known Subclasses:
ConformalMultiProbabilisticClassification
public class ConformalClassification extends java.lang.ObjectRepresents a prediction made by a conformal classifier. See [V. Vovk, A. Gammerman and G. Shafer, "Algorithmic Learning in a Random World", Springer, 2005] for the definitions used here.- Author:
- anders.gidenstam(at)hb.se
-
-
Constructor Summary
Constructors Constructor Description ConformalClassification(IConformalClassifier source, cern.colt.matrix.DoubleMatrix1D pValues)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetClassPointPrediction()Returns the maximum credibility point prediction class number.java.util.SortedSet<java.lang.Integer>getClassSet(double significanceLevel)Region prediction at a selected significance level.doublegetLabelPointPrediction()Returns the maximum credibility point prediction label.java.util.SortedSet<java.lang.Double>getLabelSet(double significanceLevel)Region prediction at a selected significance level.doublegetPointPredictionConfidence()Returns the confidence of the class/label point prediction, i.e.doublegetPointPredictionCredibility()Returns the credibility of the class/label point prediction, i.e.cern.colt.matrix.DoubleMatrix1DgetPValues()Returns the predicted p-values.IConformalClassifiergetSource()Returns the conformal classifier that made this prediction.
-
-
-
Constructor Detail
-
ConformalClassification
public ConformalClassification(IConformalClassifier source, cern.colt.matrix.DoubleMatrix1D pValues)
-
-
Method Detail
-
getPValues
public cern.colt.matrix.DoubleMatrix1D getPValues()
Returns the predicted p-values.- Returns:
- the predicted p-values.
-
getClassSet
public java.util.SortedSet<java.lang.Integer> getClassSet(double significanceLevel)
Region prediction at a selected significance level.- Parameters:
significanceLevel- the selected significance level.- Returns:
- a SortedSet<Integer> containing the predicted classes.
-
getLabelSet
public java.util.SortedSet<java.lang.Double> getLabelSet(double significanceLevel)
Region prediction at a selected significance level.- Parameters:
significanceLevel- the selected significance level.- Returns:
- a SortedSet<Double> containing the predicted class labels.
-
getClassPointPrediction
public int getClassPointPrediction()
Returns the maximum credibility point prediction class number.- Returns:
- the maximum credibility class number or -1 if no unique such class/label exists.
-
getLabelPointPrediction
public double getLabelPointPrediction()
Returns the maximum credibility point prediction label.- Returns:
- the maximum credibility class label or NaN if no unique such class/label exists.
-
getPointPredictionConfidence
public double getPointPredictionConfidence()
Returns the confidence of the class/label point prediction, i.e. the greatest 1-significance level for which the label set is at most a single value.- Returns:
- the confidence of the class/label point prediction.
-
getPointPredictionCredibility
public double getPointPredictionCredibility()
Returns the credibility of the class/label point prediction, i.e. the smallest significance level for which the label set is empty.- Returns:
- the credibility of the class/label point prediction.
-
getSource
public IConformalClassifier getSource()
Returns the conformal classifier that made this prediction.- Returns:
- the conformal classifier that made this prediction.
-
-