scikit-multiflow icon indicating copy to clipboard operation
scikit-multiflow copied to clipboard

Fix sam_knn.py variable name for reset

Open ginop opened this issue 5 years ago • 2 comments

As presented here, https://github.com/scikit-multiflow/scikit-multiflow/issues/272, SAMKNNClassifier cannot use the reset() method. This seems to be due to the name mismatch between internal variable self.max_wind_size and input argument max_window_size.

max_wind_size does not appear to be referenced anywhere else in the library, so simply editing the name to match max_window_size in SAMKNNClassifier.__init__() may be all the change that is needed to fix this.

Changes proposed in this pull request:

  • Rename max_wind_size to max_window_size on all three uses in SAMKNNClassifier.__init__().
  • Change expected_info in test_sam_knn_coverage to reflect corrected value for max_window_size
  • Fixes https://github.com/scikit-multiflow/scikit-multiflow/issues/272

Checklist

Implementation

  • [x] Implementation is correct (it performs its intended function).
  • [x] Code is consistent with the framework.
  • [x] Code is properly documented.
  • [x] PR description covers ALL the changes performed.
  • [x] Files changed (update, add, delete) are in the PR's scope (no extra files are included).

Tests

  • [x] New functionality is tested.
  • [x] Tests are created for the new functionality or existing tests are updated accordingly.
  • [x] ALL tests pass with no errors.
  • [ ] CI/CD pipelines run with no errors.
  • [x] Test Coverage is maintained (coverage may drop by no more than 0.2%).

ginop avatar Oct 28 '20 16:10 ginop

Codecov Report

Merging #281 into master will not change coverage. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #281   +/-   ##
=======================================
  Coverage   88.20%   88.20%           
=======================================
  Files         156      156           
  Lines       13013    13013           
=======================================
  Hits        11478    11478           
  Misses       1535     1535           
Impacted Files Coverage Δ
src/skmultiflow/lazy/sam_knn.py 95.22% <100.00%> (ø)

codecov[bot] avatar Oct 28 '20 20:10 codecov[bot]

No checks were failed, but two were canceled. As far as I can tell, this was not caused by the PR and the edited code does not need further changes. What should I do to resolve this?

ginop avatar Mar 05 '21 20:03 ginop