Closed Eraseri closed 3 years ago
Leaving list of packages here: Package Version
absl-py 0.10.0 aif360 0.3.0 aiohttp 3.6.3 alibi 0.5.8 argon2-cffi 20.1.0 astunparse 1.6.3 async-generator 1.10 async-timeout 3.0.1 attrs 20.3.0 backcall 0.2.0 bleach 3.3.0 blinker 1.4 blis 0.7.4 Brotli 1.0.9 brotlipy 0.7.0 cachetools 4.1.1 catalogue 2.0.4 certifi 2021.5.30 cffi 1.14.5 chardet 3.0.4 click 7.1.2 cloudpickle 1.6.0 colorama 0.4.4 cryptography 3.1.1 cvae 0.0.3 cycler 0.10.0 cymem 2.0.5 dash 1.20.0 dash-core-components 1.16.0 dash-cytoscape 0.3.0 dash-html-components 1.1.3 dash-renderer 1.9.1 dash-table 4.11.3 deap 1.3.1 decorator 4.4.2 defusedxml 0.7.1 dill 0.3.4 entrypoints 0.3 Flask 2.0.1 Flask-Compress 1.10.1 flatbuffers 1.12 future 0.18.2 gast 0.3.3 gevent 21.1.2 google-auth 1.22.1 google-auth-oauthlib 0.4.1 google-pasta 0.2.0 greenlet 1.1.0 grpcio 1.32.0 h5py 2.10.0 idna 2.10 imageio 2.9.0 importlib-metadata 3.10.0 interpret 0.2.5 interpret-core 0.2.5 ipykernel 5.3.4 ipython 7.22.0 ipython-genutils 0.2.0 itsdangerous 2.0.1 jedi 0.17.0 Jinja2 3.0.1 joblib 1.0.1 jsonschema 3.2.0 jupyter-client 6.1.12 jupyter-core 4.7.1 jupyterlab-pygments 0.1.2 Keras-Applications 1.0.8 keras-nightly 2.5.0.dev2021032900 Keras-Preprocessing 1.1.2 kiwisolver 1.3.1 lime 0.2.0.1 llvmlite 0.36.0 machine-learning-datasets 0.1.16.4 Markdown 3.3.2 MarkupSafe 2.0.1 matplotlib 3.2.2 mistune 0.8.4 mkl-fft 1.3.0 mkl-random 1.2.1 mkl-service 2.3.0 mlxtend 0.14.0 multidict 4.7.6 multiprocess 0.70.12.2 murmurhash 1.0.5 nb-conda 2.2.1 nb-conda-kernels 2.3.1 nbclient 0.5.3 nbconvert 6.1.0 nbformat 5.1.3 nest-asyncio 1.5.1 networkx 2.5.1 notebook 6.4.0 numba 0.53.1 numpy 1.20.2 oauthlib 3.1.0 opencv-python 4.5.2.54 opt-einsum 3.3.0 packaging 20.9 pandas 1.2.5 pandocfilters 1.4.3 parso 0.8.2 pathlib2 2.3.5 pathos 0.2.8 pathy 0.6.0 patsy 0.5.1 pickleshare 0.7.5 Pillow 8.3.0 pip 21.1.2 plotly 5.1.0 pox 0.3.0 ppft 1.6.6.4 preshed 3.0.5 prometheus-client 0.11.0 prompt-toolkit 3.0.17 protobuf 3.13.0 psutil 5.8.0 pyasn1 0.4.8 pyasn1-modules 0.2.8 pycebox 0.0.1 pycparser 2.20 pydantic 1.7.4 Pygments 2.9.0 PyJWT 1.7.1 pyOpenSSL 19.1.0 pyparsing 2.4.7 pyreadline 2.1 pyrsistent 0.17.3 PySocks 1.7.1 python-dateutil 2.8.1 pytz 2021.1 PyWavelets 1.1.1 pywin32 227 pywinpty 0.5.7 pyzmq 20.0.0 requests 2.24.0 requests-oauthlib 1.3.0 rsa 4.6 rulefit 0.3.1 SALib 1.4.0.2 scikit-image 0.18.2 scikit-learn 0.22.2.post1 scipy 1.6.2 seaborn 0.11.1 Send2Trash 1.5.0 setuptools 52.0.0.post20210125 shap 0.39.0 six 1.16.0 sklearn-genetic 0.3.0 skope-rules 1.0.1 slicer 0.0.7 smart-open 5.1.0 spacy 3.0.6 spacy-legacy 3.0.6 spacy-lookups-data 1.0.2 srsly 2.4.1 statsmodels 0.10.2 tenacity 7.0.0 tensorboard 2.5.0 tensorboard-data-server 0.6.1 tensorboard-plugin-wit 1.6.0 tensorflow 2.4.1 tensorflow-docs 0.0.02d270bdf7da20b5ccd08e15812e57a174522b3cf- tensorflow-estimator 2.4.0 tensorflow-lattice 2.0.7 termcolor 1.1.0 terminado 0.9.4 testpath 0.5.0 tf-explain 0.2.1 tf-keras-vis 0.5.5 thinc 8.0.7 threadpoolctl 2.1.0 tifffile 2021.6.14 tornado 6.1 tqdm 4.41.1 traitlets 5.0.5 treeinterpreter 0.2.3 typer 0.3.2 typing-extensions 3.7.4.3 urllib3 1.25.11 wasabi 0.8.2 wcwidth 0.2.5 webencodings 0.5.1 Werkzeug 2.0.1 wheel 0.36.2 win-inet-pton 1.1.0 wincertstore 0.2 witwidget 1.7.0 wrapt 1.12.1 xai 0.0.4 xgboost 0.90 yarl 1.6.2 yolk3k 0.9 zipp 3.4.1 zope.event 4.5.0 zope.interface 5.4.0
You have different versions of sklearn
and scipy
than originally used to write and test the repository, and this seems to be the reason the code doesn't work. Often, a version update for one dependency such as scipy
will make some features of another library like sklearn
not work appropriately. You either adapt the code so that it works or you downgrade dependencies so that they don't cause any trouble.
For reference, see the following comparison between the library versions in requirements.txt on the left and the corresponding libraries you have installed on the right.
Incidentally, you also don't have beautifulsoup4 and a different version of requests
installed than the one stated in requirements.txt
. No wonder Chapter 1
code didn't work for you. Therefore, I'm closing issue 3.
I ask kindly that you ensure that you have the exact versions of the libraries installed before you post another issue since I can't guarantee that it will work with any other library versions nor help you debug issues arising from having different ones. You can always employ the Google Colab implementations for each notebook instead.
On chapter 03 I have following problem. Scikit-learn version I have installed is 0.22.2.post1
I printed out model name where it stops (logistic regression)
`for model_name in class_models.keys(): print(model_name) fitted_model = class_models[model_name]['model'].fit(X_train, y_train_class) y_train_pred = fitted_model.predict(X_train.values) if model_name == 'ridge': y_test_pred = fitted_model.predict(X_test.values) else: y_test_prob = fitted_model.predict_proba(X_test.values)[:,1] y_test_pred = np.where(y_test_prob > 0.5, 1, 0) class_models[model_name]['fitted'] = fitted_model class_models[model_name]['probs'] = y_test_prob class_models[model_name]['preds'] = y_test_pred class_models[model_name]['Accuracy_train'] = metrics.accuracy_score(y_train_class, y_train_pred) class_models[model_name]['Accuracy_test'] = metrics.accuracy_score(y_test_class, y_test_pred) class_models[model_name]['Recall_train'] = metrics.recall_score(y_train_class, y_train_pred) class_models[model_name]['Recall_test'] = metrics.recall_score(y_test_class, y_test_pred) if model_name != 'ridge': class_models[model_name]['ROC_AUC_test'] = metrics.roc_auc_score(y_test_class, y_test_prob) else: class_models[model_name]['ROC_AUC_test'] = 0 class_models[model_name]['F1_test'] = metrics.f1_score(y_test_class, y_test_pred) class_models[model_name]['MCC_test'] = metrics.matthews_corrcoef(y_test_class, y_test_pred) logistic
AttributeError Traceback (most recent call last)