Decision Tree Classifier

posted Originally published at dev.to 1 min read

My poor dad suffers from ckd, maybe performing data analysis on ckd data will allow me to give him some comfort behind the reason for his poor appetite. University of California, Irvine (UCI) has some data on ckd patients, this data contains biomarkers related to ckd along with appetite information. A decision tree is helpful in making sense of such a huge amount of data, it helps reason about the data in a more human-like way, answering yes or no questions at every step, whenever it encounters relevant biomarkers. For example, if hemoglobin is <= 10.25 the patient is likely to report poor appetite.

You can train your model with existing data so that when you pass similar information in the future and it can predict the outcome. sklearn provides a method that does this automatically (no fun), it’s called DecisionTreeClassifier.

You train it with the existing data and then it’s ready to receive data (without the outcome) and give you the outcome. However, different from other methods, this one gives you a decision tree, binary, yes or no splits at every level.

All the dark blue squares are the outcomes where the patient is likely to report poor appetite. Download the full decision tree here: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ben9ui1wxrg6m45rokmn.png

If you read this far, tweet to the author to show them you care. Tweet a Thanks
0 votes

More Posts

Supervised Learning Algorithms: Definitions, Intuition, Assumptions, Pros, Cons & Use Cases

Arnav Singhal - Jul 11

React Native to Machine Learning

Carlos Almonte - Jul 7

Machine Learning Magic: Types, Process & How to Build an AI Program!

Lakhveer Singh Rajput - Jun 26

Unsupervised Learning Algorithms: Definitions, Intuition, Assumptions, Pros, Cons & Use Cases

Arnav Singhal - Jul 18

The Complete Guide to Types of Machine Learning

Arnav Singhal - Jul 10
chevron_left