Classification is a supervised machine learning method where the model tries to predict the correct label of a given input data. One of the algorithms used for classification is “Logistic Regression”.
Here, we use the diabetes.csv dataset for classification purposes and you can download the dataset from the link on top of this page. This dataset has 8 features:
“Pregnancies”, “Glucose”, “Blood Pressure”, “Skin Thickness”, “Insulin”, “BMI”, “Diabetes Pedigree Function” and “Age”
And the label for each item in the dataset is whether you have diabetes or not, which has 2 values:
“Diabetic” and “Non-Diabetic”.
In the above form, you enter the values of 8 features and the model returns whether you have diabetes or not in a pop-up form.
Notice that the range of each feature is as below:
0 < Pregnancies < 17
0 < Glucose < 199
0 < Blood Pressure < 122
0 < Skin Thickness < 99
0 < Insulin < 846
0 < BMI < 68
0.07 < Diabetes Pedigree Function < 2.42
21 < Age < 81
The sample code used to train a “Logistic Regression” classification model, is provided in the link on top of this page. Each time you run this form and classification predictions happen, the values will store in the database, and with the link “result” on top of this page, you will see the previous results of the model prediction. Your recent run will be added to the end of this list.