lib/svmkit/evaluation_measure/accuracy.rb in svmkit-0.2.9 vs lib/svmkit/evaluation_measure/accuracy.rb in svmkit-0.3.0

- old
+ new

@@ -1,7 +1,8 @@ # frozen_string_literal: true +require 'svmkit/validation' require 'svmkit/base/evaluator' module SVMKit # This module consists of the classes for model evaluation. module EvaluationMeasure @@ -11,10 +12,10 @@ # evaluator = SVMKit::EvaluationMeasure::Accuracy.new # puts evaluator.score(ground_truth, predicted) class Accuracy include Base::Evaluator - # Claculate mean accuracy. + # Calculate mean accuracy. # # @param y_true [Numo::Int32] (shape: [n_samples]) Ground truth labels. # @param y_pred [Numo::Int32] (shape: [n_samples]) Predicted labels. # @return [Float] Mean accuracy def score(y_true, y_pred)