Package weka.core

Interface BatchPredictor

    • Method Detail

      • setBatchSize

        void setBatchSize​(java.lang.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

        java.lang.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 java.lang.Exception
        Batch scoring method
        Parameters:
        insts - the instances to get predictions for
        Returns:
        an array of probability distributions, one for each instance
        Throws:
        java.lang.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