Logistic Regression with Diabetic Detector Website?Project
Logistic Regression is a Machine Learning algorithm which is used for the classification problems, it is a predictive analysis algorithm and based on the concept of probability.
As shown in the picture if you are trying to figure out the test will pass or fail; that is known as Logistic regression. Let's see some real-world example
- To predict whether an email is spam (1) or not(0)
- Whether the tumor is malignant (1) or not (0)
- If you are diabetic (1) or not (0)
Consider a scenario where we need to classify whether an email is a spam or not. If we use linear regression for this problem, there is a need for setting up a threshold based on which classification can be done.
Say if the actual class is malignant, predicted continuous value 0.4 and the threshold value is 0.5, the data point will be classified as not malignant which can lead to serious consequence in real-time.
From this example, it can be inferred that linear regression is not suitable for classification problems. Linear regression is unbounded, and this brings logistic regression into the picture. Their value strictly ranges from 0 to 1.
Diabetic Detector Website Project:
To make the learning easier and productive, we are going to learn Logistic Regression by an example of creating a logistic regression model to predict a user is Diabetic or not. First, we are going to collect the dataset and clean it. Then we will create a Logistic regression model with fitting the dataset.
Follow the link to get the interactive cells shows how to do this — https://github.com/explorewithjag/logistic-regression-example-diabetes-detection/blob/master/diabetic_analysis_logistic_regression.ipynb
Finally, after a successive training, it’s our main goal to integrate our machine learning model with the GUIs. You can use Tkinter for making a desktop application as we did in Linear Regression example, but here we are going to integrate it with a web framework i.e Flask, to create a website that will take the input parameters from the user and predict if they are Diabetic or not.
The website will look like:
Part — 2 of the video:
Hope you have enjoyed learning this if so share this with others and for more such contents you can connect with me on
YouTube: https://www.youtube.com/channel/UCmF8qppe02J1ot4Jfwl_lFg
LinkedIn: https://www.dhirubhai.net/in/jagwithyou/
Medium: https://medium.com/@jagwithyou
GitHub: https://github.com/explorewithjag