Package com.spotify.zoltar
Interface PredictFns.PredictFn<ModelT extends Model<?>,InputT,VectorT,ValueT>
-
- Type Parameters:
InputT
- type of the feature extraction input.VectorT
- type of the feature extraction output.ValueT
- type of the prediction output.
- Enclosing interface:
- PredictFns
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public static interface PredictFns.PredictFn<ModelT extends Model<?>,InputT,VectorT,ValueT>
Synchronous prediction functional interface. Allows to define prediction function via lambda.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description List<Prediction<InputT,ValueT>>
apply(ModelT model, List<Vector<InputT,VectorT>> vectors)
The functional interface.default <C extends PredictFns.PredictFn<ModelT,InputT,VectorT,ValueT>>
Cwith(Function<PredictFns.PredictFn<ModelT,InputT,VectorT,ValueT>,C> fn)
-
-
-
Method Detail
-
apply
List<Prediction<InputT,ValueT>> apply(ModelT model, List<Vector<InputT,VectorT>> vectors) throws Exception
The functional interface. Your function/lambda takes model and features after extractions as input, should perform a prediction and return the predictions.- Parameters:
model
- model to perform prediction on.vectors
- extracted features.- Returns:
- predictions (
Prediction
). - Throws:
Exception
-
-