public class PlattScaling
extends java.lang.Object
implements java.io.Serializable
| Constructor and Description |
|---|
PlattScaling(double[] scores,
int[] y)
Trains the Platt scaling.
|
PlattScaling(double[] scores,
int[] y,
int maxIters)
Trains the Platt scaling.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
multiclass(int k,
double[][] r,
double[] p)
Estimates the multiclass probabilies.
|
double |
predict(double y)
Returns the posterior probability estimate P(y = 1 | x).
|
public PlattScaling(double[] scores,
int[] y)
scores - The predicted scores.y - The training labels.public PlattScaling(double[] scores,
int[] y,
int maxIters)
scores - The predicted scores.y - The training labels.maxIters - The maximal number of iterations.public double predict(double y)
y - the binary classifier output score.public static void multiclass(int k,
double[][] r,
double[] p)