public abstract class Evaluator extends Object implements Params
Constructor and Description |
---|
Evaluator() |
Modifier and Type | Method and Description |
---|---|
abstract Evaluator |
copy(ParamMap extra)
Creates a copy of this instance with the same UID and some extra params.
|
abstract double |
evaluate(DataFrame dataset)
Evaluates the output.
|
double |
evaluate(DataFrame dataset,
ParamMap paramMap)
Evaluates model output and returns a scalar metric (larger is better).
|
boolean |
isLargerBetter()
Indicates whether the metric returned by
evaluate() should be maximized (true, default)
or minimized (false). |
equals, 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, uid
public double evaluate(DataFrame dataset, ParamMap paramMap)
dataset
- a dataset that contains labels/observations and predictions.paramMap
- parameter map that specifies the input columns and output metricspublic abstract double evaluate(DataFrame dataset)
dataset
- a dataset that contains labels/observations and predictions.public boolean isLargerBetter()
evaluate()
should be maximized (true, default)
or minimized (false).
A given evaluator may support multiple metrics which may be maximized or minimized.