Class: SvmToolkit::OverallAccuracy

Inherits:
Evaluator
  • Object
show all
Defined in:
lib/svm_toolkit/evaluators.rb

Overview

Defines an Evaluator returning the value of overall accuracy.

Instance Method Summary collapse

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_sObject

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

#valueObject

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