International Journal of Computer Applications
Foundation of Computer Science (FCS), NY, USA
|
Volume 186 - Issue 13 |
Published: March 2024 |
Authors: Ahmad Farhan Alshammari |
![]() |
Ahmad Farhan Alshammari . Implementation of Logistic Regression using Gradient Descent in Python. International Journal of Computer Applications. 186, 13 (March 2024), 41-46. DOI=10.5120/ijca2024923509
@article{ 10.5120/ijca2024923509, author = { Ahmad Farhan Alshammari }, title = { Implementation of Logistic Regression using Gradient Descent in Python }, journal = { International Journal of Computer Applications }, year = { 2024 }, volume = { 186 }, number = { 13 }, pages = { 41-46 }, doi = { 10.5120/ijca2024923509 }, publisher = { Foundation of Computer Science (FCS), NY, USA } }
%0 Journal Article %D 2024 %A Ahmad Farhan Alshammari %T Implementation of Logistic Regression using Gradient Descent in Python%T %J International Journal of Computer Applications %V 186 %N 13 %P 41-46 %R 10.5120/ijca2024923509 %I Foundation of Computer Science (FCS), NY, USA
The goal of this research is to develop a logistic regression program using gradient descent in Python. Logistic regression helps to classify data into categories based on the features of samples. Sigmoid function is used to transform values into probabilities and predict the required categories. Gradient descent is used to find the optimal solution that provides the minimum value of error function. The basic steps of linear regression using gradient descent are explained: preparing actual data, initializing weights and bias, computing predicted data, applying sigmoid function, computing cost function, computing partial derivatives, updating weights and bias, computing final prediction, computing confusion matrix, and computing statistical measures. The developed program was tested on an experimental dataset from Kaggle. The program successfully performed the basic steps of logistic regression using gradient descent and provided the required results.