Class: SvmToolkit::GeometricMean

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

Overview

Defines an Evaluator returning the value of geometric mean.

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.



163
164
165
# File 'lib/svm_toolkit/evaluators.rb', line 163

def to_s
  "Geometric mean: #{value}"
end

#valueObject

Returns the geometric mean.



157
158
159
# File 'lib/svm_toolkit/evaluators.rb', line 157

def value
  @cm.geometric_mean
end