International Journal of Computer Applications |
Foundation of Computer Science (FCS), NY, USA |
Volume 186 - Number 13 |
Year of Publication: 2024 |
Authors: Ahmad Farhan AlShammari |
10.5120/ijca2024923509 |
Ahmad Farhan AlShammari . Implementation of Logistic Regression using Gradient Descent in Python. International Journal of Computer Applications. 186, 13 ( Mar 2024), 41-46. DOI=10.5120/ijca2024923509
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.