Class LogisticRegressionPredictor

All Implemented Interfaces:
LogicalOperator

public class LogisticRegressionPredictor extends AbstractPredictor
  • Constructor Details

    • LogisticRegressionPredictor

      public LogisticRegressionPredictor()
  • Method Details

    • predictedType

      protected RecordTokenType predictedType(PMMLModelSpec modelSpec)
      Description copied from class: AbstractPredictor
      Given the model spec, returns the predicted type. This should not include the input type ( the input is automatically prepended to the type that is returned )
      Specified by:
      predictedType in class AbstractPredictor
      Parameters:
      modelSpec - the model metadata
      Returns:
      the predicted type
    • getWinnerField

      public String getWinnerField()
      Gets the name of the winner field to output. This is "winner" by-default.
      Returns:
      the name of the winner field to output.
    • setWinnerField

      public void setWinnerField(String name)
      Sets the name of the winner field to output. This is "winner" by-default.
      Parameters:
      winnerField - the name of the winner field to output.
    • execute

      protected void execute(PMMLModel pmml, RecordValued input, ScalarSettable[] predictedFields)
      Description copied from class: AbstractPredictor
      Called to perform prediction. Subclasses are expected to loop over the input by calling AbstractPredictor.stepNext(). For each row of input, subclasses should first set the predicted values in the predictedFields array and then invoke AbstractPredictor.pushPrediction(). Subclasses should not invoke pushEndOfData since that is automatically handled by the base class.
      Specified by:
      execute in class AbstractPredictor
      Parameters:
      pmml - The input PMML model
      input - The input data
      predictedFields - An array of fields that reference the predicted field locations. The array positionally corresponds to the type returned by AbstractPredictor.predictedType(PMMLModelSpec).