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

Fixed catboost and added new tqdm #22

Merged
merged 2 commits into from
May 21, 2023
Merged

Fixed catboost and added new tqdm #22

merged 2 commits into from
May 21, 2023

Conversation

Tialo
Copy link
Contributor

@Tialo Tialo commented May 20, 2023

Hi, I see you've been working on the project, you are doing great job!

Catboost does not have keys of parameters, which weren't passed in initialization, so your _get_tree_num will raise KeyError. My PR fixes it.

from arfs.feature_selection import Leshy
from catboost import CatBoostClassifier
from sklearn.datasets import load_iris


x, y = load_iris(return_X_y=True, as_frame=True)

estimator = CatBoostClassifier()
leshy = Leshy(estimator, n_estimators="auto")
leshy.fit(x, y)

gives KeyError

Also when I was using your module in jupyter notebook, it has been using not fancy looking tqdm. It is easy to fix by using
from tqdm.auto import tqdm which will import nice tqdm if it can, otherwise will use usual version.

@ThomasBury ThomasBury self-assigned this May 21, 2023
@ThomasBury ThomasBury added the bug Something isn't working label May 21, 2023
@ThomasBury ThomasBury merged commit 5009683 into ThomasBury:main May 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants