Skip to content

Simple n-layer implementation of Logistic Regression using numpy

Notifications You must be signed in to change notification settings

navidpourhadi/Logistic-Regression

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LogisticRegression

In this repo , I tried to implement Logisitc regression from scratch in python. Logistic regression is a statistical model . It is used in various applications such as medical predictions , machine learning , etc. Logistic Regression is a simple form of Neural Networks which classifies data in some categories. It takes an input and passes that through some functions in different layers and finally pass to a sigmoid function in order to predict .

Deep neural network

lots of sciences use neural networks in order to solve their problem . The only thing you need is define random weights and biases for every different features of your data and try to tune your parameters. I implement a simple and required utils which needed to tune your parameters . I also use L2 regularization in order to prevent overfitting . The neural network structure is implemented in n-layer with 'relu' activation function and a 'sigmoid' activation at the end of the network.

Experiment

I tested 'cat vs non-cat' dataset on my code and get below results:

download

you can change the code in 'model.py' and 'n_layer_model.ipynb' based on your dataset and change 'layer_dimensions' of the code to make neural network bigger or smaller , then run the code and try to tune the parameters.

About

Simple n-layer implementation of Logistic Regression using numpy

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published