/my_ml_playground

here I play around with machine learning stuff to learn and have fun

Primary LanguageJupyter Notebook

My ML Playground

My place to play around with machine learning and data science to learn and more importantly have fun :)

Notebooks

  1. Open In Colab autoencoder_anomaly_detection: Anomaly-detection in strings using an autoencoder.
  2. Open In Colab mnist_dpsgd: Evaluation of the differential private stochastic gradient descent in tensorflow-privacy on the mnist dataset.
  3. Open In Colab input_generator_keras_model: In this notebook I experiment how to use generators as input for a keras model.
  4. Open In Colab 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.
  5. Open In Colab generalize_keras_hyperparameter_tuning_tensorboard_hparams: Using TensorBoard with HParamsPlugin and track custom metrics.
  6. Open In Colab adaboost_custom_sklearn_classifier: Example of using sklearn's adaboost metaclassfier with a custom sklearn classifier.
  7. Open In Colab 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

  1. 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:

  1. 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
  1. 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
  1. Install requirements :
pip install -r <name of the requirements file>
  1. 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>
  1. Delete VE from the system:
rm -r <path to VE>
# or in pyenv:
pyenv uninstall <name of VE>