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(Dataset<?> dataset)
Evaluates model output and returns a scalar metric.
|
double |
evaluate(Dataset<?> dataset,
ParamMap paramMap)
Evaluates model output and returns a scalar metric.
|
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
toString, uid
public double evaluate(Dataset<?> dataset, ParamMap paramMap)
isLargerBetter
specifies whether larger values are better.
dataset
- a dataset that contains labels/observations and predictions.paramMap
- parameter map that specifies the input columns and output metricspublic abstract double evaluate(Dataset<?> dataset)
isLargerBetter
specifies whether larger values are better.
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.