public class ALSModel extends Model<ALSModel>
param: rank rank of the matrix factorization model
param: userFactors a DataFrame that stores user factors in two columns: id and features
param: itemFactors a DataFrame that stores item factors in two columns: id and features
| Modifier and Type | Method and Description |
|---|---|
String |
getItemCol() |
String |
getUserCol() |
Param<String> |
itemCol()
Param for the column name for item ids.
|
DataFrame |
itemFactors() |
int |
rank() |
ALSModel |
setItemCol(String value) |
ALSModel |
setPredictionCol(String value) |
ALSModel |
setUserCol(String value) |
DataFrame |
transform(DataFrame dataset)
Transforms the input dataset.
|
StructType |
transformSchema(StructType schema)
:: DeveloperApi ::
|
String |
uid() |
Param<String> |
userCol()
Param for the column name for user ids.
|
DataFrame |
userFactors() |
transform, transform, transformequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclear, copy, copyValues, defaultParamMap, explainParam, explainParams, extractParamMap, extractParamMap, get, getDefault, getOrDefault, getParam, hasDefault, hasParam, isDefined, isSet, paramMap, params, set, set, set, setDefault, setDefault, setDefault, shouldOwn, validateParamsinitializeIfNecessary, initializeLogging, isTraceEnabled, log_, log, logDebug, logDebug, logError, logError, logInfo, logInfo, logName, logTrace, logTrace, logWarning, logWarningpublic String uid()
public int rank()
public DataFrame userFactors()
public DataFrame itemFactors()
public ALSModel setUserCol(String value)
public ALSModel setItemCol(String value)
public ALSModel setPredictionCol(String value)
public DataFrame transform(DataFrame dataset)
Transformertransform in class Transformerdataset - (undocumented)public StructType transformSchema(StructType schema)
PipelineStageDerives the output schema from the input schema.
transformSchema in class PipelineStageschema - (undocumented)public Param<String> userCol()
public String getUserCol()
public Param<String> itemCol()
public String getItemCol()