Class IsotonicRegressionScaling

java.lang.Object
smile.classification.IsotonicRegressionScaling
All Implemented Interfaces:
Serializable

public class IsotonicRegressionScaling extends Object implements Serializable
A method to calibrate decision function value to probability. Compared to Platt's scaling, this approach fits a piecewise-constant non-decreasing function instead of logistic regression.

References

  1. Alexandru Niculescu-Mizil and Rich Caruana. Predicting Good Probabilities With Supervised Learning. ICML, 2005.
See Also:
  • Constructor Details

    • IsotonicRegressionScaling

      public IsotonicRegressionScaling(double[] buckets, double[] prob)
      Constructor.
      Parameters:
      buckets - the step-wise buckets of function values in ascending order.
      prob - the probability of instances falling into the corresponding buckets.
  • Method Details

    • fit

      public static IsotonicRegressionScaling fit(double[] scores, int[] y)
      Trains the Isotonic Regression scaling.
      Parameters:
      scores - The predicted scores.
      y - The training labels.
      Returns:
      the model.
    • predict

      public double predict(double y)
      Returns the posterior probability estimate P(y = 1 | x).
      Parameters:
      y - the binary classifier output score.
      Returns:
      the estimated probability.
    • toString

      public String toString()
      Overrides:
      toString in class Object