All Downloads are FREE. Search and download functionalities are using the official Maven repository.

hex.genmodel.algos.isotonic.IsotonicCalibrator Maven / Gradle / Ivy

There is a newer version: 3.46.0.6
Show newest version
package hex.genmodel.algos.isotonic;

import java.io.Serializable;

public class IsotonicCalibrator implements Serializable {

    public final double _min_x;
    public final double _max_x;
    public final double[] _thresholds_x;
    public final double[] _thresholds_y;

    public IsotonicCalibrator(double minX, double maxX, double[] thresholdsX, double[] thresholdsY) {
        _min_x = minX;
        _max_x = maxX;
        _thresholds_x = thresholdsX;
        _thresholds_y = thresholdsY;
    }

    public double calibrateP1(double p1) {
        final double x = IsotonicRegressionUtils.clip(p1, _min_x, _max_x);
        return IsotonicRegressionUtils.score(x, _min_x, _max_x, _thresholds_x, _thresholds_y);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy