Package se.hb.jcp.cp

Class ConformalClassification

  • Direct Known Subclasses:
    ConformalMultiProbabilisticClassification

    public class ConformalClassification
    extends java.lang.Object
    Represents 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
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getClassPointPrediction()
      Returns the maximum credibility point prediction class number.
      java.util.SortedSet<java.lang.Integer> getClassSet​(double significanceLevel)
      Region prediction at a selected significance level.
      double getLabelPointPrediction()
      Returns the maximum credibility point prediction label.
      java.util.SortedSet<java.lang.Double> getLabelSet​(double significanceLevel)
      Region prediction at a selected significance level.
      double getPointPredictionConfidence()
      Returns the confidence of the class/label point prediction, i.e.
      double getPointPredictionCredibility()
      Returns the credibility of the class/label point prediction, i.e.
      cern.colt.matrix.DoubleMatrix1D getPValues()
      Returns the predicted p-values.
      IConformalClassifier getSource()
      Returns the conformal classifier that made this prediction.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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.