-
Notifications
You must be signed in to change notification settings - Fork 23
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
ModuleNotFoundError: No module named 'sklearn.ensemble.forest' #5
Comments
Hi Jainy, If you run |
Hi,
Please see my responses below:
In your terminal, if you directly run python, then from sklearn.ensemble import RandomForestClassifier does any error show up?
No errors.
If you run conda install numpy scikit-learn pandas -y, does this solve your problem?
Tried that. It said packages are already installed. It did not solve the problem.
Also, which version of python are you using?
Python 3.7.5
Thank you! Please let me know if you need any other info.
Best,
Jainy
… On Mar 16, 2021, at 6:20 PM, Simon C Chu ***@***.***> wrote:
Hi Jainy,
In your terminal, if you directly run python, then from sklearn.ensemble import RandomForestClassifier does any error show up?
If you run conda install numpy scikit-learn pandas -y, does this solve your problem? Also, which version of python are you using?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#5 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ACBG7QHEHGKOIKVEZFVRZ4DTD7YWXANCNFSM4ZJNILVQ>.
|
It looks like an scikit-learn version issue (https://stackoverflow.com/questions/65758102/no-module-name-sklearn-forest-ensemble). Sorry for the trouble caused. I need to set the specific versions of the packages. |
Thank you for helping me!
I uninstalled the 0.24 version and installed 0.21.3 version using pip. pip install -U scikit-learn==0.21.3
It gave me some errors. So tried installing with conda conda install -c conda-forge scikit-learn==0.21.3
Now I see this warning (see below).
/home/jainy/miniconda3/lib/python3.7/site-packages/sklearn/base.py:306: UserWarning: Trying to unpickle estimator DecisionTreeClassifier from version 0.18.1 when using version 0.21.3. This might lead to breaking code or invalid results. Use at your own risk.
UserWarning)
/home/jainy/miniconda3/lib/python3.7/site-packages/sklearn/base.py:306: UserWarning: Trying to unpickle estimator RandomForestClassifier from version 0.18.1 when using version 0.21.3. This might lead to breaking code or invalid results. Use at your own risk.
UserWarning)
Thank you
Jainy
… On Mar 17, 2021, at 7:36 PM, Simon C Chu ***@***.***> wrote:
It looks like an scikit-learn version issue (https://stackoverflow.com/questions/65758102/no-module-name-sklearn-forest-ensemble <https://stackoverflow.com/questions/65758102/no-module-name-sklearn-forest-ensemble>).
Would you please try on with
pip install -U scikit-learn==0.21.3
Sorry for the trouble caused. I need to set the specific versions of the packages.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#5 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ACBG7QHNT4FNAHYWUZCWGY3TEFKK7ANCNFSM4ZJNILVQ>.
|
Jainy, have you gotten the expected results with the warnings? Otherwise, need to use version 0.18.1 from which the model is trained. I will update in the README and bioconda to the specific version. |
Hi Simon,
I have the vcf output. I have not compared the genotype generated by xTEa to other tools' genotype output or PCR genotype (unfortunately I don’t have that).
Just to be safe if I decided to 0.18.1 version, I will have to change the python version that I am working with. So I was wondering would it be possible to train the model with the latest version ( user’s version)? Or would it be possible to include the instructions so that users can do by themselves?. I am not sure how difficult it would be to add that feature. But I think it would be a good one to add if possible.
Thank you so much for your help!
Best,
Jainy
… On Mar 18, 2021, at 10:10 PM, Simon C Chu ***@***.***> wrote:
Jainy, have you gotten the expected results with the warnings? Otherwise, need to use version 0.18.1 from which the model is trained.
I will update in the README and bioconda to the specific version.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#5 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ACBG7QGB66ZOUJZO72XOAIDTELFCHANCNFSM4ZJNILVQ>.
|
Thanks @jainy for the suggestion. I will train a new one with the latest version in the next release. Export a training mode is not difficult, just the training data is large. Let me think what's the best way. |
Hi Simon, Traceback (most recent call last): Traceback (most recent call last): I am not sure whether the following errors are causing by "ModuleNotFoundError: No module named 'sklearn.ensemble.forest'". Also, the scikit-learn version that I installed is 0.21.3 and I am using Python 3.7.4. Would you help take a look at that? Thank you so much! Best, |
Did Someone find how to resolve the issue ? |
Thank you very much. This worked very well. |
Please can anyone help me with the solution? ModuleNotFoundError |
I can, but may i know who is this
…On Thu, May 16, 2024, 4:52 AM 1126rejoice ***@***.***> wrote:
Please can anyone help me with the solution? ModuleNotFoundError
ModuleNotFoundError: No module named 'sklearn.ensemble.forest'
—
Reply to this email directly, view it on GitHub
<#5 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ANXRDAWMVCQCGEU2VVBUNNLZCSMXLAVCNFSM4ZJNILV2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMJRGUYDEMZRGEZQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Hi
Sorry, Its me again, Thank you for helping!
Now I have this error now. I installed the latest version of scikit-learn v0.41. But it says "ModuleNotFoundError: No module named 'sklearn.ensemble.forest'" Do you have any recommendation of a particular version for scikit-learn?
Traceback (most recent call last):
File "/home/jainy/software/xTea/xtea/x_TEA_main.py", line 1031, in
pkl_model = gc.load_model_from_file(sf_model)
File "/home/jainy/software/xTea/xtea/x_genotype_classify.py", line 182, in load_model_from_file
pickle_model = pickle.load(file, encoding='latin1')
ModuleNotFoundError: No module named 'sklearn.ensemble.forest'
Thanks again
Jainy
The text was updated successfully, but these errors were encountered: