public class FMRegressionModel extends RegressionModel<Vector,FMRegressionModel> implements FMRegressorParams, MLWritable
FMRegressor
.Modifier and Type | Method and Description |
---|---|
FMRegressionModel |
copy(ParamMap extra)
Creates a copy of this instance with the same UID and some extra params.
|
Matrix |
factors() |
IntParam |
factorSize()
Param for dimensionality of the factors (>= 0)
|
BooleanParam |
fitIntercept()
Param for whether to fit an intercept term.
|
BooleanParam |
fitLinear()
Param for whether to fit linear term (aka 1-way term)
|
DoubleParam |
initStd()
Param for standard deviation of initial coefficients
|
double |
intercept() |
Vector |
linear() |
static FMRegressionModel |
load(String path) |
IntParam |
maxIter()
Param for maximum number of iterations (>= 0).
|
DoubleParam |
miniBatchFraction()
Param for mini-batch fraction, must be in range (0, 1]
|
int |
numFeatures()
Returns the number of features the model was trained on.
|
double |
predict(Vector features)
Predict label for the given features.
|
static MLReader<FMRegressionModel> |
read() |
DoubleParam |
regParam()
Param for regularization parameter (>= 0).
|
LongParam |
seed()
Param for random seed.
|
Param<String> |
solver()
The solver algorithm for optimization.
|
DoubleParam |
stepSize()
Param for Step size to be used for each iteration of optimization (> 0).
|
DoubleParam |
tol()
Param for the convergence tolerance for iterative algorithms (>= 0).
|
String |
toString() |
String |
uid()
An immutable unique ID for the object and its derivatives.
|
Param<String> |
weightCol()
Param for weight column name.
|
MLWriter |
write()
Returns an
MLWriter instance for this ML instance. |
featuresCol, labelCol, predictionCol, setFeaturesCol, setPredictionCol, transform, transformSchema
transform, transform, transform
params
getFactorSize, getFitLinear, getInitStd, getMiniBatchFraction
validateAndTransformSchema
getLabelCol, labelCol
featuresCol, getFeaturesCol
getPredictionCol, predictionCol
clear, copyValues, defaultCopy, defaultParamMap, explainParam, explainParams, extractParamMap, extractParamMap, get, getDefault, getOrDefault, getParam, hasDefault, hasParam, isDefined, isSet, onParamChange, paramMap, params, set, set, set, setDefault, setDefault, shouldOwn
getMaxIter
getStepSize
getFitIntercept
getRegParam
getWeightCol
save
$init$, initializeForcefully, initializeLogIfNecessary, initializeLogIfNecessary, initializeLogIfNecessary$default$2, initLock, isTraceEnabled, log, logDebug, logDebug, logError, logError, logInfo, logInfo, logName, logTrace, logTrace, logWarning, logWarning, org$apache$spark$internal$Logging$$log__$eq, org$apache$spark$internal$Logging$$log_, uninitialize
public static MLReader<FMRegressionModel> read()
public static FMRegressionModel load(String path)
public final IntParam factorSize()
FactorizationMachinesParams
factorSize
in interface FactorizationMachinesParams
public final BooleanParam fitLinear()
FactorizationMachinesParams
fitLinear
in interface FactorizationMachinesParams
public final DoubleParam miniBatchFraction()
FactorizationMachinesParams
miniBatchFraction
in interface FactorizationMachinesParams
public final DoubleParam initStd()
FactorizationMachinesParams
initStd
in interface FactorizationMachinesParams
public final Param<String> solver()
FactorizationMachinesParams
solver
in interface HasSolver
solver
in interface FactorizationMachinesParams
public final Param<String> weightCol()
HasWeightCol
weightCol
in interface HasWeightCol
public final DoubleParam regParam()
HasRegParam
regParam
in interface HasRegParam
public final BooleanParam fitIntercept()
HasFitIntercept
fitIntercept
in interface HasFitIntercept
public final LongParam seed()
HasSeed
public final DoubleParam tol()
HasTol
public DoubleParam stepSize()
HasStepSize
stepSize
in interface HasStepSize
public final IntParam maxIter()
HasMaxIter
maxIter
in interface HasMaxIter
public String uid()
Identifiable
uid
in interface Identifiable
public double intercept()
public Vector linear()
public Matrix factors()
public int numFeatures()
PredictionModel
numFeatures
in class PredictionModel<Vector,FMRegressionModel>
public double predict(Vector features)
PredictionModel
transform()
and output predictionCol
.predict
in class PredictionModel<Vector,FMRegressionModel>
features
- (undocumented)public FMRegressionModel copy(ParamMap extra)
Params
defaultCopy()
.copy
in interface Params
copy
in class Model<FMRegressionModel>
extra
- (undocumented)public MLWriter write()
MLWritable
MLWriter
instance for this ML instance.write
in interface MLWritable
public String toString()
toString
in interface Identifiable
toString
in class Object