Skip to content

[ENH] Adding categorical support: Raising error in yes/no case#6732

Merged
fkiraly merged 64 commits intosktime:mainfrom
Abhay-Lejith:step3-4_categorical_support
Aug 6, 2024
Merged

[ENH] Adding categorical support: Raising error in yes/no case#6732
fkiraly merged 64 commits intosktime:mainfrom
Abhay-Lejith:step3-4_categorical_support

Conversation

@Abhay-Lejith
Copy link
Copy Markdown
Contributor

@Abhay-Lejith Abhay-Lejith commented Jul 7, 2024

Reference Issues/PRs

Reference umbrella issue comment :#6109 (comment)
This is step 4 mentioned in that comment.

This PR depends on:
#6704 : Adding new categorical tag
#6490 : Feature_kind metadata

i.e this PR requires and contains commits of the above two PRs.

What does this implement/fix? Explain your changes.

Implementation of logic for handling categorical data and raising error appropriately.
Raising error in yes/no case is only in forecasters.
yes/no case - data has categorical , forecaster does not support.
In other modules(except classification), error is raised directly if categorical is present.

Does your contribution introduce a new dependency? If yes, which one?

No.

Did you add any tests for the change?

Yes.

PR checklist

For all contributions
  • The PR title starts with either [ENH], [MNT], [DOC], or [BUG]. [BUG] - bugfix, [MNT] - CI, test framework, [ENH] - adding or improving code, [DOC] - writing or improving documentation or docstrings.

yarnabrina and others added 29 commits February 16, 2024 23:21
(cherry picked from commit cc3d056)
(cherry picked from commit 2de7d8c)
(cherry picked from commit 1477012)
@Abhay-Lejith
Copy link
Copy Markdown
Contributor Author

@fkiraly @yarnabrina please go through the above comment, I have mentioned the PRs this is dependent on.
This draft PR is so I can see what is breaking and you can have a look at how I am handling the categorical and raising the errors.

The main thing here is that all the logic is kept within the _categorical.py file. All that has to be done is calling the _handle_categorical method after the check_is_scitype call in the base file of each module. For now I have done it in forecasting, classification and regression(BasePanelMixin).

@Abhay-Lejith
Copy link
Copy Markdown
Contributor Author

@fkiraly @yarnabrina I think this pr is ready now.

yarnabrina
yarnabrina previously approved these changes Aug 1, 2024
Copy link
Copy Markdown
Member

@yarnabrina yarnabrina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good from my side. This RTD failure is irritating.

@Abhay-Lejith Abhay-Lejith force-pushed the step3-4_categorical_support branch from 86407b1 to c752b9f Compare August 5, 2024 04:05
@fkiraly fkiraly added the module:forecasting forecasting module: forecasting, incl probabilistic and hierarchical forecasting label Aug 5, 2024
@fkiraly fkiraly added the enhancement Adding new functionality label Aug 5, 2024
Copy link
Copy Markdown
Collaborator

@fkiraly fkiraly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test_skforecast_with_categorical seems to be failing with a genuine failure, could you kindly look into that?

I think it is soft dependency isolation not being carried out.

@Abhay-Lejith Abhay-Lejith requested a review from fkiraly August 6, 2024 07:50
@Abhay-Lejith
Copy link
Copy Markdown
Contributor Author

@fkiraly I've removed the base class change of moving the ignore-exog check from this pr. I will open a new pr for it soon.
All tests are passing, the one failure is unrelated, some pickling error due to excessive recursion.
Ready for review now.

Copy link
Copy Markdown
Collaborator

@fkiraly fkiraly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks - fine from my side, then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Adding new functionality module:forecasting forecasting module: forecasting, incl probabilistic and hierarchical forecasting

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants