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

[ENH] estimators failing test check_non_state_changing_method #2456

Open
8 tasks
TonyBagnall opened this issue Dec 16, 2024 · 1 comment
Open
8 tasks

[ENH] estimators failing test check_non_state_changing_method #2456

TonyBagnall opened this issue Dec 16, 2024 · 1 comment
Labels
enhancement New feature, improvement request or other non-bug code enhancement

Comments

@TonyBagnall
Copy link
Contributor

TonyBagnall commented Dec 16, 2024

Describe the feature or idea you want to propose

check_non_state_changing_method fail normally means that some estimator attribute is being changed in predict/transform. These are probably all related, and require either a fit method if fit is empty is true or some reworking. If we want to keep it like this, we should create an issue and comment it in the file #testing_config

  • "FLUSSSegmenter"
  • "InformationGainSegmenter"
  • "GreedyGaussianSegmenter"
  • "ClaSPSegmenter"
  • "HMMSegmenter"
  • "RSTSF"
  • "QuerySearch"
  • "SeriesSearch"

Last two have a comment
# Keeps length during predict to avoid recomputing means and std of data in fit
# if the next predict calls uses the same query length parameter.
which is fine, but maybe an issue expanding on it?

Describe your proposed solution

fix or create issue

Describe alternatives you've considered, if relevant

No response

Additional context

No response

@TonyBagnall TonyBagnall added the enhancement New feature, improvement request or other non-bug code enhancement label Dec 16, 2024
@TonyBagnall TonyBagnall changed the title [ENH] estimators failing test [ENH] estimators failing test check_non_state_changing_method Dec 16, 2024
@baraline
Copy link
Member

You can remove QuerySearch and SeriesSearch from the list, as they will be replaced in an upcoming PR with simpler and more generic objects.
For example, in QuerySearch, it's used to keep track of the size of the query given during predict. This is to avoid recomputing means and stds of the collection given in fit everytime we call predict. To do so we modify a _previous_query_length parameter during predict, causing the state change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature, improvement request or other non-bug code enhancement
Projects
None yet
Development

No branches or pull requests

2 participants