public final class RegressionEvaluator extends Evaluator
Constructor and Description |
---|
RegressionEvaluator() |
RegressionEvaluator(java.lang.String uid) |
Modifier and Type | Method and Description |
---|---|
protected static <T> T |
$(Param<T> param) |
static Params |
clear(Param<?> param) |
RegressionEvaluator |
copy(ParamMap extra)
Creates a copy of this instance with the same UID and some extra params.
|
protected static <T extends Params> |
copyValues(T to,
ParamMap extra) |
protected static <T extends Params> |
copyValues$default$2() |
protected static <T extends Params> |
defaultCopy(ParamMap extra) |
double |
evaluate(Dataset<?> dataset)
Evaluates the output.
|
static java.lang.String |
explainParam(Param<?> param) |
static java.lang.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 java.lang.String |
getLabelCol() |
java.lang.String |
getMetricName() |
static <T> T |
getOrDefault(Param<T> param) |
static Param<java.lang.Object> |
getParam(java.lang.String paramName) |
static java.lang.String |
getPredictionCol() |
static <T> boolean |
hasDefault(Param<T> param) |
static boolean |
hasParam(java.lang.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<java.lang.String> |
labelCol() |
static RegressionEvaluator |
load(java.lang.String path) |
Param<java.lang.String> |
metricName()
Param for metric name in evaluation.
|
static Param<?>[] |
params() |
static Param<java.lang.String> |
predictionCol() |
static void |
save(java.lang.String path) |
static <T> Params |
set(Param<T> param,
T value) |
protected static Params |
set(ParamPair<?> paramPair) |
protected static Params |
set(java.lang.String param,
java.lang.Object value) |
protected static <T> Params |
setDefault(Param<T> param,
T value) |
protected static Params |
setDefault(scala.collection.Seq<ParamPair<?>> paramPairs) |
RegressionEvaluator |
setLabelCol(java.lang.String value) |
RegressionEvaluator |
setMetricName(java.lang.String value) |
RegressionEvaluator |
setPredictionCol(java.lang.String value) |
static java.lang.String |
toString() |
java.lang.String |
uid()
An immutable unique ID for the object and its derivatives.
|
static void |
validateParams() |
static MLWriter |
write() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
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 RegressionEvaluator(java.lang.String uid)
public RegressionEvaluator()
public static RegressionEvaluator load(java.lang.String path)
public static java.lang.String toString()
public static Param<?>[] params()
public static void validateParams()
public static java.lang.String explainParam(Param<?> param)
public static java.lang.String explainParams()
public static final boolean isSet(Param<?> param)
public static final boolean isDefined(Param<?> param)
public static boolean hasParam(java.lang.String paramName)
public static Param<java.lang.Object> getParam(java.lang.String paramName)
protected static final Params set(java.lang.String param, java.lang.Object value)
public static final <T> scala.Option<T> get(Param<T> param)
public static final <T> T getOrDefault(Param<T> param)
protected static final <T> T $(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<java.lang.String> predictionCol()
public static final java.lang.String getPredictionCol()
public static final Param<java.lang.String> labelCol()
public static final java.lang.String getLabelCol()
public static void save(java.lang.String path) throws java.io.IOException
java.io.IOException
public static MLWriter write()
public java.lang.String uid()
Identifiable
public Param<java.lang.String> metricName()
"rmse"
(default): root mean squared error
- "mse"
: mean squared error
- "r2"
: R^2^ metric
- "mae"
: mean absolute error
public java.lang.String getMetricName()
public RegressionEvaluator setMetricName(java.lang.String value)
public RegressionEvaluator setPredictionCol(java.lang.String value)
public RegressionEvaluator setLabelCol(java.lang.String value)
public double evaluate(Dataset<?> dataset)
Evaluator
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