public final class OneVsRest extends Estimator<OneVsRestModel>
Reduction of Multiclass Classification to Binary Classification. Performs reduction using one against all strategy. For a multiclass classification with k classes, train k models (one per class). Each example is scored against all k models and the model with highest score is picked to label the example.
Modifier and Type | Method and Description |
---|---|
Param<Classifier<?,? extends Classifier<Object,Classifier,ClassificationModel>,? extends ClassificationModel<Object,ClassificationModel>>> |
classifier()
param for the base binary classifier that we reduce multiclass classification into.
|
OneVsRestModel |
fit(DataFrame dataset)
Fits a model to the input data.
|
Classifier<?,? extends Classifier<Object,Classifier,ClassificationModel>,? extends ClassificationModel<Object,ClassificationModel>> |
getClassifier() |
OneVsRest |
setClassifier(Classifier<?,?,?> value) |
StructType |
transformSchema(StructType schema)
:: DeveloperApi ::
|
String |
uid() |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
clear, copyValues, defaultParamMap, explainParam, explainParams, extractParamMap, extractParamMap, get, getDefault, getOrDefault, getParam, hasDefault, hasParam, isDefined, isSet, paramMap, params, set, set, set, setDefault, setDefault, setDefault, shouldOwn, validateParams
initializeIfNecessary, initializeLogging, isTraceEnabled, log_, log, logDebug, logDebug, logError, logError, logInfo, logInfo, logName, logTrace, logTrace, logWarning, logWarning
public String uid()
public OneVsRest setClassifier(Classifier<?,?,?> value)
public StructType transformSchema(StructType schema)
PipelineStage
Derives the output schema from the input schema.
transformSchema
in class PipelineStage
schema
- (undocumented)public OneVsRestModel fit(DataFrame dataset)
Estimator
fit
in class Estimator<OneVsRestModel>
dataset
- (undocumented)public Param<Classifier<?,? extends Classifier<Object,Classifier,ClassificationModel>,? extends ClassificationModel<Object,ClassificationModel>>> classifier()
public Classifier<?,? extends Classifier<Object,Classifier,ClassificationModel>,? extends ClassificationModel<Object,ClassificationModel>> getClassifier()