Don't wanna be here? Send us removal request.
Text
Thank you for patiently reading. Feel free to give any suggestions or comments.
BYE!
#decisiontreeclassifier#decisiontree#machinelearning#algorithms#funwaytolearn#doyouhavediabetes#ohmygod
0 notes
Link
You can refer to the COLAB notebook by clicking here:)
#decisiontreeclassifier#decisiontree#machinelearning#algorithms#funwaytolearn#doyouhavediabetes#ohmygod
0 notes
Text
Decision Tree Classifier #6
FINALLLLLLYYYY!
We can now visualise the data as a decision tree. It uses Image, StringIO and export_graphviz classes.
here is the OUTPUT,
I know this output is not very standard or optimised, but we will deal with the tuned Decision Tree some other time.
0 notes
Text
Decision Tree Classifier #5
The time has finally come when we need to use the DecisionTreeClassifier class and predict the accuracy of the same.��
We can see that the accuracy score of the dataset while applying Decision Tree Classifier is approximately 66%. This model is not very apt in determining whether a person is suffering from diabetes.
Now we draw a confusion matrix as in to determine the number of people suffering from diabetes and number of people not suffering from diabetes.
We can see 111 suffer from diabetes and 49 doesn’t.
#decisiontreeclassifier#decisiontree#machinelearning#algorithms#funwaytolearn#doyouhavediabetes#ohmygod
0 notes
Text
Decision Tree Classifier #4
Since, we have read the dataset, we should perform some functions to reduce the null values and anomalies of the data.
We use dropna() function.
After the dataset is cleaned, we can now divide the dataset into prediction attributes (X) and a target attribute (y)
Now , we apply the train_test_split to divide the dataset into train data and test data. We consider test_size as 0.3, which means 70% train data and 30% test data.
After getting the values for all the four variables, we shape them.
#decisiontreeclassifier#decisiontree#machinelearning#algorithms#funwaytolearn#doyouhavediabetes#ohmygod
0 notes
Photo
Total length of the diabetes dataset
#decisiontreeclassifier#decisiontree#machinelearning#algorithms#funwaytolearn#doyouhavediabetes#ohmygod
0 notes
Text
Decision Tree Classifier #3
Let us start with the implementation NOW!
NOTE: You will require any Python IDE like anaconda navigator or can even use Google Colab. I personally use COLAB and I feel it is much better and handy than any other IDE because you get everything in one place.
First, we do very basic but very important stuff i.e. IMPORT ALL THE REQUIRED CLASSES
Then, we mount the .csv file in google drive and specify the path of the file to be worked on.
Look on the dataset displayed (only first 5 rows in this case),
#decisiontreeclassifier#decisiontree#algorithms#doyouhavediabetes#ohmygod#funwaytolearn#machinelearning
0 notes
Text
Decision Tree Classifier #2
Now that we know what a decision tree is, let’s jump straight into the problem and look upon the dataset that we will use for prediction. That’s right, PREDICTION
We will be using a dataset which will help us to predict whether a person has diabetes or not. WELL, NOW YOU MUST KNOW, WHY #doyouhavediabetes :P
You can find the dataset that I am using on Kaggle.com. I will keep the link below.
https://www.kaggle.com/johndasilva/diabetes
#decisiontree#decisiontreeclassifier#machinelearning#doyouhavediabetes#ohmygod#funwaytolearn#algorithms
0 notes
Text
Decision Tree Classifier #1
A decision tree classifier is a classification model in Machine Learning that predicts the output of a given problem in the form of a tree.
A decision tree includes a root node, also called the origin of the tree, the internal nodes which branches out further into leaf nodes. Once an attribute of a dataset reaches the leaf node, it can now help you in predicting the correct output.
The main purpose of the decision tree classifier is to find the most appropriate prediction attributes one by one from the dataset and accordingly classify/branch the nodes of the tree. This process happen until all the prediction attributes are dealt with and the target attribute is achieved.
Well, did you know!? A decision tree is actually inspired by a real tree!
#decisiontree#decisiontreeclassifier#machinelearning#algorithms#funwaytolearn#doyouhavediabetes#ohmygod
0 notes