public class LinearSVC extends Classifier<Vector,LinearSVC,LinearSVCModel> implements LinearSVCParams, DefaultParamsWritable
This binary classifier optimizes the Hinge Loss using the OWLQN optimizer. Only supports L2 regularization currently.
Modifier and Type | Method and Description |
---|---|
LinearSVC |
copy(ParamMap extra)
Creates a copy of this instance with the same UID and some extra params.
|
static LinearSVC |
load(String path) |
static MLReader<T> |
read() |
LinearSVC |
setAggregationDepth(int value)
Suggested depth for treeAggregate (greater than or equal to 2).
|
LinearSVC |
setFitIntercept(boolean value)
Whether to fit an intercept term.
|
LinearSVC |
setMaxIter(int value)
Set the maximum number of iterations.
|
LinearSVC |
setRegParam(double value)
Set the regularization parameter.
|
LinearSVC |
setStandardization(boolean value)
Whether to standardize the training features before fitting the model.
|
LinearSVC |
setThreshold(double value)
Set threshold in binary classification.
|
LinearSVC |
setTol(double value)
Set the convergence tolerance of iterations.
|
LinearSVC |
setWeightCol(String value)
Set the value of param
weightCol . |
String |
uid()
An immutable unique ID for the object and its derivatives.
|
setRawPredictionCol
fit, setFeaturesCol, setLabelCol, setPredictionCol, transformSchema
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
write
save
initializeLogging, initializeLogIfNecessary, initializeLogIfNecessary, isTraceEnabled, log_, log, logDebug, logDebug, logError, logError, logInfo, logInfo, logName, logTrace, logTrace, logWarning, logWarning
public static LinearSVC load(String path)
public static MLReader<T> read()
public String uid()
Identifiable
uid
in interface Identifiable
public LinearSVC setRegParam(double value)
value
- (undocumented)public LinearSVC setMaxIter(int value)
value
- (undocumented)public LinearSVC setFitIntercept(boolean value)
value
- (undocumented)public LinearSVC setTol(double value)
value
- (undocumented)public LinearSVC setStandardization(boolean value)
value
- (undocumented)public LinearSVC setWeightCol(String value)
weightCol
.
If this is not set or empty, we treat all instance weights as 1.0.
Default is not set, so all instances have weight one.
value
- (undocumented)public LinearSVC setThreshold(double value)
value
- (undocumented)public LinearSVC setAggregationDepth(int value)
value
- (undocumented)