public class FMClassificationModel extends ProbabilisticClassificationModel<Vector,FMClassificationModel> implements FMClassifierParams, MLWritable, HasTrainingSummary<FMClassificationTrainingSummary>
FMClassifier
Modifier and Type | Method and Description |
---|---|
FMClassificationModel |
copy(ParamMap extra)
Creates a copy of this instance with the same UID and some extra params.
|
FMClassificationSummary |
evaluate(Dataset<?> dataset)
Evaluates the model on a test dataset.
|
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 FMClassificationModel |
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 |
numClasses()
Number of classes (values which the label can take).
|
int |
numFeatures()
Returns the number of features the model was trained on.
|
Vector |
predictRaw(Vector features)
Raw prediction for each possible label.
|
static MLReader<FMClassificationModel> |
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).
|
FMClassificationTrainingSummary |
summary()
Gets summary of model on training set.
|
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. |
normalizeToProbabilitiesInPlace, predictProbability, probabilityCol, setProbabilityCol, setThresholds, thresholds, transform, transformSchema
predict, rawPredictionCol, setRawPredictionCol, transformImpl
featuresCol, labelCol, predictionCol, setFeaturesCol, setPredictionCol
transform, transform, transform
params
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
getRawPredictionCol, rawPredictionCol
getProbabilityCol, probabilityCol
getThresholds, thresholds
getFactorSize, getFitLinear, getInitStd, getMiniBatchFraction
getMaxIter
getStepSize
getFitIntercept
getRegParam
getWeightCol
save
hasSummary, setSummary
$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<FMClassificationModel> read()
public static FMClassificationModel 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 numClasses()
ClassificationModel
numClasses
in class ClassificationModel<Vector,FMClassificationModel>
public int numFeatures()
PredictionModel
numFeatures
in class PredictionModel<Vector,FMClassificationModel>
public FMClassificationTrainingSummary summary()
hasSummary
is false.summary
in interface HasTrainingSummary<FMClassificationTrainingSummary>
public FMClassificationSummary evaluate(Dataset<?> dataset)
dataset
- Test dataset to evaluate model on.public Vector predictRaw(Vector features)
ClassificationModel
transform()
and output rawPredictionCol
.
predictRaw
in class ClassificationModel<Vector,FMClassificationModel>
features
- (undocumented)public FMClassificationModel copy(ParamMap extra)
Params
defaultCopy()
.copy
in interface Params
copy
in class Model<FMClassificationModel>
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