Skip to content

Handle empty temporal importance curves for all-stump forests (#3677)#3683

Open
SpiliosDimakopoulos wants to merge 1 commit into
aeon-toolkit:mainfrom
SpiliosDimakopoulos:fix-tic-curves-3677
Open

Handle empty temporal importance curves for all-stump forests (#3677)#3683
SpiliosDimakopoulos wants to merge 1 commit into
aeon-toolkit:mainfrom
SpiliosDimakopoulos:fix-tic-curves-3677

Conversation

@SpiliosDimakopoulos

Copy link
Copy Markdown

No description provided.

@aeon-actions-bot aeon-actions-bot Bot added classification Classification package visualisation Visualisation module labels Jul 25, 2026
@aeon-actions-bot

Copy link
Copy Markdown
Contributor

Thank you for contributing to aeon

I did not find any labels to add based on the title. Please add the [ENH], [MNT], [BUG], [DOC], [REF], [DEP] and/or [GOV] tags to your pull requests titles. For now you can add the labels manually.
I have added the following labels to this PR based on the changes made: [ classification, visualisation ]. Feel free to change these if they do not properly represent the PR.

The Checks tab will show the status of our automated tests. You can click on individual test runs in the tab or "Details" in the panel below to see more information if there is a failure.

If our pre-commit code quality check fails, please run pre-commit locally and push the fixes to your PR branch.

Don't hesitate to ask questions on the aeon Discord channel if you have any.

PR CI actions

These checkboxes will add labels to enable or disable CI functionality for this PR. This may not take effect immediately, and a new commit may be required to run the new configuration.

  • Run pre-commit checks for all files
  • Run mypy typecheck tests
  • Run all pytest tests and configurations
  • Run all notebook example tests
  • Run numba-disabled codecov tests
  • Disable numba cache loading
  • Regenerate expected results for testing
  • Push an empty commit to re-run CI checks

…oolkit#3677)

temporal_importance_curves() raised
'ValueError: not enough values to unpack (expected 2, got 0)' when every
tree in a fitted interval forest was a stump (no internal splits), because
it tried to unpack an empty zip(sorted(...)).

- temporal_importance_curves() now returns ([], []) instead of raising
  when the forest contains no splits.
- plot_temporal_importance_curves() now raises a clear ValueError when
  given empty curves, instead of silently plotting NaN (previously
  np.mean([], axis=0) produced a RuntimeWarning and a NaN dashed line).
- test_tic_curves is now deterministic (random_state=0), since it
  previously could hit this exact edge case flakily depending on the
  random split found in a tiny test forest.
- Added a regression test (test_tic_curves_all_stumps) using a constant
  input series, which deterministically produces an all-stump forest.

Fixes aeon-toolkit#3677
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

classification Classification package visualisation Visualisation module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant