# Use a Numpy Logistic Regression neural network to predict on dog and cat images

While there are machine learning and deep learning libraries, it is always a good idea to have an understanding of how the models are developed in order to enhance the student’s understanding of data science. In this blog post, therefore, I intend to discuss how to create a numpy logistic regression neural network in order to classify dog and cat images. In order to accomplish this task, I have used some of the code from grantgasser’s Github account. I would like to add, however, that the code required modifications before I could get it to work.

I have used Kaggle’s mini cats and dogs dataset on this project, and it can be obtained here:- https://www.kaggle.com/datasets/eduardoanog/minidogsandcats/data

Logistic regression is a binary classification method. It can be modelled as a function that can take in any number of inputs and constrain the output to be between 0 and 1. This means, we can think of Logistic Regression as a one-layer neural network.

I have obtained the code for a numpy logistic regression neural network and have used it to write a program in Kaggle’s neural network, storing it in my account for that data science company.

The first thing that I did was to import the libraries that I would need to execute the program…