My ML Playground
My place to play around with machine learning and data science to learn and more importantly have fun :)
Notebooks
- autoencoder_anomaly_detection: Anomaly-detection in strings using an autoencoder.
- mnist_dpsgd: Evaluation of the differential private stochastic gradient descent in tensorflow-privacy on the mnist dataset.
- input_generator_keras_model: In this notebook I experiment how to use generators as input for a keras model.
- keras_hyperparameter_tuning_tensorboard_hparams: In this notebook I use for the first time Tensorboard and HParams with a simple Keras model. The TensorBoard can be found here.
- generalize_keras_hyperparameter_tuning_tensorboard_hparams: Using TensorBoard with HParamsPlugin and track custom metrics.
- adaboost_custom_sklearn_classifier: Example of using sklearn's adaboost metaclassfier with a custom sklearn classifier.
- adaboost_custom_sklearn_classifier_keras: Example of using sklearn's adaboost metaclassifier with a custom sklearn classifier, that contains a keras model.
Requirements-Files and Virtual Enviroments
- basic_data_science_requirements: A requirements file with the basic stuff needed for machine learning and data science. This file can be used as a basis for machine learning experiments and data science projects.
Build a virtual enviroment (VE) with the requiremnts from above:
- Create a VE:
python3 -m venv <name of the VE>
# or if you use pyenv-virtualenv:
pyenv virtualenv <python-version> <name of VE>
# show all VEs in pyenv:
pyenv virtualenvs
- Activate VE:
source <name of the VE>/bin/activate
# and for pyenv-virtualenv:
pyenv activate <name of VE>
# or for convenience create a .python-version-file:
pyenv local <name of VE>
To deactivate the VE just type (don't do it now, the VE must be activated for the following steps):
deactivate
# or in pyenv:
pyenv deactivate
- Install requirements :
pip install -r <name of the requirements file>
- Link VE to Jupyter Notebook
python -m ipykernel install --user --name=<name of the VE>
List all VEs available in Jupyter Notebook:
jupyter kernelspec list
Delete Link from VE to Jupyter Notebook
jupyter kernelspec uninstall <name of the VE>
- Delete VE from the system:
rm -r <path to VE>
# or in pyenv:
pyenv uninstall <name of VE>