6.4 Basic Logistic Regression Model
After analysing the logistic equation, let’s delve into our diabetes classification example (Example 6.4) to explore logistic regression and evaluate its effectiveness in accurately classifying the target value.
In logistic regression, we calculate the probability of each data point
using the logistic function, which is based on the beta coefficients and
essentially develops a sigmoid curve. Let’s start by randomly assigning beta
coefficients ( = -
,
=
). We have set the threshold value at 0.5, calculated the predicted
probability for each data point using the logistic function and constructed
a sigmoid curve, which we refer to as Model 1. In this context, if the model generates a predicted probability value
below 0.5, we classify the outcome
=
as non-diabetic. Conversely, if the model produces a value equal to or
greater than 0.5, we classify the outcome
=
as diabetic.
Now, let’s assess the…