It is crucial to know how we could implement the machine learning formulas and methods in computers. Numpy matrices are the special tools perfect for this task. This project contains basic implementations of machine learning models using numpy and scipy's minimize function.
├─ models <- The folder containing basic functions implemented in numpy for the project.
│ │
│ ├─ data_preprocessing.py <- The functions used to prepare/modify the training data.
│ ├─ linear_regression.py <- The functions used to train and analyse the linear regression model.
│ ├─ logistic_regression.py <- The functions used to train and analyse the logistic regression model.
│ └─ neural_network.py <- The functions used to train and analyse the neural network model.
│
├─ Linear Regression <- The folder containing jupyter notebooks and scripts for linear regression.
│
├─ Logistic Regression <- The folder containing jupyter notebooks and scripts for logistic regression.
│
├─ Neural Networks <- The folder containing jupyter notebooks and scripts for neural networks.
│
├─ environment.yml <- The anaconda environment file for the project
└─ README.md <- The readme file for the project, explaining the basics to new developers
The .ipynb files, which are the core of this repository, are interactive Jupyter Notebooks. You can directly use a static, rendered version of the notebook by clicking on it. GitHub has an implemented notebook-viewer. Further you can inspect notebooks on NBviewer by following the links above.
However, for working interactively with the notebooks (recommended), you either have to install Python + Jupyter (e.g. by using Anaconda), clone the repository and start a server. Or start them in an online, interactive environment, such as Binder (see below).
Execute these steps from an Anaconda prompt to get started with this project::
conda env create -f environment.yml -n machine_learning_implementations_with_numpy
conda activate machine_learning_implementations_with_numpy
Multi-Variable Linear Regression
Logistic Regression (without regularization)
Logistic Regression (with regularization)
Regularized Linear Regression and Bias vs Variance
Neural Network Feed Forwarding
- numpy
- matplotlib
- scipy
- seaborn
Tested on Ubuntu 18.04 LTS.
Feel free to dive in! Open an issue or submit PRs.
This project is licensed under the MIT License - see the LICENSE file for details
- Hat tip to anyone whose code was used
- Inspiration
- etc