Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix sam_knn.py variable name for reset #281

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ginop
Copy link

@ginop ginop commented Oct 28, 2020

As presented here, #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 [BUG] SAMKNNClassifier cannot be reset #272

Checklist

Implementation

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

Tests

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

ginop and others added 2 commits October 28, 2020 12:42
As presented here, scikit-multiflow#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.
@codecov
Copy link

codecov bot commented Oct 28, 2020

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%> (ø)

@ginop
Copy link
Author

ginop commented Mar 5, 2021

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] SAMKNNClassifier cannot be reset
2 participants