Open jorgesolerrr opened 8 months ago
This may be because I use an advanced version of numpy
np.int got decrypted in Numpy 1.20, it should be changed to np.int_ or np.int32/64
The following datatypes need to be changed,
np.int
to np.int32
, np.float
to np.float64
and np.bool
to np.bool_
This package needs to be updated. Since its very far behind versions of other packages. And a lot of other functionalities that are not part of conda or pypi package.
Can someone please make a PR with all updates and I'll approve it. Sorry for being so slow.
I am still encountering the same problem Can someone advise how to get around the issue? use some dev version of boruta_py? or downgrade numpy? thanks in advance
For the time being just downgrade numpy.
On Fri, 1 Dec 2023, 11:28 raychan0410, @.***> wrote:
I am still encountering the same problem Can someone advise how to get around the issue? use some dev version of boruta_py? or downgrade numpy? thanks in advance
— Reply to this email directly, view it on GitHub https://github.com/scikit-learn-contrib/boruta_py/issues/122#issuecomment-1835845825, or unsubscribe https://github.com/notifications/unsubscribe-auth/AR6CWL2VN76WPYTZR2ROIELYHGWLPAVCNFSM6AAAAAA6PNEGKSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMZVHA2DKOBSGU . You are receiving this because you commented.Message ID: @.***>
I was able to downgrade numpy to 1.23.5 and it appears to be working. Not the most elegant solution but "solution" is the key word. :)
Yes, someone needs to update this pacakge. Conda/pip still have 0.3 versions.
On Sat, 2 Dec 2023, 02:20 paulgillespie, @.***> wrote:
I was able to downgrade numpy to 1.23.5 and it appears to be working. Not the most elegant solution but "solution" is the key word. :)
— Reply to this email directly, view it on GitHub https://github.com/scikit-learn-contrib/boruta_py/issues/122#issuecomment-1836978452, or unsubscribe https://github.com/notifications/unsubscribe-auth/AR6CWLYRQNWJ2TMKSPRJQR3YHJ66NAVCNFSM6AAAAAA6PNEGKSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMZWHE3TQNBVGI . You are receiving this because you commented.Message ID: @.***>
I prefer not to downgrade numpy. A workaround is to simply manually assign np.int
, np.float
, np.bool
before calling fit()
.
np.int = np.int32
np.float = np.float64
np.bool = np.bool_
boruta = BorutaPy(estimator=rf)
boruta.fit(x, y)
Works for me under the below package versions:
python=3.11.6
numpy=1.26.2
boruta_py=0.3
I want to chime in here. First off, cecilialee's solution worked nicely, so thank you for that.
Browsing the source code on the repo: https://github.com/scikit-learn-contrib/boruta_py/blob/master/boruta/boruta_py.py
I see that this issue has been fixed. If you do a simple ctrl+f, you'll see zero instances of np.int. It seems to have been fixed in the .py file. However, when installing the package into my conda virtual environment (version 0.3 of this package), the error persists because the source code the package is running seems to be an older version.
I'm not an expert on creating python packages, but it seems to be an issue with using the updated source code in the package itself.
I prefer not to downgrade numpy. A workaround is to simply manually assign
np.int
,np.float
,np.bool
before callingfit()
.np.int = np.int32 np.float = np.float64 np.bool = np.bool_ boruta = BorutaPy(estimator=rf) boruta.fit(x, y)
Works for me under the below package versions:
python=3.11.6 numpy=1.26.2 boruta_py=0.3
This worked for me as well! Thanks!
I want to chime in here. First off, cecilialee's solution worked nicely, so thank you for that.
Browsing the source code on the repo: https://github.com/scikit-learn-contrib/boruta_py/blob/master/boruta/boruta_py.py
I see that this issue has been fixed. If you do a simple ctrl+f, you'll see zero instances of np.int. It seems to have been fixed in the .py file. However, when installing the package into my conda virtual environment (version 0.3 of this package), the error persists because the source code the package is running seems to be an older version.
I'm not an expert on creating python packages, but it seems to be an issue with using the updated source code in the package itself.
I've found the same thing. I wonder if this is an issue with one of the modules imported from sklearn and the mismatch is bubbling up:
from sklearn.utils import check_random_state, check_X_y
from sklearn.base import TransformerMixin, BaseEstimator
This happens when the fit method is used