|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object org.apache.spark.ml.PipelineStage org.apache.spark.ml.Estimator<OneVsRestModel> org.apache.spark.ml.classification.OneVsRest
public final class OneVsRest
:: Experimental ::
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.
Constructor Summary | |
---|---|
OneVsRest()
|
|
OneVsRest(String uid)
|
Method Summary | |
---|---|
Param<Classifier<?,? extends Classifier<Object,Classifier,ClassificationModel>,? extends ClassificationModel<Object,ClassificationModel>>> |
classifier()
param for the base binary classifier that we reduce multiclass classification into. |
OneVsRest |
copy(ParamMap extra)
Creates a copy of this instance with the same UID and some extra params. |
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()
|
Methods inherited from class org.apache.spark.ml.Estimator |
---|
fit, fit, fit, fit |
Methods inherited from class Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.spark.ml.param.Params |
---|
clear, copyValues, defaultCopy, defaultParamMap, explainParam, explainParams, extractParamMap, extractParamMap, get, getDefault, getOrDefault, getParam, hasDefault, hasParam, isDefined, isSet, paramMap, params, set, set, set, setDefault, setDefault, setDefault, shouldOwn, validateParams |
Methods inherited from interface org.apache.spark.Logging |
---|
initializeIfNecessary, initializeLogging, isTraceEnabled, log_, log, logDebug, logDebug, logError, logError, logInfo, logInfo, logName, logTrace, logTrace, logWarning, logWarning |
Constructor Detail |
---|
public OneVsRest(String uid)
public OneVsRest()
Method Detail |
---|
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 OneVsRest copy(ParamMap extra)
Params
copy
in interface Params
copy
in class Estimator<OneVsRestModel>
extra
- (undocumented)
defaultCopy()
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()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |