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
Top comments (0)