public class BinaryClassificationEvaluator extends Evaluator implements HasRawPredictionCol, HasLabelCol, DefaultParamsWritable
Constructor and Description |
---|
BinaryClassificationEvaluator() |
BinaryClassificationEvaluator(String uid) |
Modifier and Type | Method and Description |
---|---|
BinaryClassificationEvaluator |
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.
|
String |
getMetricName() |
boolean |
isLargerBetter()
Indicates whether the metric returned by
evaluate should be maximized (true, default)
or minimized (false). |
static BinaryClassificationEvaluator |
load(String path) |
Param<String> |
metricName()
param for metric name in evaluation (supports
"areaUnderROC" (default), "areaUnderPR" ) |
static MLReader<T> |
read() |
BinaryClassificationEvaluator |
setLabelCol(String value) |
BinaryClassificationEvaluator |
setMetricName(String value) |
BinaryClassificationEvaluator |
setRawPredictionCol(String value) |
String |
uid()
An immutable unique ID for the object and its derivatives.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getRawPredictionCol, rawPredictionCol
getLabelCol, labelCol
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 BinaryClassificationEvaluator(String uid)
public BinaryClassificationEvaluator()
public static BinaryClassificationEvaluator load(String path)
public static MLReader<T> read()
public String uid()
Identifiable
uid
in interface Identifiable
public Param<String> metricName()
"areaUnderROC"
(default), "areaUnderPR"
)public String getMetricName()
public BinaryClassificationEvaluator setMetricName(String value)
public BinaryClassificationEvaluator setRawPredictionCol(String value)
public BinaryClassificationEvaluator 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 BinaryClassificationEvaluator copy(ParamMap extra)
Params
defaultCopy()
.