lib/rumale/evaluation_measure/precision.rb in rumale-0.13.8 vs lib/rumale/evaluation_measure/precision.rb in rumale-0.14.0

- old
+ new

@@ -31,11 +31,11 @@ # # @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) - check_label_array(y_true) - check_label_array(y_pred) + y_true = check_convert_label_array(y_true) + y_pred = check_convert_label_array(y_pred) case @average when 'binary' precision_each_class(y_true, y_pred).last when 'micro'