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] PythagoreanTree: Fix crushing when number of classes decreases #4743

Merged
merged 1 commit into from
May 8, 2020

Conversation

aturanjanin
Copy link
Contributor

Issue

Fixes #4670. The _target_class_index was not resetting when new tree is built hence it was giving an error when the number of classes decreases.

Description of changes

Set _target_class_index to 0 in clear().

Includes
  • Code changes
  • Tests
  • Documentation

@codecov
Copy link

codecov bot commented May 6, 2020

Codecov Report

Merging #4743 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #4743   +/-   ##
=======================================
  Coverage   83.69%   83.69%           
=======================================
  Files         275      275           
  Lines       55620    55621    +1     
=======================================
+ Hits        46551    46552    +1     
  Misses       9069     9069           

@janezd janezd self-assigned this May 7, 2020
@janezd janezd merged commit 4015391 into biolab:master May 8, 2020
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.

Pythagorean Tree crashes when the number of classes decreases
2 participants