Class: SvmToolkit::OverallAccuracy
- Defined in:
- lib/svm_toolkit/evaluators.rb
Overview
Defines an Evaluator returning the value of overall accuracy.
Instance Method Summary collapse
-
#to_s ⇒ Object
Returns a string naming this evaluator and giving its value.
-
#value ⇒ Object
Returns the overall accuracy, as a percentage.
Methods inherited from Evaluator
ClassPrecision, ClassRecall, FMeasure, Kappa, MatthewsCorrelationCoefficient, #add_result, #better_than?, #display, #initialize
Constructor Details
This class inherits a constructor from SvmToolkit::Evaluator
Instance Method Details
#to_s ⇒ Object
Returns a string naming this evaluator and giving its value.
147 148 149 |
# File 'lib/svm_toolkit/evaluators.rb', line 147 def to_s "Overall accuracy: #{value}%" end |
#value ⇒ Object
Returns the overall accuracy, as a percentage.
141 142 143 |
# File 'lib/svm_toolkit/evaluators.rb', line 141 def value 100 * @cm.overall_accuracy end |