public final class RegressionEvaluator extends Evaluator implements DefaultParamsWritable
Constructor and Description |
---|
RegressionEvaluator() |
RegressionEvaluator(String uid) |
Modifier and Type | Method and Description |
---|---|
static Params |
clear(Param<?> param) |
RegressionEvaluator |
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 |
getPredictionCol() |
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 RegressionEvaluator |
load(String path) |
Param<String> |
metricName()
Param for metric name in evaluation.
|
static Param<?>[] |
params() |
static Param<String> |
predictionCol() |
static void |
save(String path) |
static <T> Params |
set(Param<T> param,
T value) |
RegressionEvaluator |
setLabelCol(String value) |
RegressionEvaluator |
setMetricName(String value) |
RegressionEvaluator |
setPredictionCol(String value) |
static String |
toString() |
String |
uid()
An immutable unique ID for the object and its derivatives.
|
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
toString
public RegressionEvaluator(String uid)
public RegressionEvaluator()
public static RegressionEvaluator load(String path)
public static String toString()
public static Param<?>[] params()
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> predictionCol()
public static final String getPredictionCol()
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()
"rmse"
(default): root mean squared error
- "mse"
: mean squared error
- "r2"
: R^2^ metric
- "mae"
: mean absolute error
public String getMetricName()
public RegressionEvaluator setMetricName(String value)
public RegressionEvaluator setPredictionCol(String value)
public RegressionEvaluator 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 RegressionEvaluator copy(ParamMap extra)
Params
defaultCopy()
.