Serializable
, org.apache.spark.internal.Logging
, Params
, HasFeaturesCol
, HasFitIntercept
, HasLabelCol
, HasMaxIter
, HasPredictionCol
, HasRegParam
, HasSeed
, HasSolver
, HasStepSize
, HasTol
, HasWeightCol
, PredictorParams
, FactorizationMachines
, FactorizationMachinesParams
, FMRegressorParams
, DefaultParamsWritable
, Identifiable
, MLWritable
Factorization Machines learning algorithm for regression. It supports normal gradient descent and AdamW solver.
The implementation is based on: S. Rendle. "Factorization machines" 2010.
FM is able to estimate interactions even in problems with huge sparsity (like advertising and recommendation system). FM formula is:
$$ \begin{align} y = w_0 + \sum\limits^n_{i-1} w_i x_i + \sum\limits^n_{i=1} \sum\limits^n_{j=i+1} \langle v_i, v_j \rangle x_i x_j \end{align} $$
First two terms denote global bias and linear term (as same as linear regression), and last term denotes pairwise interactions term. v_i describes the i-th variable with k factors.
FM regression model uses MSE loss which can be solved by gradient descent method, and regularization terms like L2 are usually added to the loss function to prevent overfitting.
org.apache.spark.internal.Logging.LogStringContext, org.apache.spark.internal.Logging.SparkShellLoggingFilter
Constructors
Creates a copy of this instance with the same UID and some extra params.
Param for dimensionality of the factors (>= 0)
Param for whether to fit an intercept term.
Param for whether to fit linear term (aka 1-way term)
Param for standard deviation of initial coefficients
Param for maximum number of iterations (>= 0).
Param for mini-batch fraction, must be in range (0, 1]
Param for regularization parameter (>= 0).
Set the dimensionality of the factors.
Set whether to fit intercept term.
Set whether to fit linear term.
Set the standard deviation of initial coefficients.
Set the maximum number of iterations.
Set the mini-batch fraction parameter.
Set the L2 regularization parameter.
Set the random seed for weight initialization.
Set the solver algorithm used for optimization.
Set the initial step size for the first step (like learning rate).
Set the convergence tolerance of iterations.
The solver algorithm for optimization.
Param for Step size to be used for each iteration of optimization (> 0).
Param for the convergence tolerance for iterative algorithms (>= 0).
An immutable unique ID for the object and its derivatives.
Param for weight column name.
Methods inherited from interface org.apache.spark.internal.LogginginitializeForcefully, initializeLogIfNecessary, initializeLogIfNecessary, initializeLogIfNecessary$default$2, isTraceEnabled, log, logDebug, logDebug, logDebug, logDebug, logError, logError, logError, logError, logInfo, logInfo, logInfo, logInfo, logName, LogStringContext, logTrace, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, logWarning, org$apache$spark$internal$Logging$$log_, org$apache$spark$internal$Logging$$log__$eq, withLogContext
Methods inherited from interface org.apache.spark.ml.util.MLWritablesave
Methods inherited from interface org.apache.spark.ml.param.Paramsclear, copyValues, defaultCopy, defaultParamMap, explainParam, explainParams, extractParamMap, extractParamMap, get, getDefault, getOrDefault, getParam, hasDefault, hasParam, isDefined, isSet, onParamChange, paramMap, params, set, set, set, setDefault, setDefault, shouldOwn
public FMRegressor()
Param for dimensionality of the factors (>= 0)
factorSize
in interface FactorizationMachinesParams
Param for whether to fit linear term (aka 1-way term)
fitLinear
in interface FactorizationMachinesParams
Param for mini-batch fraction, must be in range (0, 1]
miniBatchFraction
in interface FactorizationMachinesParams
Param for standard deviation of initial coefficients
initStd
in interface FactorizationMachinesParams
solver
in interface FactorizationMachinesParams
solver
in interface HasSolver
Param for weight column name. If this is not set or empty, we treat all instance weights as 1.0.
weightCol
in interface HasWeightCol
Param for regularization parameter (>= 0).
regParam
in interface HasRegParam
Param for whether to fit an intercept term.
fitIntercept
in interface HasFitIntercept
HasSeed
Param for random seed.
HasTol
Param for the convergence tolerance for iterative algorithms (>= 0).
Param for Step size to be used for each iteration of optimization (> 0).
stepSize
in interface HasStepSize
Param for maximum number of iterations (>= 0).
maxIter
in interface HasMaxIter
An immutable unique ID for the object and its derivatives.
uid
in interface Identifiable
value
- (undocumented)
value
- (undocumented)
value
- (undocumented)
value
- (undocumented)
value
- (undocumented)
value
- (undocumented)
value
- (undocumented)
value
- (undocumented)
value
- (undocumented)
value
- (undocumented)
value
- (undocumented)
Params
Creates a copy of this instance with the same UID and some extra params. Subclasses should implement this method and set the return type properly. See defaultCopy()
.
copy
in interface Params
copy
in class Predictor<Vector,FMRegressor,FMRegressionModel>
extra
- (undocumented)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4