-
-
Notifications
You must be signed in to change notification settings - Fork 352
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
I am facing this issue while importing lazypredict #456
Comments
I have the same issue. |
It seems to be a scikit learn version problem. See https://stackoverflow.com/a/77997362/1473517 . Lazypredict needs updating but I don't know if anyone is still maintaining. |
Actually the problem is with the library, in Pypl, I mean from where we are
installing the library it's * .12 and the problem is in that version, when
I checked on Github, the latest version as *.10 and then I checked the code
it was correct.
And the version *.10 is not available to install with pip. I mean in Pypl.
…On Sun, 22 Sept 2024, 9:40 pm lesshaste, ***@***.***> wrote:
It seems to be a scikit learn version problem. See
https://stackoverflow.com/a/77997362/1473517 . Lazypredict needs updating
but I don't know if anyone is still maintaining.
—
Reply to this email directly, view it on GitHub
<#456 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AZ2V2JWTYYOUG4HBHCDKNHDZX3XHFAVCNFSM6AAAAABOAINYHOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNRWHA3DKMZZGU>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
For a solution, I downgraded sklearn by a few versions of this to 1.4.* if
I'm not wrong.
On Mon, 23 Sept 2024, 12:29 am Muhammad Nouman Khan, <
***@***.***> wrote:
… Actually the problem is with the library, in Pypl, I mean from where we
are installing the library it's * .12 and the problem is in that version,
when I checked on Github, the latest version as *.10 and then I checked the
code it was correct.
And the version *.10 is not available to install with pip. I mean in Pypl.
On Sun, 22 Sept 2024, 9:40 pm lesshaste, ***@***.***> wrote:
> It seems to be a scikit learn version problem. See
> https://stackoverflow.com/a/77997362/1473517 . Lazypredict needs
> updating but I don't know if anyone is still maintaining.
>
> —
> Reply to this email directly, view it on GitHub
> <#456 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AZ2V2JWTYYOUG4HBHCDKNHDZX3XHFAVCNFSM6AAAAABOAINYHOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNRWHA3DKMZZGU>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>
|
Hello, The issue is related to Scikit-learn version changes. From scikit-learn documentation:
It appears they changed the keyword 'sparse' to 'sparse_output'. Edit: |
I got past this issue by installing from git through pip. |
Worst case, just open the file in your error message (~\anaconda3\envs\base_env\Lib\site-packages\lazypredict\Supervised.py:98): File ~\anaconda3\envs\base_env\Lib\site-packages\lazypredict\Supervised.py:98 And errase the Then just restart your kernel if you are within jupyter notebook, and voilá |
Actually, i was importing lazy predict version 0.2.12 and sklearn==1.5.1
i got this issue
TypeError Traceback (most recent call last)
Cell In[4], line 1
----> 1 from lazypredict.Supervised import LazyClassifier
2 from sklearn.model_selection import train_test_split
File ~\anaconda3\envs\base_env\Lib\site-packages\lazypredict\Supervised.py:98
89 # CLASSIFIERS.append(('CatBoostClassifier',catboost.CatBoostClassifier))
91 numeric_transformer = Pipeline(
92 steps=[("imputer", SimpleImputer(strategy="mean")), ("scaler", StandardScaler())]
93 )
95 categorical_transformer_low = Pipeline(
96 steps=[
97 ("imputer", SimpleImputer(strategy="constant", fill_value="missing")),
---> 98 ("encoding", OneHotEncoder(handle_unknown="ignore", sparse=False)),
99 ]
100 )
102 categorical_transformer_high = Pipeline(
103 steps=[
104 ("imputer", SimpleImputer(strategy="constant", fill_value="missing")),
(...)
107 ]
108 )
111 # Helper function
TypeError: OneHotEncoder.init() got an unexpected keyword argument 'sparse'
The text was updated successfully, but these errors were encountered: