public class ModelsComposition<M extends IgniteModel<Vector,Double>> extends Object implements IgniteModel<Vector,Double>, Exportable<ModelsCompositionFormat>, DeployableObject
Modifier and Type | Field and Description |
---|---|
protected List<M> |
models
Models.
|
protected PredictionsAggregator |
predictionsAggregator
Predictions aggregator.
|
Constructor and Description |
---|
ModelsComposition() |
ModelsComposition(List<M> models,
PredictionsAggregator predictionsAggregator)
Constructs a new instance of composition of models.
|
Modifier and Type | Method and Description |
---|---|
List<Object> |
getDependencies()
Returns dependencies of this object that can be object with class defined by client side and unknown for server.
|
List<M> |
getModels()
Returns containing models.
|
PredictionsAggregator |
getPredictionsAggregator()
Returns predictions aggregator.
|
Double |
predict(Vector features)
Applies containing models to features and aggregate them to one prediction.
|
<P> void |
saveModel(Exporter<ModelsCompositionFormat,P> exporter,
P path)
Save model by the given path.
|
String |
toString() |
String |
toString(boolean pretty) |
protected PredictionsAggregator predictionsAggregator
protected List<M extends IgniteModel<Vector,Double>> models
public ModelsComposition(List<M> models, PredictionsAggregator predictionsAggregator)
models
- Basic models.predictionsAggregator
- Predictions aggregator.public ModelsComposition()
public Double predict(Vector features)
public PredictionsAggregator getPredictionsAggregator()
public <P> void saveModel(Exporter<ModelsCompositionFormat,P> exporter, P path)
saveModel
in interface Exportable<ModelsCompositionFormat>
exporter
- Exporter.path
- Path to saved model.public String toString(boolean pretty)
toString
in interface IgniteModel<Vector,Double>
pretty
- Use pretty mode.public List<Object> getDependencies()
getDependencies
in interface DeployableObject
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.12.0 Release Date : January 10 2022