org.apache.spark.ml.evaluation
Class BinaryClassificationEvaluator

Object
  extended by org.apache.spark.ml.evaluation.Evaluator
      extended by org.apache.spark.ml.evaluation.BinaryClassificationEvaluator
All Implemented Interfaces:
java.io.Serializable, Params

public class BinaryClassificationEvaluator
extends Evaluator

:: Experimental :: Evaluator for binary classification, which expects two input columns: score and label.

See Also:
Serialized Form

Constructor Summary
BinaryClassificationEvaluator()
           
BinaryClassificationEvaluator(String uid)
           
 
Method Summary
 BinaryClassificationEvaluator 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
 BinaryClassificationEvaluator setLabelCol(String value)
           
 BinaryClassificationEvaluator setMetricName(String value)
           
 BinaryClassificationEvaluator setScoreCol(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

BinaryClassificationEvaluator

public BinaryClassificationEvaluator(String uid)

BinaryClassificationEvaluator

public BinaryClassificationEvaluator()
Method Detail

uid

public String uid()

metricName

public Param<String> metricName()
param for metric name in evaluation

Returns:
(undocumented)

getMetricName

public String getMetricName()

setMetricName

public BinaryClassificationEvaluator setMetricName(String value)

setScoreCol

public BinaryClassificationEvaluator setScoreCol(String value)

setLabelCol

public BinaryClassificationEvaluator setLabelCol(String value)

evaluate

public double evaluate(DataFrame dataset)
Description copied from class: Evaluator
Evaluates the output.

Specified by:
evaluate in class Evaluator
Parameters:
dataset - a dataset that contains labels/observations and predictions.
Returns:
metric

copy

public BinaryClassificationEvaluator copy(ParamMap extra)
Description copied from interface: Params
Creates a copy of this instance with the same UID and some extra params. Subclasses should implement this method and set the return type properly.

Specified by:
copy in interface Params
Specified by:
copy in class Evaluator
Parameters:
extra - (undocumented)
Returns:
(undocumented)
See Also:
defaultCopy()