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, transformsetFeaturesCol, setPredictionCol, transformSchematransform, transform, transformequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitthresholdvalidateAndTransformSchemagetLabelCol, labelColfeaturesCol, getFeaturesColgetPredictionCol, predictionColclear, copyValues, defaultCopy, defaultParamMap, explainParam, explainParams, extractParamMap, extractParamMap, get, getDefault, getOrDefault, getParam, hasDefault, hasParam, isDefined, isSet, paramMap, params, set, set, set, setDefault, setDefault, shouldOwntoStringgetRawPredictionCol, rawPredictionColgetRegParam, regParamgetMaxIter, maxIterfitIntercept, getFitInterceptgetStandardization, standardizationgetWeightCol, weightColaggregationDepth, getAggregationDepthgetThresholdsaveinitializeLogging, initializeLogIfNecessary, initializeLogIfNecessary, isTraceEnabled, log_, log, logDebug, logDebug, logError, logError, logInfo, logInfo, logName, logTrace, logTrace, logWarning, logWarningpublic static MLReader<LinearSVCModel> read()
public static LinearSVCModel load(String path)
public String uid()
Identifiableuid in interface Identifiablepublic Vector coefficients()
public double intercept()
public int numClasses()
ClassificationModelnumClasses in class ClassificationModel<Vector,LinearSVCModel>public int numFeatures()
PredictionModelnumFeatures in class PredictionModel<Vector,LinearSVCModel>public LinearSVCModel setThreshold(double value)
public LinearSVCModel setWeightCol(double value)
public double predict(Vector features)
ClassificationModeltransform() 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)
ParamsdefaultCopy().copy in interface Paramscopy in class Model<LinearSVCModel>extra - (undocumented)public MLWriter write()
MLWritableMLWriter instance for this ML instance.write in interface MLWritable