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, transform
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
clear, copy, copyValues, defaultParamMap, explainParam, explainParams, extractParamMap, extractParamMap, get, getDefault, getOrDefault, getParam, hasDefault, hasParam, isDefined, isSet, paramMap, params, set, set, set, setDefault, setDefault, setDefault, shouldOwn, validateParams
initializeIfNecessary, initializeLogging, isTraceEnabled, log_, log, logDebug, logDebug, logError, logError, logInfo, logInfo, logName, logTrace, logTrace, logWarning, logWarning
public 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)
Transformer
transform
in class Transformer
dataset
- (undocumented)public StructType transformSchema(StructType schema)
PipelineStage
Derives the output schema from the input schema.
transformSchema
in class PipelineStage
schema
- (undocumented)public Param<String> userCol()
public String getUserCol()
public Param<String> itemCol()
public String getItemCol()