Package org.apache.spark.ml.evaluation
Class Evaluator
Object
org.apache.spark.ml.evaluation.Evaluator
- All Implemented Interfaces:
- Serializable,- Params,- Identifiable
- Direct Known Subclasses:
- BinaryClassificationEvaluator,- ClusteringEvaluator,- MulticlassClassificationEvaluator,- MultilabelClassificationEvaluator,- RankingEvaluator,- RegressionEvaluator
Abstract class for evaluators that compute metrics from predictions.
- See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionabstract EvaluatorCreates a copy of this instance with the same UID and some extra params.abstract doubleEvaluates model output and returns a scalar metric.doubleEvaluates model output and returns a scalar metric.booleanIndicates whether the metric returned byevaluateshould be maximized (true, default) or minimized (false).Param<?>[]params()Returns all params sorted by their names.Methods inherited from class java.lang.Objectequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.spark.ml.util.IdentifiabletoString, uidMethods inherited from interface org.apache.spark.ml.param.Paramsclear, copyValues, defaultCopy, estimateMatadataSize, explainParam, explainParams, extractParamMap, extractParamMap, get, getDefault, getOrDefault, getParam, hasDefault, hasParam, isDefined, isSet, onParamChange, set, set, set, setDefault, setDefault, shouldOwn
- 
Constructor Details- 
Evaluatorpublic Evaluator()
 
- 
- 
Method Details- 
copyDescription copied from interface:ParamsCreates a copy of this instance with the same UID and some extra params. Subclasses should implement this method and set the return type properly. SeedefaultCopy().
- 
evaluateEvaluates model output and returns a scalar metric. The value ofisLargerBetter()specifies whether larger values are better.- Parameters:
- dataset- a dataset that contains labels/observations and predictions.
- paramMap- parameter map that specifies the input columns and output metrics
- Returns:
- metric
 
- 
evaluateEvaluates model output and returns a scalar metric. The value ofisLargerBetter()specifies whether larger values are better.- Parameters:
- dataset- a dataset that contains labels/observations and predictions.
- Returns:
- metric
 
- 
isLargerBetterpublic boolean isLargerBetter()Indicates whether the metric returned byevaluateshould be maximized (true, default) or minimized (false). A given evaluator may support multiple metrics which may be maximized or minimized.- Returns:
- (undocumented)
 
- 
paramsDescription copied from interface:ParamsReturns all params sorted by their names. The default implementation uses Java reflection to list all public methods that have no arguments and returnParam.
 
-