Interface ALSModelParams
- All Superinterfaces:
HasBlockSize
,HasPredictionCol
,Identifiable
,Params
,Serializable
- All Known Subinterfaces:
ALSParams
Common params for ALS and ALSModel.
-
Method Summary
Modifier and TypeMethodDescriptioncheckIntegers
(Dataset<?> dataset, String colName) Attempts to safely cast a user/item id to an Int.Param for strategy for dealing with unknown or new users/items at prediction time.itemCol()
Param for the column name for item ids.userCol()
Param for the column name for user ids.Methods inherited from interface org.apache.spark.ml.param.shared.HasBlockSize
blockSize, getBlockSize
Methods inherited from interface org.apache.spark.ml.param.shared.HasPredictionCol
getPredictionCol, predictionCol
Methods inherited from interface org.apache.spark.ml.util.Identifiable
toString, uid
Methods inherited from interface org.apache.spark.ml.param.Params
clear, copy, copyValues, defaultCopy, defaultParamMap, explainParam, explainParams, extractParamMap, extractParamMap, get, getDefault, getOrDefault, getParam, hasDefault, hasParam, isDefined, isSet, onParamChange, paramMap, params, set, set, set, setDefault, setDefault, shouldOwn
-
Method Details
-
checkIntegers
Attempts to safely cast a user/item id to an Int. Throws an exception if the value is out of integer range or contains a fractional part.- Parameters:
dataset
- (undocumented)colName
- (undocumented)- Returns:
- (undocumented)
-
coldStartStrategy
Param for strategy for dealing with unknown or new users/items at prediction time. This may be useful in cross-validation or production scenarios, for handling user/item ids the model has not seen in the training data. Supported values: - "nan": predicted value for unknown ids will be NaN. - "drop": rows in the input DataFrame containing unknown ids will be dropped from the output DataFrame containing predictions. Default: "nan".- Returns:
- (undocumented)
-
getColdStartStrategy
String getColdStartStrategy() -
getItemCol
String getItemCol() -
getUserCol
String getUserCol() -
itemCol
Param for the column name for item ids. Ids must be integers. Other numeric types are supported for this column, but will be cast to integers as long as they fall within the integer value range. Default: "item"- Returns:
- (undocumented)
-
userCol
Param for the column name for user ids. Ids must be integers. Other numeric types are supported for this column, but will be cast to integers as long as they fall within the integer value range. Default: "user"- Returns:
- (undocumented)
-