public class LinearSVCModel extends ClassificationModel<Vector,LinearSVCModel> implements LinearSVCParams, MLWritable, HasTrainingSummary<LinearSVCTrainingSummary>
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.
|
LinearSVCSummary |
evaluate(Dataset<?> dataset)
Evaluates the model on a test dataset.
|
BooleanParam |
fitIntercept()
Param for whether to fit an intercept term.
|
double |
intercept() |
static LinearSVCModel |
load(String path) |
DoubleParam |
maxBlockSizeInMB()
Param for Maximum memory in MB for stacking input data into blocks.
|
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.
|
LinearSVCTrainingSummary |
summary()
Gets summary of model on training set.
|
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, transformSchemafeaturesCol, labelCol, predictionCol, setFeaturesCol, setPredictionColtransform, transform, transformparamsvalidateAndTransformSchemagetLabelCol, labelColfeaturesCol, getFeaturesColgetPredictionCol, predictionColclear, copyValues, defaultCopy, defaultParamMap, explainParam, explainParams, extractParamMap, extractParamMap, get, getDefault, getOrDefault, getParam, hasDefault, hasParam, isDefined, isSet, onParamChange, paramMap, params, set, set, set, setDefault, setDefault, shouldOwngetRawPredictionCol, rawPredictionColgetRegParamgetMaxItergetFitInterceptgetStandardizationgetWeightColgetAggregationDepthgetThresholdgetMaxBlockSizeInMBsavehasSummary, 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_, uninitializepublic static MLReader<LinearSVCModel> read()
public static LinearSVCModel load(String path)
public final DoubleParam threshold()
LinearSVCParamsthreshold in interface LinearSVCParamsthreshold in interface HasThresholdpublic final DoubleParam maxBlockSizeInMB()
HasMaxBlockSizeInMBmaxBlockSizeInMB in interface HasMaxBlockSizeInMBpublic final IntParam aggregationDepth()
HasAggregationDepthaggregationDepth in interface HasAggregationDepthpublic final Param<String> weightCol()
HasWeightColweightCol in interface HasWeightColpublic final BooleanParam standardization()
HasStandardizationstandardization in interface HasStandardizationpublic final DoubleParam tol()
HasTolpublic final BooleanParam fitIntercept()
HasFitInterceptfitIntercept in interface HasFitInterceptpublic final IntParam maxIter()
HasMaxItermaxIter in interface HasMaxIterpublic final DoubleParam regParam()
HasRegParamregParam in interface HasRegParampublic 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 LinearSVCTrainingSummary summary()
hasSummary is false.summary in interface HasTrainingSummary<LinearSVCTrainingSummary>public LinearSVCSummary evaluate(Dataset<?> dataset)
dataset - Test dataset to evaluate model on.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 Vector predictRaw(Vector features)
ClassificationModeltransform() and output rawPredictionCol.
predictRaw 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 MLWritablepublic String toString()
toString in interface IdentifiabletoString in class Object