// PredictBatch makes a prediction for all of the inputs given in inputs concurrently. // outputs must either be (nSamples x outputDim), or must be nil. If outputs is nil, // a new matrix will be created to store the predictions func (sink *Sink) PredictBatch(inputs common.RowMatrix, outputs common.MutableRowMatrix) (common.MutableRowMatrix, error) { batch := batchPredictor{ features: sink.features, featureWeights: sink.featureWeights, b: sink.b, } return predHelp.BatchPredict(batch, inputs, outputs, sink.inputDim, sink.outputDim, sink.grainSize()) }
func (s *Independent) PredictBatch(inputs common.RowMatrix, outputs common.MutableRowMatrix) (common.MutableRowMatrix, error) { batch := batchPredictor{ featureWeights: s.featureWeights, outputDim: s.outputDim, nFeatures: s.nFeatures, order: s.order, } return predHelp.BatchPredict(batch, inputs, outputs, s.inputDim, s.outputDim, s.grainSize()) }