You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
MultiTaskLassoCV got an unexpected keyword argument 'normalize' #47
Hi, I'm getting an issue when trying to run this code. As far as I know the data is correclty formatted. The type error relates to some LassCV backend - could someone help me please?
I am running it on both python 3.7.9 and 3.11.2, so hopefully it's not a python issue.
Reacted by Bernardo Chrispim Baron, Emaad Manzoor, Samuel Garcia and aliceolivebrower
I cannot confirm the root cause, but I was able to solve this error by modifying the _MTLassoCV_MatchSpace function.
I accessed the function via this path:
All I did was comment out the lines containing normalize=normalize and replace them with the same line sans normalize=normalize.
Since this modification, I have been able to run SparseSC.fit_fast without errors.
I'm not knowledgeable enough about versioning and compatibility to explain the root cause, but hopefully, this tip will help you get the package operational.
Jack
Reacted by Tom Roderick, Federico Molina and Oliwia Pawelec
Activity
sak-18 commentedon Mar 2, 2023
Same issue. Found any root cause anhtvan?
sak-18 commentedon Mar 2, 2023
https://scikit-learn.org/1.1/modules/generated/sklearn.linear_model.MultiTaskLassoCV.html?highlight=multitasklassocv Looking at this doc seems like normalize argument was deprecated and later removed altogether from scikit-learn 1.2. Downgrading sci-kit-learn should do, I hope for now.
tom-flamelit commentedon Apr 22, 2023
Saketh Vishnubhatla (@sak-18) which version of scikit-learn do you recommend?
samuelgarca commentedon Jun 20, 2023
Has anyone found a solution, I tried to revert Scikit-learn to version 1.0, but I was unsuccessful.
VanAltrades commentedon Sep 12, 2023
Samuel Garcia (@samuelgarca)
I just ran into this unexpected 'normalize' argument as well.
I cannot confirm the root cause, but I was able to solve this error by modifying the
_MTLassoCV_MatchSpacefunction.I accessed the function via this path:
All I did was comment out the lines containing
normalize=normalizeand replace them with the same line sansnormalize=normalize.Since this modification, I have been able to run
SparseSC.fit_fastwithout errors.I'm not knowledgeable enough about versioning and compatibility to explain the root cause, but hopefully, this tip will help you get the package operational.
Jack
MJeremy2017 commentedon Nov 15, 2023
I think the sklearn dependency is obsolete. In the newer version this parameter is already removed
franc703 commentedon Jul 25, 2024
I have done the same as VanAltrades (@VanAltrades) and run the code without any problems. Make sure you normalize the data before.