https://github.com/grantgasser/log-regression-neural-network
Implementing Logistic Regression to predict whether an image is a cat or a dog
https://github.com/grantgasser/log-regression-neural-network
cats-vs-dogs classification logistic-regression neural-network
Last synced: 6 months ago
JSON representation
Implementing Logistic Regression to predict whether an image is a cat or a dog
- Host: GitHub
- URL: https://github.com/grantgasser/log-regression-neural-network
- Owner: grantgasser
- Created: 2018-10-13T03:31:55.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-03-03T00:31:20.000Z (over 6 years ago)
- Last Synced: 2025-02-08T18:14:40.746Z (8 months ago)
- Topics: cats-vs-dogs, classification, logistic-regression, neural-network
- Language: Jupyter Notebook
- Size: 312 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Logisitic Regression in the form of a Neural Network
The point of this model is to write a network from scratch (no Keras, Tensorflow, etc.) to classify images of cats and dogs.
This personal project was inspired by Andrew Ng's [Deep Learning course](https://www.coursera.org/specializations/deep-learning) on Coursera.
I wanted to implement Logistic Regression in the form of neural network (with one layer and one unit) and then build up to a shallow network and then a full network, leveraging deep learning libraries later on to improve performance. They say you have to write a neural network from scratch to fully understand how a neural network works. I have never done the nitty gritty implementation myself. Therefore, I've implemented the critical functions which include propagating through the network, calculating the loss, optimization, prediction, etc.
I used a [dataset](https://www.kaggle.com/c/dogs-vs-cats-redux-kernels-edition/data) from an old Kaggle competition where teams were supposed to develop a model to predict cat or dog.
### Data:
* The original dataset consisted of 25000 images. To simplify things and run on a local Jupyter notebook, I cut it down to 2000 training images and 1000 test images. The comments should explain this process clearly.
* The images were fairly high resolution, but all different. In order to create uniformity, they were reformatted to each be 128x128px.