JaredJGartner / SB_neoantigen_Models

Other
7 stars 2 forks source link

ModuleNotFoundError: No module named 'sklearn.preprocessing.imputation' #1

Open haoqing12 opened 1 year ago

haoqing12 commented 1 year ago

Hi, It's a useful tool to rank those predicted neoantigen. But I encountered a bug that I am unable to resolve.

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy return func(*args, **kwargs) netMHCstabpan complete Running IEDB immunogenicity score completed IEDB immunogenicity score Scoring MMP models Traceback (most recent call last): File "../src/GenerateScores.py", line 96, in mmpdf = MMP_Model_score(mmpdf) File "/softwares/SB_neoantigen_Models-master/src/prediction_modules.py", line 277, in MMP_Model_score imr_mmp, scstd_mmp, model_mmp = pickle.load(f) ModuleNotFoundError: No module named 'sklearn.preprocessing.imputation'

My sklearn version is 1.0.1. I already changed 'from sklearn.preprocessing import Imputer' to 'from sklearn.impute import SimpleImputer'.

If you might have any suggestions for how I can fix this problem, please tell me.

Thank you for your time and consideration. I look forward to hearing back from you.

Best regards,

haoq

JaredJGartner commented 1 year ago

Hello Haoq,

It seems like you are running a newer of sklearn than was used for this model. Have you tried building your environment using the provided yml? There are instructions for doing so in the instructions.txt file here https://github.com/JaredJGartner/SB_neoantigen_Models

Jared