Package com.spotify.zoltar
Interface FeatureExtractor<ModelT extends Model<?>,InputT,VectorT>
-
- Type Parameters:
ModelT
- underlying type of theModel
.InputT
- type of the input to feature extraction.VectorT
- type of feature extraction result.
- 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 interface FeatureExtractor<ModelT extends Model<?>,InputT,VectorT>
Functional interface for feature extraction. Should be used together withPredictor
. In most cases you should use the static factory methods.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static <ModelT extends Model<?>,InputT,VectorT>
FeatureExtractor<ModelT,InputT,VectorT>create(FeatureExtractFns.ExtractFn<InputT,VectorT> fn)
Creates an extractor given a genericFeatureExtractFns.ExtractFn
, consider using Featran and FeatranExtractFns whenever possible.List<Vector<InputT,VectorT>>
extract(ModelT model, InputT... input)
Functional interface.default <C extends FeatureExtractor<ModelT,InputT,VectorT>>
Cwith(Function<FeatureExtractor<ModelT,InputT,VectorT>,C> fn)
-
-
-
Method Detail
-
create
static <ModelT extends Model<?>,InputT,VectorT> FeatureExtractor<ModelT,InputT,VectorT> create(FeatureExtractFns.ExtractFn<InputT,VectorT> fn)
Creates an extractor given a genericFeatureExtractFns.ExtractFn
, consider using Featran and FeatranExtractFns whenever possible.- Type Parameters:
InputT
- type of the input to feature extraction.VectorT
- type of feature extraction result.- Parameters:
fn
-FeatureExtractFns.ExtractFn
extraction function
-
extract
List<Vector<InputT,VectorT>> extract(ModelT model, InputT... input) throws Exception
Functional interface. Perform the feature extraction given the input.- Throws:
Exception
-
with
default <C extends FeatureExtractor<ModelT,InputT,VectorT>> C with(Function<FeatureExtractor<ModelT,InputT,VectorT>,C> fn)
-
-