Skip to content

This project contains basic implementations of machine learning models using numpy and scipy's minimize function.

License

Notifications You must be signed in to change notification settings

Mr-MayankThakur/Machine-Learning-Implementations-with-Numpy

Repository files navigation

Machine Learning Implementations with Numpy

GitHub repo size made-with-latex

forthebadge made-with-python

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.

Project structure

├─ 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

Getting started

Installation / Usage

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).

Method 2: Offline

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

Example Notebooks

Univariate Linear Regression

Multi-Variable Linear Regression

Logistic Regression (without regularization)

Logistic Regression (with regularization)

Multi-Class Classification

Regularized Linear Regression and Bias vs Variance

Neural Network Feed Forwarding

Neural Network Complete

Dependency

  • numpy
  • matplotlib
  • scipy
  • seaborn

Tested on Ubuntu 18.04 LTS.

Maintainers

@MayankThakur.

Contributing

Feel free to dive in! Open an issue or submit PRs.

License

License: MIT

This project is licensed under the MIT License - see the LICENSE file for details

Acknowledgments

  • Hat tip to anyone whose code was used
  • Inspiration
  • etc

About

This project contains basic implementations of machine learning models using numpy and scipy's minimize function.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published