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

[MRG] fix for issue #524 set max_attempts=1 when deterministic initial condition provided #525

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

r-millington
Copy link

@r-millington r-millington commented Aug 28, 2024

Fixes #524

Bug occurs when a deterministic initial condition is specified in k-shape, rather than using random initialisation. If the initial condition supplied results in the EmptyClusterError being triggered ("Resumed because of empty cluster"), the model is fitted again with the same initial condition until max attempts = 10. As this initial condition is not random, the same result is achieved each time. This means the code is unnecessarily slow. Max_attempts cannot be controlled externally (line 207).

To fix this bug, code changed so that: max_attempts=1 when a deterministic initial condition is provided. Max_attempts still set the same way when a deterministic initial conditions is not provided.

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.

K-shape with specified initial condition runs the same initial condition until max attempts = 10
1 participant