|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Objectorg.apache.spark.ml.PipelineStage
org.apache.spark.ml.Transformer
org.apache.spark.ml.Model<ALSModel>
org.apache.spark.ml.recommendation.ALSModel
public class ALSModel
:: Experimental :: Model fitted by ALS.
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
Method Summary | |
---|---|
ALSModel |
copy(ParamMap extra)
Creates a copy of this instance with the same UID and some extra params. |
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()
|
Methods inherited from class org.apache.spark.ml.Model |
---|
hasParent, parent, setParent |
Methods inherited from class org.apache.spark.ml.Transformer |
---|
transform, transform, transform |
Methods inherited from class Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.spark.ml.param.Params |
---|
clear, copyValues, defaultCopy, defaultParamMap, explainParam, explainParams, extractParamMap, extractParamMap, get, getDefault, getOrDefault, getParam, hasDefault, hasParam, isDefined, isSet, paramMap, params, set, set, set, setDefault, setDefault, setDefault, shouldOwn, validateParams |
Methods inherited from interface org.apache.spark.Logging |
---|
initializeIfNecessary, initializeLogging, isTraceEnabled, log_, log, logDebug, logDebug, logError, logError, logInfo, logInfo, logName, logTrace, logTrace, logWarning, logWarning |
Method Detail |
---|
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 ALSModel copy(ParamMap extra)
Params
copy
in interface Params
copy
in class Model<ALSModel>
extra
- (undocumented)
defaultCopy()
public Param<String> userCol()
public String getUserCol()
public Param<String> itemCol()
public String getItemCol()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |