public class BinaryClassificationEvaluator extends Evaluator implements DefaultParamsWritable
Constructor and Description |
---|
BinaryClassificationEvaluator() |
BinaryClassificationEvaluator(String uid) |
Modifier and Type | Method and Description |
---|---|
static Params |
clear(Param<?> param) |
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.
|
static String |
explainParam(Param<?> param) |
static String |
explainParams() |
static ParamMap |
extractParamMap() |
static ParamMap |
extractParamMap(ParamMap extra) |
static <T> scala.Option<T> |
get(Param<T> param) |
static <T> scala.Option<T> |
getDefault(Param<T> param) |
static String |
getLabelCol() |
String |
getMetricName() |
static <T> T |
getOrDefault(Param<T> param) |
static Param<Object> |
getParam(String paramName) |
static String |
getRawPredictionCol() |
static <T> boolean |
hasDefault(Param<T> param) |
static boolean |
hasParam(String paramName) |
static boolean |
isDefined(Param<?> param) |
boolean |
isLargerBetter()
Indicates whether the metric returned by
evaluate should be maximized (true, default)
or minimized (false). |
static boolean |
isSet(Param<?> param) |
static Param<String> |
labelCol() |
static BinaryClassificationEvaluator |
load(String path) |
Param<String> |
metricName()
param for metric name in evaluation (supports
"areaUnderROC" (default), "areaUnderPR" ) |
static Param<?>[] |
params() |
static Param<String> |
rawPredictionCol() |
static void |
save(String path) |
static <T> Params |
set(Param<T> param,
T value) |
BinaryClassificationEvaluator |
setLabelCol(String value) |
BinaryClassificationEvaluator |
setMetricName(String value) |
BinaryClassificationEvaluator |
setRawPredictionCol(String value) |
static String |
toString() |
String |
uid()
An immutable unique ID for the object and its derivatives.
|
static void |
validateParams() |
static MLWriter |
write() |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
write
save
clear, copyValues, defaultCopy, defaultParamMap, explainParam, explainParams, extractParamMap, extractParamMap, get, getDefault, getOrDefault, getParam, hasDefault, hasParam, isDefined, isSet, paramMap, params, set, set, set, setDefault, setDefault, shouldOwn, validateParams
toString
public BinaryClassificationEvaluator(String uid)
public BinaryClassificationEvaluator()
public static BinaryClassificationEvaluator load(String path)
public static String toString()
public static Param<?>[] params()
public static void validateParams()
public static String explainParam(Param<?> param)
public static String explainParams()
public static final boolean isSet(Param<?> param)
public static final boolean isDefined(Param<?> param)
public static boolean hasParam(String paramName)
public static Param<Object> getParam(String paramName)
public static final <T> scala.Option<T> get(Param<T> param)
public static final <T> T getOrDefault(Param<T> param)
public static final <T> scala.Option<T> getDefault(Param<T> param)
public static final <T> boolean hasDefault(Param<T> param)
public static final ParamMap extractParamMap()
public static final Param<String> rawPredictionCol()
public static final String getRawPredictionCol()
public static final Param<String> labelCol()
public static final String getLabelCol()
public static void save(String path) throws java.io.IOException
java.io.IOException
public static MLWriter write()
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()
.