Skip to content

Creation of a class Logisticregression that implement logistic regression

Notifications You must be signed in to change notification settings

Lucas-Coussy/Logistic-regression

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Presentation of the project

In this project, I first explain the theory behind the logistic regression model, and then I develop a class that implements it. Finally, I used the digits dataset from sklearn.datasets (I actually kept the digits 0 and 1 to match the scope of my model) to test and evaluate the logistic regression class, and provide two visualizations: one showing the cost function over epochs, and another illustrating the updates of the weights. Those two visualizations can be found below.

It's interesting to note that the highest value form a zero after the model has been trained.

Logistic function


We can see our probabilities $p(x) = \frac{\exp( x^T \beta)}{1 + \exp( x^T \beta)}$ getting updated at each epoch in function of our product $x^T \beta$.

Parameter Updates and Cost Function Visualization


We can see our $\beta$ and our cost function (here our log-likelihood) getting updated over the epochs.

About

Creation of a class Logisticregression that implement logistic regression

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published