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). |
Param<?>[] |
params()
Returns all params sorted by their names.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
clear, copyValues, defaultCopy, explainParam, explainParams, extractParamMap, extractParamMap, get, getDefault, getOrDefault, getParam, hasDefault, hasParam, isDefined, isSet, set, set, set, setDefault, setDefault, shouldOwn
toString, uid
public abstract Evaluator copy(ParamMap extra)
Params
defaultCopy()
.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.