RankingTrainValidationSplit

class RankingTrainValidationSplit.HasCollectSubMetrics[source]

Bases: pyspark.ml.param.Params

Mixin for param collectSubModels: Param for whether to collect a list of sub-models trained during tuning. If set to false, then only the single best sub-model will be available after fitting. If set to true, then all sub-models will be available. Warning: For large models, collecting all sub-models can cause OOMs on the Spark driver.

collectSubMetrics = Param(parent='undefined', name='collectSubMetrics', doc='Param for whether to collect a list of sub-models metrics.')
getCollectSubMetrics()[source]

Gets the value of collectSubModels or its default value.

setCollectSubMetrics(value)[source]

Sets the value of collectSubModels.

class RankingTrainValidationSplit.HasCollectSubModels[source]

Bases: pyspark.ml.param.Params

Mixin for param collectSubModels: Param for whether to collect a list of sub-models trained during tuning. If set to false, then only the single best sub-model will be available after fitting. If set to true, then all sub-models will be available. Warning: For large models, collecting all sub-models can cause OOMs on the Spark driver.

collectSubModels = Param(parent='undefined', name='collectSubModels', doc='Param for whether to collect a list of sub-models trained during tuning. If set to false, then only the single best sub-model will be available after fitting. If set to true, then all sub-models will be available. Warning: For large models, collecting all sub-models can cause OOMs on the Spark driver.')
getCollectSubModels()[source]

Gets the value of collectSubModels or its default value.

setCollectSubModels(value)[source]

Sets the value of collectSubModels.

class RankingTrainValidationSplit.RankingTrainValidationSplit(collectSubMetrics=None, collectSubModels=False, estimator=None, estimatorParamMaps=None, evaluator=None, itemCol=None, minRatingsI=1, minRatingsPerItem=1, minRatingsPerUser=1, minRatingsU=1, parallelism=1, ratingCol=None, seed=-1003072228, trainRatio=0.75, userCol=None)[source]

Bases: mmlspark._RankingTrainValidationSplit._RankingTrainValidationSplit, pyspark.ml.base.Estimator, pyspark.ml.tuning.ValidatorParams, RankingTrainValidationSplit.HasCollectSubModels, RankingTrainValidationSplit.HasCollectSubMetrics, pyspark.ml.param.shared.HasParallelism

class RankingTrainValidationSplit.RankingTrainValidationSplitModel(java_model=None)[source]

Bases: mmlspark._RankingTrainValidationSplit._RankingTrainValidationSplitModel, pyspark.ml.base.Model, pyspark.ml.tuning.ValidatorParams

copy(extra=None)[source]

Creates a copy of this instance with a randomly generated uid and some extra params. This copies the underlying bestModel, creates a deep copy of the embedded paramMap, and copies the embedded and extra parameters over. And, this creates a shallow copy of the validationMetrics.

Parameters:extra – Extra parameters to copy to the new instance
Returns:Copy of this instance
classmethod from_java(java_stage)[source]

Given a Java TrainValidationSplitModel, create and return a Python wrapper of it. Used for ML persistence.

recommendForAllItems(numItems)[source]
recommendForAllUsers(numItems)[source]