|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object org.apache.spark.ml.evaluation.Evaluator org.apache.spark.ml.evaluation.RegressionEvaluator
public final class RegressionEvaluator
:: Experimental :: Evaluator for regression, which expects two input columns: prediction and label.
Constructor Summary | |
---|---|
RegressionEvaluator()
|
|
RegressionEvaluator(String uid)
|
Method Summary | |
---|---|
RegressionEvaluator |
copy(ParamMap extra)
Creates a copy of this instance with the same UID and some extra params. |
double |
evaluate(DataFrame dataset)
Evaluates the output. |
String |
getMetricName()
|
Param<String> |
metricName()
param for metric name in evaluation (supports "rmse" (default), "mse" , "r2" , and "mae" ) |
RegressionEvaluator |
setLabelCol(String value)
|
RegressionEvaluator |
setMetricName(String value)
|
RegressionEvaluator |
setPredictionCol(String value)
|
String |
uid()
|
Methods inherited from class org.apache.spark.ml.evaluation.Evaluator |
---|
evaluate |
Methods inherited from class Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.spark.ml.param.Params |
---|
clear, copyValues, defaultCopy, defaultParamMap, explainParam, explainParams, extractParamMap, extractParamMap, get, getDefault, getOrDefault, getParam, hasDefault, hasParam, isDefined, isSet, paramMap, params, set, set, set, setDefault, setDefault, setDefault, shouldOwn, validateParams |
Constructor Detail |
---|
public RegressionEvaluator(String uid)
public RegressionEvaluator()
Method Detail |
---|
public String uid()
public Param<String> metricName()
"rmse"
(default), "mse"
, "r2"
, and "mae"
)
Because we will maximize evaluation value (ref: CrossValidator
),
when we evaluate a metric that is needed to minimize (e.g., "rmse"
, "mse"
, "mae"
),
we take and output the negative of this metric.
public String getMetricName()
public RegressionEvaluator setMetricName(String value)
public RegressionEvaluator setPredictionCol(String value)
public RegressionEvaluator setLabelCol(String value)
public double evaluate(DataFrame dataset)
Evaluator
evaluate
in class Evaluator
dataset
- a dataset that contains labels/observations and predictions.
public RegressionEvaluator copy(ParamMap extra)
Params
copy
in interface Params
copy
in class Evaluator
extra
- (undocumented)
defaultCopy()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |