Skip to content

usamaimdadsian/softmax-mlp-from-scratch

Repository files navigation

Softmax Regression & MLP from Scratch

Table of Contents

About

This GitHub repository contains a project where I have implemented the algorithms for softmax regression and multi-layer perceptron MLP using only the numpy library. The goal of this project was to gain a deeper understanding of these algorithms by building them from scratch, without using any pre-existing machine learning libraries. The repository includes the code for both algorithms, as well as a set of Jupyter notebooks that demonstrate how to use them on MNIST dataset. I hope that this project will be helpful for anyone looking to gain a better understanding of these algorithms and how to implement them using numpy.

Dataset

The dataset tested with the code is MNIST dataset in CSV format. You can get the dataset from this kaggle link.

Once you downloaded the dataset you need to extract the dataset and create a folder name data where csv files should be placed. Directory Structure for the data folder should be like this

Data
|___ mnist_train.csv
|___ mnist_test.csv

Unit Tests

There are some tests defined in the tests folder which can be used to check whether the results of the model are fine are not. To run those tests run the command in following format.

python -m unittest tests.[test_name]

# To check the test for network
python -m unittest tests.test_network

Author

Usama Imdad

Show Your Support

Give a star if this project helped you!

About

Implementing Softmax Regression and MLP from scratch

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published