Package weka.core

# Interface BatchPredictor

All Known Implementing Classes:
  `AbstractClassifier`, `AdaBoostM1`, `AdditiveRegression`, `AttributeSelectedClassifier`, `Bagging`, `BayesNet`, `BayesNetGenerator`, `BIFReader`, `ClassificationViaRegression`, `CostSensitiveClassifier`, `CVParameterSelection`, `DecisionStump`, `DecisionTable`, `EditableBayesNet`, `FilteredClassifier`, `GaussianProcesses`, `GeneralRegression`, `HoeffdingTree`, `IBk`, `InputMappedClassifier`, `IteratedSingleClassifierEnhancer`, `IterativeClassifierOptimizer`, `J48`, `JRip`, `KStar`, `LinearRegression`, `LMT`, `LMTNode`, `Logistic`, `LogisticBase`, `LogitBoost`, `LWL`, `M5Base`, `M5P`, `M5Rules`, `MultiClassClassifier`, `MultiClassClassifierUpdateable`, `MultilayerPerceptron`, `MultipleClassifiersCombiner`, `MultiScheme`, `NaiveBayes`, `NaiveBayesMultinomial`, `NaiveBayesMultinomialText`, `NaiveBayesMultinomialUpdateable`, `NaiveBayesUpdateable`, `NeuralNetwork`, `OneR`, `ParallelIteratedSingleClassifierEnhancer`, `ParallelMultipleClassifiersCombiner`, `PART`, `PMMLClassifier`, `PreConstructedLinearModel`, `RandomCommittee`, `RandomForest`, `RandomizableClassifier`, `RandomizableFilteredClassifier`, `RandomizableIteratedSingleClassifierEnhancer`, `RandomizableMultipleClassifiersCombiner`, `RandomizableParallelIteratedSingleClassifierEnhancer`, `RandomizableParallelMultipleClassifiersCombiner`, `RandomizableSingleClassifierEnhancer`, `RandomSubSpace`, `RandomTree`, `Regression`, `RegressionByDiscretization`, `REPTree`, `RuleNode`, `RuleSetModel`, `SerializedClassifier`, `SGD`, `SGDText`, `SimpleLinearRegression`, `SimpleLogistic`, `SingleClassifierEnhancer`, `SMO`, `SMOreg`, `Stacking`, `SupportVectorMachineModel`, `TreeModel`, `Vote`, `VotedPerceptron`, `WeightedInstancesHandlerWrapper`, `ZeroR`

public interface BatchPredictor
Interface to something that can produce predictions in a batch manner when presented with a set of Instances.

Version:
  $Revision: 11958 $
Author:
  Mark Hall (mhall{[at]}pentaho{[dot]}com)

- ## Method Summary

  Modifier and Type
  Method
  Description
  `double[][]`
  `distributionsForInstances(Instances insts)`
  Batch scoring method
  `String`
  `getBatchSize()`
  Get the batch size to use.
  `boolean`
  `implementsMoreEfficientBatchPrediction()`
  Returns true if this BatchPredictor can generate batch predictions in an efficient manner.
  `void`
  `setBatchSize(String size)`
  Set the batch size to use.

- ## Method Details

  - ### setBatchSize

    void setBatchSize(String size)
    Set the batch size to use. The implementer will prefer (but not necessarily expect) this many instances to be passed in to distributionsForInstances().
    Parameters:
      `size` - the batch size to use

  - ### getBatchSize

    String getBatchSize()
    Get the batch size to use. The implementer will prefer (but not necessarily expect) this many instances to be passed in to distributionsForInstances(). Allows the preferred batch size to be encapsulated with the client.
    Returns:
      the batch size to use

  - ### distributionsForInstances

    double[][] distributionsForInstances(Instances insts) throws Exception
    Batch scoring method
    Parameters:
      `insts` - the instances to get predictions for
    Returns:
      an array of probability distributions, one for each instance
    Throws:
      `Exception` - if a problem occurs

  - ### implementsMoreEfficientBatchPrediction

    boolean implementsMoreEfficientBatchPrediction()
    Returns true if this BatchPredictor can generate batch predictions in an efficient manner.
    Returns:
      true if batch predictions can be generated efficiently