Skip to content

[FIX] PythagoreanTree: Fix crushing when number of classes decreases#4743

Merged
janezd merged 1 commit intobiolab:masterfrom
aturanjanin:pythagorastree
May 8, 2020
Merged

[FIX] PythagoreanTree: Fix crushing when number of classes decreases#4743
janezd merged 1 commit intobiolab:masterfrom
aturanjanin:pythagorastree

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