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

- old
+ new

@@ -1,7 +1,8 @@ # frozen_string_literal: true +require 'svmkit/validation' require 'svmkit/base/evaluator' require 'svmkit/evaluation_measure/precision_recall' module SVMKit # This module consists of the classes for model evaluation. @@ -25,10 +26,10 @@ def initialize(average: 'binary') SVMKit::Validation.check_params_string(average: average) @average = average end - # Claculate average precision. + # Calculate average precision. # # @param y_true [Numo::Int32] (shape: [n_samples]) Ground truth labels. # @param y_pred [Numo::Int32] (shape: [n_samples]) Predicted labels. # @return [Float] Average precision def score(y_true, y_pred)