ALSParams (Spark 3.5.5 JavaDoc) (original) (raw)
- All Superinterfaces:
ALSModelParams, HasBlockSize, HasCheckpointInterval, HasMaxIter, HasPredictionCol, HasRegParam, HasSeed, Identifiable, Params, java.io.Serializable
All Known Implementing Classes:
ALS
public interface ALSParams
extends ALSModelParams, HasMaxIter, HasRegParam, HasCheckpointInterval, HasSeed
Common params for ALS.
Method Summary
All Methods Instance Methods Abstract Methods
Modifier and Type Method and Description DoubleParam alpha() Param for the alpha parameter in the implicit preference formulation (nonnegative). Param finalStorageLevel() Param for StorageLevel for ALS model factors. double getAlpha() String getFinalStorageLevel() boolean getImplicitPrefs() String getIntermediateStorageLevel() boolean getNonnegative() int getNumItemBlocks() int getNumUserBlocks() int getRank() String getRatingCol() BooleanParam implicitPrefs() Param to decide whether to use implicit preference. Param intermediateStorageLevel() Param for StorageLevel for intermediate datasets. BooleanParam nonnegative() Param for whether to apply nonnegativity constraints. IntParam numItemBlocks() Param for number of item blocks (positive). IntParam numUserBlocks() Param for number of user blocks (positive). IntParam rank() Param for rank of the matrix factorization (positive). Param ratingCol() Param for the column name for ratings. StructType validateAndTransformSchema(StructType schema) Validates and transforms the input schema. * ### Methods inherited from interface org.apache.spark.ml.recommendation.[ALSModelParams](../../../../../org/apache/spark/ml/recommendation/ALSModelParams.html "interface in org.apache.spark.ml.recommendation") `[checkIntegers](../../../../../org/apache/spark/ml/recommendation/ALSModelParams.html#checkIntegers-org.apache.spark.sql.Dataset-java.lang.String-), [coldStartStrategy](../../../../../org/apache/spark/ml/recommendation/ALSModelParams.html#coldStartStrategy--), [getColdStartStrategy](../../../../../org/apache/spark/ml/recommendation/ALSModelParams.html#getColdStartStrategy--), [getItemCol](../../../../../org/apache/spark/ml/recommendation/ALSModelParams.html#getItemCol--), [getUserCol](../../../../../org/apache/spark/ml/recommendation/ALSModelParams.html#getUserCol--), [itemCol](../../../../../org/apache/spark/ml/recommendation/ALSModelParams.html#itemCol--), [userCol](../../../../../org/apache/spark/ml/recommendation/ALSModelParams.html#userCol--)` * ### Methods inherited from interface org.apache.spark.ml.param.shared.[HasPredictionCol](../../../../../org/apache/spark/ml/param/shared/HasPredictionCol.html "interface in org.apache.spark.ml.param.shared") `[getPredictionCol](../../../../../org/apache/spark/ml/param/shared/HasPredictionCol.html#getPredictionCol--), [predictionCol](../../../../../org/apache/spark/ml/param/shared/HasPredictionCol.html#predictionCol--)` * ### Methods inherited from interface org.apache.spark.ml.param.shared.[HasBlockSize](../../../../../org/apache/spark/ml/param/shared/HasBlockSize.html "interface in org.apache.spark.ml.param.shared") `[blockSize](../../../../../org/apache/spark/ml/param/shared/HasBlockSize.html#blockSize--), [getBlockSize](../../../../../org/apache/spark/ml/param/shared/HasBlockSize.html#getBlockSize--)` * ### Methods inherited from interface org.apache.spark.ml.param.[Params](../../../../../org/apache/spark/ml/param/Params.html "interface in org.apache.spark.ml.param") `[clear](../../../../../org/apache/spark/ml/param/Params.html#clear-org.apache.spark.ml.param.Param-), [copy](../../../../../org/apache/spark/ml/param/Params.html#copy-org.apache.spark.ml.param.ParamMap-), [copyValues](../../../../../org/apache/spark/ml/param/Params.html#copyValues-T-org.apache.spark.ml.param.ParamMap-), [defaultCopy](../../../../../org/apache/spark/ml/param/Params.html#defaultCopy-org.apache.spark.ml.param.ParamMap-), [defaultParamMap](../../../../../org/apache/spark/ml/param/Params.html#defaultParamMap--), [explainParam](../../../../../org/apache/spark/ml/param/Params.html#explainParam-org.apache.spark.ml.param.Param-), [explainParams](../../../../../org/apache/spark/ml/param/Params.html#explainParams--), [extractParamMap](../../../../../org/apache/spark/ml/param/Params.html#extractParamMap--), [extractParamMap](../../../../../org/apache/spark/ml/param/Params.html#extractParamMap-org.apache.spark.ml.param.ParamMap-), [get](../../../../../org/apache/spark/ml/param/Params.html#get-org.apache.spark.ml.param.Param-), [getDefault](../../../../../org/apache/spark/ml/param/Params.html#getDefault-org.apache.spark.ml.param.Param-), [getOrDefault](../../../../../org/apache/spark/ml/param/Params.html#getOrDefault-org.apache.spark.ml.param.Param-), [getParam](../../../../../org/apache/spark/ml/param/Params.html#getParam-java.lang.String-), [hasDefault](../../../../../org/apache/spark/ml/param/Params.html#hasDefault-org.apache.spark.ml.param.Param-), [hasParam](../../../../../org/apache/spark/ml/param/Params.html#hasParam-java.lang.String-), [isDefined](../../../../../org/apache/spark/ml/param/Params.html#isDefined-org.apache.spark.ml.param.Param-), [isSet](../../../../../org/apache/spark/ml/param/Params.html#isSet-org.apache.spark.ml.param.Param-), [onParamChange](../../../../../org/apache/spark/ml/param/Params.html#onParamChange-org.apache.spark.ml.param.Param-), [paramMap](../../../../../org/apache/spark/ml/param/Params.html#paramMap--), [params](../../../../../org/apache/spark/ml/param/Params.html#params--), [set](../../../../../org/apache/spark/ml/param/Params.html#set-org.apache.spark.ml.param.Param-T-), [set](../../../../../org/apache/spark/ml/param/Params.html#set-org.apache.spark.ml.param.ParamPair-), [set](../../../../../org/apache/spark/ml/param/Params.html#set-java.lang.String-java.lang.Object-), [setDefault](../../../../../org/apache/spark/ml/param/Params.html#setDefault-org.apache.spark.ml.param.Param-T-), [setDefault](../../../../../org/apache/spark/ml/param/Params.html#setDefault-scala.collection.Seq-), [shouldOwn](../../../../../org/apache/spark/ml/param/Params.html#shouldOwn-org.apache.spark.ml.param.Param-)` * ### Methods inherited from interface org.apache.spark.ml.util.[Identifiable](../../../../../org/apache/spark/ml/util/Identifiable.html "interface in org.apache.spark.ml.util") `[toString](../../../../../org/apache/spark/ml/util/Identifiable.html#toString--), [uid](../../../../../org/apache/spark/ml/util/Identifiable.html#uid--)` * ### Methods inherited from interface org.apache.spark.ml.param.shared.[HasMaxIter](../../../../../org/apache/spark/ml/param/shared/HasMaxIter.html "interface in org.apache.spark.ml.param.shared") `[getMaxIter](../../../../../org/apache/spark/ml/param/shared/HasMaxIter.html#getMaxIter--), [maxIter](../../../../../org/apache/spark/ml/param/shared/HasMaxIter.html#maxIter--)` * ### Methods inherited from interface org.apache.spark.ml.param.shared.[HasRegParam](../../../../../org/apache/spark/ml/param/shared/HasRegParam.html "interface in org.apache.spark.ml.param.shared") `[getRegParam](../../../../../org/apache/spark/ml/param/shared/HasRegParam.html#getRegParam--), [regParam](../../../../../org/apache/spark/ml/param/shared/HasRegParam.html#regParam--)` * ### Methods inherited from interface org.apache.spark.ml.param.shared.[HasCheckpointInterval](../../../../../org/apache/spark/ml/param/shared/HasCheckpointInterval.html "interface in org.apache.spark.ml.param.shared") `[checkpointInterval](../../../../../org/apache/spark/ml/param/shared/HasCheckpointInterval.html#checkpointInterval--), [getCheckpointInterval](../../../../../org/apache/spark/ml/param/shared/HasCheckpointInterval.html#getCheckpointInterval--)` * ### Methods inherited from interface org.apache.spark.ml.param.shared.[HasSeed](../../../../../org/apache/spark/ml/param/shared/HasSeed.html "interface in org.apache.spark.ml.param.shared") `[getSeed](../../../../../org/apache/spark/ml/param/shared/HasSeed.html#getSeed--), [seed](../../../../../org/apache/spark/ml/param/shared/HasSeed.html#seed--)`
Method Detail
* #### alpha [DoubleParam](../../../../../org/apache/spark/ml/param/DoubleParam.html "class in org.apache.spark.ml.param") alpha() Param for the alpha parameter in the implicit preference formulation (nonnegative). Default: 1.0 Returns: (undocumented) * #### finalStorageLevel [Param](../../../../../org/apache/spark/ml/param/Param.html "class in org.apache.spark.ml.param")<String> finalStorageLevel() Param for StorageLevel for ALS model factors. Pass in a string representation of`StorageLevel`. Default: "MEMORY\_AND\_DISK". Returns: (undocumented) * #### getAlpha double getAlpha() * #### getFinalStorageLevel String getFinalStorageLevel() * #### getImplicitPrefs boolean getImplicitPrefs() * #### getIntermediateStorageLevel String getIntermediateStorageLevel() * #### getNonnegative boolean getNonnegative() * #### getNumItemBlocks int getNumItemBlocks() * #### getNumUserBlocks int getNumUserBlocks() * #### getRank int getRank() * #### getRatingCol String getRatingCol() * #### implicitPrefs [BooleanParam](../../../../../org/apache/spark/ml/param/BooleanParam.html "class in org.apache.spark.ml.param") implicitPrefs() Param to decide whether to use implicit preference. Default: false Returns: (undocumented) * #### intermediateStorageLevel [Param](../../../../../org/apache/spark/ml/param/Param.html "class in org.apache.spark.ml.param")<String> intermediateStorageLevel() Param for StorageLevel for intermediate datasets. Pass in a string representation of`StorageLevel`. Cannot be "NONE". Default: "MEMORY\_AND\_DISK". Returns: (undocumented) * #### nonnegative [BooleanParam](../../../../../org/apache/spark/ml/param/BooleanParam.html "class in org.apache.spark.ml.param") nonnegative() Param for whether to apply nonnegativity constraints. Default: false Returns: (undocumented) * #### numItemBlocks [IntParam](../../../../../org/apache/spark/ml/param/IntParam.html "class in org.apache.spark.ml.param") numItemBlocks() Param for number of item blocks (positive). Default: 10 Returns: (undocumented) * #### numUserBlocks [IntParam](../../../../../org/apache/spark/ml/param/IntParam.html "class in org.apache.spark.ml.param") numUserBlocks() Param for number of user blocks (positive). Default: 10 Returns: (undocumented) * #### rank [IntParam](../../../../../org/apache/spark/ml/param/IntParam.html "class in org.apache.spark.ml.param") rank() Param for rank of the matrix factorization (positive). Default: 10 Returns: (undocumented) * #### ratingCol [Param](../../../../../org/apache/spark/ml/param/Param.html "class in org.apache.spark.ml.param")<String> ratingCol() Param for the column name for ratings. Default: "rating" Returns: (undocumented) * #### validateAndTransformSchema [StructType](../../../../../org/apache/spark/sql/types/StructType.html "class in org.apache.spark.sql.types") validateAndTransformSchema([StructType](../../../../../org/apache/spark/sql/types/StructType.html "class in org.apache.spark.sql.types") schema) Validates and transforms the input schema. Parameters: `schema` \- input schema Returns: output schema