Fix sam_knn.py variable name for reset
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_sizetomax_window_sizeon all three uses inSAMKNNClassifier.__init__(). - Change
expected_infointest_sam_knn_coverageto reflect corrected value formax_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%).
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%> (ø) |
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?