public class RecommendationTrainer extends Object
Constructor and Description |
---|
RecommendationTrainer() |
Modifier and Type | Method and Description |
---|---|
<K,O extends Serializable,S extends Serializable> |
fit(DatasetBuilder<K,? extends ObjectSubjectRatingTriplet<O,S>> datasetBuilder)
Fits prediction model.
|
RecommendationModel<Serializable,Serializable> |
fit(DatasetBuilder<Object,BinaryObject> datasetBuilder,
String objFieldName,
String subjFieldName,
String ratingFieldName)
Fits prediction model on a data storen in binary format.
|
RecommendationTrainer |
withBatchSize(int batchSize)
Set up batch size parameter.
|
RecommendationTrainer |
withK(int k)
Set up
k parameter (number of rows/cols in matrices after factorization). |
RecommendationTrainer |
withLearningEnvironmentBuilder(LearningEnvironmentBuilder environmentBuilder)
Set up learning environment builder.
|
RecommendationTrainer |
withLearningRate(double learningRate)
Set up learning rate parameter.
|
RecommendationTrainer |
withMaxIterations(int maxIterations)
Set up max iterations parameter.
|
RecommendationTrainer |
withMinMdlImprovement(double minMdlImprovement)
Set up
minModelImprovement parameter (minimal improvement of the model to continue training). |
RecommendationTrainer |
withRegularizer(double regParam)
Set up regularization parameter.
|
RecommendationTrainer |
withTrainerEnvironment(LearningEnvironment trainerEnvironment)
Set up trainer learning environment.
|
public RecommendationModel<Serializable,Serializable> fit(DatasetBuilder<Object,BinaryObject> datasetBuilder, String objFieldName, String subjFieldName, String ratingFieldName)
datasetBuilder
- Dataset builder.objFieldName
- Object field name.subjFieldName
- Subject field name.ratingFieldName
- Rating field name.public <K,O extends Serializable,S extends Serializable> RecommendationModel<O,S> fit(DatasetBuilder<K,? extends ObjectSubjectRatingTriplet<O,S>> datasetBuilder)
K
- Type of a key in upstream
data.O
- Type of an object.S
- Type of a subject.datasetBuilder
- Dataset builder.public RecommendationTrainer withLearningEnvironmentBuilder(LearningEnvironmentBuilder environmentBuilder)
environmentBuilder
- Learning environment builder.public RecommendationTrainer withTrainerEnvironment(LearningEnvironment trainerEnvironment)
trainerEnvironment
- Trainer learning environment.public RecommendationTrainer withBatchSize(int batchSize)
batchSize
- Batch size of stochastic gradient descent. The size of a dataset used on each step of SGD.public RecommendationTrainer withRegularizer(double regParam)
regParam
- Regularization parameter.public RecommendationTrainer withLearningRate(double learningRate)
learningRate
- Learning rate.public RecommendationTrainer withMaxIterations(int maxIterations)
maxIterations
- Max iterations.public RecommendationTrainer withMinMdlImprovement(double minMdlImprovement)
minModelImprovement
parameter (minimal improvement of the model to continue training).minMdlImprovement
- Minimal improvement of the model to continue training.public RecommendationTrainer withK(int k)
k
parameter (number of rows/cols in matrices after factorization).k
- Number of rows/cols in matrices after factorization
GridGain In-Memory Computing Platform : ver. 8.9.15 Release Date : December 3 2024