public class MultilabelClassificationEvaluator extends Evaluator implements HasPredictionCol, HasLabelCol, DefaultParamsWritable
Constructor and Description |
---|
MultilabelClassificationEvaluator() |
MultilabelClassificationEvaluator(String uid) |
Modifier and Type | Method and Description |
---|---|
MultilabelClassificationEvaluator |
copy(ParamMap extra)
Creates a copy of this instance with the same UID and some extra params.
|
double |
evaluate(Dataset<?> dataset)
Evaluates model output and returns a scalar metric.
|
double |
getMetricLabel() |
String |
getMetricName() |
boolean |
isLargerBetter()
Indicates whether the metric returned by
evaluate should be maximized (true, default)
or minimized (false). |
Param<String> |
labelCol()
Param for label column name.
|
static MultilabelClassificationEvaluator |
load(String path) |
DoubleParam |
metricLabel() |
Param<String> |
metricName()
param for metric name in evaluation (supports
"f1Measure" (default), "subsetAccuracy" ,
"accuracy" , "hammingLoss" , "precision" , "recall" , "precisionByLabel" ,
"recallByLabel" , "f1MeasureByLabel" , "microPrecision" , "microRecall" ,
"microF1Measure" ) |
Param<String> |
predictionCol()
Param for prediction column name.
|
static MLReader<T> |
read() |
MultilabelClassificationEvaluator |
setLabelCol(String value) |
MultilabelClassificationEvaluator |
setMetricLabel(double value) |
MultilabelClassificationEvaluator |
setMetricName(String value) |
MultilabelClassificationEvaluator |
setPredictionCol(String value) |
String |
uid()
An immutable unique ID for the object and its derivatives.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getPredictionCol
getLabelCol
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
write
save
public MultilabelClassificationEvaluator(String uid)
public MultilabelClassificationEvaluator()
public static MultilabelClassificationEvaluator load(String path)
public static MLReader<T> read()
public final Param<String> labelCol()
HasLabelCol
labelCol
in interface HasLabelCol
public final Param<String> predictionCol()
HasPredictionCol
predictionCol
in interface HasPredictionCol
public String uid()
Identifiable
uid
in interface Identifiable
public final Param<String> metricName()
"f1Measure"
(default), "subsetAccuracy"
,
"accuracy"
, "hammingLoss"
, "precision"
, "recall"
, "precisionByLabel"
,
"recallByLabel"
, "f1MeasureByLabel"
, "microPrecision"
, "microRecall"
,
"microF1Measure"
)public String getMetricName()
public MultilabelClassificationEvaluator setMetricName(String value)
public final DoubleParam metricLabel()
public double getMetricLabel()
public MultilabelClassificationEvaluator setMetricLabel(double value)
public MultilabelClassificationEvaluator setPredictionCol(String value)
public MultilabelClassificationEvaluator setLabelCol(String value)
public double evaluate(Dataset<?> dataset)
Evaluator
isLargerBetter
specifies whether larger values are better.
public boolean isLargerBetter()
Evaluator
evaluate
should be maximized (true, default)
or minimized (false).
A given evaluator may support multiple metrics which may be maximized or minimized.isLargerBetter
in class Evaluator
public MultilabelClassificationEvaluator copy(ParamMap extra)
Params
defaultCopy()
.