public class LinearSVCModel extends ClassificationModel<Vector,LinearSVCModel> implements LinearSVCParams, MLWritable
LinearSVC
Modifier and Type | Method and Description |
---|---|
IntParam |
aggregationDepth()
Param for suggested depth for treeAggregate (>= 2).
|
Vector |
coefficients() |
LinearSVCModel |
copy(ParamMap extra)
Creates a copy of this instance with the same UID and some extra params.
|
BooleanParam |
fitIntercept()
Param for whether to fit an intercept term.
|
double |
intercept() |
static LinearSVCModel |
load(String path) |
IntParam |
maxIter()
Param for maximum number of iterations (>= 0).
|
int |
numClasses()
Number of classes (values which the label can take).
|
int |
numFeatures()
Returns the number of features the model was trained on.
|
double |
predict(Vector features)
Predict label for the given features.
|
Vector |
predictRaw(Vector features)
Raw prediction for each possible label.
|
static MLReader<LinearSVCModel> |
read() |
DoubleParam |
regParam()
Param for regularization parameter (>= 0).
|
LinearSVCModel |
setThreshold(double value) |
BooleanParam |
standardization()
Param for whether to standardize the training features before fitting the model.
|
DoubleParam |
threshold()
Param for threshold in binary classification prediction.
|
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. |
rawPredictionCol, setRawPredictionCol, transform, transformImpl, transformSchema
featuresCol, labelCol, predictionCol, setFeaturesCol, setPredictionCol
transform, transform, transform
params
extractInstances, validateAndTransformSchema
extractInstances, extractInstances
getLabelCol, labelCol
featuresCol, getFeaturesCol
getPredictionCol, predictionCol
clear, copyValues, defaultCopy, defaultParamMap, explainParam, explainParams, extractParamMap, extractParamMap, get, getDefault, getOrDefault, getParam, hasDefault, hasParam, isDefined, isSet, paramMap, params, set, set, set, setDefault, setDefault, shouldOwn
getRawPredictionCol, rawPredictionCol
getRegParam
getMaxIter
getFitIntercept
getStandardization
getWeightCol
getAggregationDepth
getThreshold
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<LinearSVCModel> read()
public static LinearSVCModel load(String path)
public final DoubleParam threshold()
LinearSVCParams
threshold
in interface LinearSVCParams
threshold
in interface HasThreshold
public final IntParam aggregationDepth()
HasAggregationDepth
aggregationDepth
in interface HasAggregationDepth
public final Param<String> weightCol()
HasWeightCol
weightCol
in interface HasWeightCol
public final BooleanParam standardization()
HasStandardization
standardization
in interface HasStandardization
public final DoubleParam tol()
HasTol
public final BooleanParam fitIntercept()
HasFitIntercept
fitIntercept
in interface HasFitIntercept
public final IntParam maxIter()
HasMaxIter
maxIter
in interface HasMaxIter
public final DoubleParam regParam()
HasRegParam
regParam
in interface HasRegParam
public String uid()
Identifiable
uid
in interface Identifiable
public Vector coefficients()
public double intercept()
public int numClasses()
ClassificationModel
numClasses
in class ClassificationModel<Vector,LinearSVCModel>
public int numFeatures()
PredictionModel
numFeatures
in class PredictionModel<Vector,LinearSVCModel>
public LinearSVCModel setThreshold(double value)
public double predict(Vector features)
ClassificationModel
transform()
and output predictionCol
.
This default implementation for classification predicts the index of the maximum value
from predictRaw()
.
predict
in class ClassificationModel<Vector,LinearSVCModel>
features
- (undocumented)public Vector predictRaw(Vector features)
ClassificationModel
transform()
and output rawPredictionCol
.
predictRaw
in class ClassificationModel<Vector,LinearSVCModel>
features
- (undocumented)public LinearSVCModel copy(ParamMap extra)
Params
defaultCopy()
.copy
in interface Params
copy
in class Model<LinearSVCModel>
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