public class LinearSVCModel extends ClassificationModel<Vector,LinearSVCModel> implements LinearSVCParams, MLWritable
LinearSVC
Modifier and Type | Method and Description |
---|---|
Vector |
coefficients() |
LinearSVCModel |
copy(ParamMap extra)
Creates a copy of this instance with the same UID and some extra params.
|
double |
intercept() |
static LinearSVCModel |
load(String path) |
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.
|
static MLReader<LinearSVCModel> |
read() |
LinearSVCModel |
setThreshold(double value) |
LinearSVCModel |
setWeightCol(double value)
Deprecated.
This method is deprecated and will be removed in 3.0.0. Since 2.4.4.
|
String |
uid()
An immutable unique ID for the object and its derivatives.
|
MLWriter |
write()
Returns an
MLWriter instance for this ML instance. |
setRawPredictionCol, transform
setFeaturesCol, setPredictionCol, transformSchema
transform, transform, transform
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
threshold
validateAndTransformSchema
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
toString
getRawPredictionCol, rawPredictionCol
getRegParam, regParam
getMaxIter, maxIter
fitIntercept, getFitIntercept
getStandardization, standardization
getWeightCol, weightCol
aggregationDepth, getAggregationDepth
getThreshold
save
initializeLogging, initializeLogIfNecessary, initializeLogIfNecessary, isTraceEnabled, log_, log, logDebug, logDebug, logError, logError, logInfo, logInfo, logName, logTrace, logTrace, logWarning, logWarning
public static MLReader<LinearSVCModel> read()
public static LinearSVCModel load(String path)
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 LinearSVCModel setWeightCol(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 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