lib/svmkit/base/classifier.rb in svmkit-0.2.8 vs lib/svmkit/base/classifier.rb in svmkit-0.2.9

- old
+ new

@@ -20,9 +20,10 @@ # @param y [Numo::Int32] (shape: [n_samples]) True labels for testing data. # @return [Float] Mean accuracy def score(x, y) SVMKit::Validation.check_sample_array(x) SVMKit::Validation.check_label_array(y) + SVMKit::Validation.check_sample_label_size(x, y) evaluator = SVMKit::EvaluationMeasure::Accuracy.new evaluator.score(y, predict(x)) end end end