Documentation of 'jsat.classifiers.calibration.BinaryCalibration' Java class
BinaryCalibration
jsat.classifiers.calibration

Class BinaryCalibration

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, Classifier, Parameterized
    Direct Known Subclasses:
    IsotonicCalibration, PlattCalibration


    public abstract class BinaryCalibration
    extends java.lang.Object
    implements Classifier, Parameterized
    This abstract class provides the frame work for an algorithm to perform probability calibration based on the outputs of a base learning algorithm for binary classification problems.

    Calibration can be performed directly on output values, though it may cause over-fitting. For this reason, the BinaryCalibration.CalibrationMode may be set to an alternative method.

    The parameters include the calibration parameters, and any parameters that would be returned by the base model.
    See Also:
    Serialized Form
    • Method Detail

      • train

        public void train(ClassificationDataSet dataSet,
                          boolean parallel)
        Description copied from interface: Classifier
        Trains the classifier and constructs a model for classification using the given data set. If the training method knows how, it will used the threadPool to conduct training in parallel. This method will block until the training has completed.
        Specified by:
        train in interface Classifier
        Parameters:
        dataSet - the data set to train on
        parallel - true if multiple threads should be used to train the model. false if it should be done in a single threaded manner.
      • setCalibrationFolds

        public void setCalibrationFolds(int folds)
        If the calibration mode is set to BinaryCalibration.CalibrationMode.CV, this controls how many folds of cross validation will be used. The default is 3.
        Parameters:
        folds - the number of cross validation folds to perform
      • getCalibrationFolds

        public int getCalibrationFolds()
        Returns the number of cross validation folds to use
        Returns:
        the number of cross validation folds to use
      • setCalibrationHoldOut

        public void setCalibrationHoldOut(double holdOut)
        If the calibration mode is set to BinaryCalibration.CalibrationMode.HOLD_OUT, this what portion of the data set is randomly selected to be the hold out set. The default is 0.3.
        Parameters:
        holdOut - the portion in (0, 1) to hold out
      • getCalibrationHoldOut

        public double getCalibrationHoldOut()
        Returns the portion of the data set that will be held out for calibration
        Returns:
        the portion of the data set that will be held out for calibration
      • setCalibrationMode

        public void setCalibrationMode(BinaryCalibration.CalibrationMode mode)
        Sets which calibration mode will be used during training
        Parameters:
        mode - the calibration mode to use during training.
      • getCalibrationMode

        public BinaryCalibration.CalibrationMode getCalibrationMode()
        Returns the calibration mode used during training
        Returns:
        the calibration mode used during training

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.