I
- Input type of model produced by this trainer.O
- Output type of model produced by this trainer.IW
- Input type of model produced by wrapped trainer.OW
- Output type of model produced by wrapped trainer.M
- Type of model produced by wrapped model.L
- Type of labels.public class AdaptableDatasetTrainer<I,O,IW,OW,M extends IgniteModel<IW,OW>,L> extends DatasetTrainer<AdaptableDatasetModel<I,O,IW,OW,M>,L>
DatasetTrainer
. Produces model which is composition of
form before `andThen` wMdl `andThen` after
where wMdl is model produced by wrapped trainer.DatasetTrainer.EmptyDatasetException
envBuilder, environment
Modifier and Type | Method and Description |
---|---|
AdaptableDatasetTrainer<I,O,IW,OW,M,L> |
afterFeatureExtractor(IgniteFunction<Vector,Vector> after)
Specify function which will be applied after feature extractor.
|
AdaptableDatasetTrainer<I,O,IW,OW,M,L> |
afterLabelExtractor(IgniteFunction<L,L> after)
Specify function which will be applied after label extractor.
|
<O1> AdaptableDatasetTrainer<I,O1,IW,OW,M,L> |
afterTrainedModel(IgniteFunction<O,O1> after)
Let this trainer produce model
mdl . |
<O1,M1 extends IgniteModel<O,O1>> |
andThen(DatasetTrainer<M1,L> tr,
IgniteFunction<AdaptableDatasetModel<I,O,IW,OW,M>,IgniteFunction<LabeledVector<L>,LabeledVector<L>>> datasetMappingProducer)
Create a
TrainersSequentialComposition of whis trainer and specified trainer. |
<I1> AdaptableDatasetTrainer<I1,O,IW,OW,M,L> |
beforeTrainedModel(IgniteFunction<I1,I> before)
Let this trainer produce model
mdl . |
<K,V> AdaptableDatasetModel<I,O,IW,OW,M> |
fitWithInitializedDeployingContext(DatasetBuilder<K,V> datasetBuilder,
Preprocessor<K,V> extractor)
Trains model based on the specified data.
|
boolean |
isUpdateable(AdaptableDatasetModel<I,O,IW,OW,M> mdl) |
static <I,O,M extends IgniteModel<I,O>,L> |
of(DatasetTrainer<M,L> wrapped)
Construct instance of this class from a given
DatasetTrainer . |
protected <K,V> AdaptableDatasetModel<I,O,IW,OW,M> |
updateModel(AdaptableDatasetModel<I,O,IW,OW,M> mdl,
DatasetBuilder<K,V> datasetBuilder,
Preprocessor<K,V> extractor)
Trains new model taken previous one as a first approximation.
|
AdaptableDatasetTrainer<I,O,IW,OW,M,L> |
withDatasetMapping(DatasetMapping<L,L> mapping)
Specify
DatasetMapping which will be applied to dataset before fitting and updating. |
AdaptableDatasetTrainer<I,O,IW,OW,M,L> |
withUpstreamTransformerBuilder(UpstreamTransformerBuilder upstreamTransformerBuilder)
Specify which
UpstreamTransformerBuilder will be used. |
fit, fit, fit, fit, fit, fit, getLastTrainedModelOrThrowEmptyDatasetException, identityTrainer, learningEnvironment, update, update, update, update, update, withConvertedLabels, withEnvironmentBuilder
public static <I,O,M extends IgniteModel<I,O>,L> AdaptableDatasetTrainer<I,O,I,O,M,L> of(DatasetTrainer<M,L> wrapped)
DatasetTrainer
.I
- Input type of wrapped trainer.O
- Output type of wrapped trainer.M
- Type of model produced by wrapped trainer.L
- Type of labels.wrapped
- Wrapped trainer.public <K,V> AdaptableDatasetModel<I,O,IW,OW,M> fitWithInitializedDeployingContext(DatasetBuilder<K,V> datasetBuilder, Preprocessor<K,V> extractor)
fitWithInitializedDeployingContext
in class DatasetTrainer<AdaptableDatasetModel<I,O,IW,OW,M extends IgniteModel<IW,OW>>,L>
K
- Type of a key in upstream
data.V
- Type of a value in upstream
data.datasetBuilder
- Dataset builder.extractor
- Extractor of UpstreamEntry
into LabeledVector
.public boolean isUpdateable(AdaptableDatasetModel<I,O,IW,OW,M> mdl)
isUpdateable
in class DatasetTrainer<AdaptableDatasetModel<I,O,IW,OW,M extends IgniteModel<IW,OW>>,L>
mdl
- Model.protected <K,V> AdaptableDatasetModel<I,O,IW,OW,M> updateModel(AdaptableDatasetModel<I,O,IW,OW,M> mdl, DatasetBuilder<K,V> datasetBuilder, Preprocessor<K,V> extractor)
updateModel
in class DatasetTrainer<AdaptableDatasetModel<I,O,IW,OW,M extends IgniteModel<IW,OW>>,L>
K
- Type of a key in upstream
data.V
- Type of a value in upstream
data.mdl
- Learned model.datasetBuilder
- Dataset builder.extractor
- Extractor of UpstreamEntry
into LabeledVector
.public <O1> AdaptableDatasetTrainer<I,O1,IW,OW,M,L> afterTrainedModel(IgniteFunction<O,O1> after)
mdl
. This method produces a trainer which produces mdl1
, where
mdl1 = mdl `andThen` after
.O1
- Type of produced model output.after
- Function inserted before produced model.DatasetTrainer
which produces composition of specified function and model produced by
original trainer.public <I1> AdaptableDatasetTrainer<I1,O,IW,OW,M,L> beforeTrainedModel(IgniteFunction<I1,I> before)
mdl
. This method produces a trainer which produces mdl1
, where
mdl1 = f `andThen` mdl
.I1
- Type of produced model input.before
- Function inserted before produced model.DatasetTrainer
which produces composition of specified function and model produced by
original trainer.public AdaptableDatasetTrainer<I,O,IW,OW,M,L> withDatasetMapping(DatasetMapping<L,L> mapping)
DatasetMapping
which will be applied to dataset before fitting and updating.mapping
- DatasetMapping
which will be applied to dataset before fitting and updating.public <O1,M1 extends IgniteModel<O,O1>> TrainersSequentialComposition<I,O,O1,L> andThen(DatasetTrainer<M1,L> tr, IgniteFunction<AdaptableDatasetModel<I,O,IW,OW,M>,IgniteFunction<LabeledVector<L>,LabeledVector<L>>> datasetMappingProducer)
TrainersSequentialComposition
of whis trainer and specified trainer.O1
- Type of output of trainer to compose with.M1
- Type of model produced by the trainer to compose with.tr
- Trainer to compose with.datasetMappingProducer
- DatasetMapping
producer specifying dependency between this trainer and
trainer to compose with.TrainersSequentialComposition
of whis trainer and specified trainer.public AdaptableDatasetTrainer<I,O,IW,OW,M,L> afterFeatureExtractor(IgniteFunction<Vector,Vector> after)
after
- Function which will be applied after feature extractor.public AdaptableDatasetTrainer<I,O,IW,OW,M,L> afterLabelExtractor(IgniteFunction<L,L> after)
after
- Function which will be applied after label extractor.public AdaptableDatasetTrainer<I,O,IW,OW,M,L> withUpstreamTransformerBuilder(UpstreamTransformerBuilder upstreamTransformerBuilder)
UpstreamTransformerBuilder
will be used.upstreamTransformerBuilder
- UpstreamTransformerBuilder
to use.UpstreamTransformerBuilder
will be used.
GridGain In-Memory Computing Platform : ver. 8.9.14 Release Date : November 5 2024