Coursework 1:
Statistical Analysis &
Modelling.
Decision Trees
Albert Savill 3505901
, Table of Contents
Table Of Figures.....................................................................................................................................2
1. Introduction.......................................................................................................................................3
2. Literature Review...............................................................................................................................3
3.1 Decision Trees..................................................................................................................................4
3.2 Information Gain and Entropy.....................................................................................................4
3.3 ID3 Algorithm...............................................................................................................................4
4. Implementation & Results.................................................................................................................5
5. Visualisation.......................................................................................................................................8
6. Conclusion.......................................................................................................................................11
7. References.......................................................................................................................................12
Appendix – Rest of Data Observations................................................................................................13
Table Of Figures
- Figure 1: Snippet of iris data sets.........................................................................................................5
- Figure 2: Next steps in finding samples...............................................................................................6
- Figure 3: Increasing number of samples.............................................................................................6
- Figure 4: Train and test set.................................................................................................................6
- Figure 5: Error......................................................................................................................................7
- Figure 6: Error solution and early decision tree model development..................................................7
- Figure 7: Prediction classification task.................................................................................................8
- Figure 8: Code used for visualisation..................................................................................................8
- Figure 9: plot(dtm)...............................................................................................................................9
- Figure 10: text(dtm).............................................................................................................................9
- Figure 11: rpart.plot(dtm).................................................................................................................10
- Figure 12: rpart.plot(dtm, type = 4, extra = 101)...............................................................................11
Statistical Analysis &
Modelling.
Decision Trees
Albert Savill 3505901
, Table of Contents
Table Of Figures.....................................................................................................................................2
1. Introduction.......................................................................................................................................3
2. Literature Review...............................................................................................................................3
3.1 Decision Trees..................................................................................................................................4
3.2 Information Gain and Entropy.....................................................................................................4
3.3 ID3 Algorithm...............................................................................................................................4
4. Implementation & Results.................................................................................................................5
5. Visualisation.......................................................................................................................................8
6. Conclusion.......................................................................................................................................11
7. References.......................................................................................................................................12
Appendix – Rest of Data Observations................................................................................................13
Table Of Figures
- Figure 1: Snippet of iris data sets.........................................................................................................5
- Figure 2: Next steps in finding samples...............................................................................................6
- Figure 3: Increasing number of samples.............................................................................................6
- Figure 4: Train and test set.................................................................................................................6
- Figure 5: Error......................................................................................................................................7
- Figure 6: Error solution and early decision tree model development..................................................7
- Figure 7: Prediction classification task.................................................................................................8
- Figure 8: Code used for visualisation..................................................................................................8
- Figure 9: plot(dtm)...............................................................................................................................9
- Figure 10: text(dtm).............................................................................................................................9
- Figure 11: rpart.plot(dtm).................................................................................................................10
- Figure 12: rpart.plot(dtm, type = 4, extra = 101)...............................................................................11