Question
Use Python (Machine Learning) Consider the attached Glass dataset from the UCI machine learning repository: (Below) The study of the classification of types of glass
Use Python (Machine Learning)
Consider the attached Glass dataset from the UCI machine learning repository: (Below)
The study of the classification of types of glass was motivated by criminological investigation. At the scene of the crime, the glass left can be used as evidence if it is correctly identified!
All attributes are continuous.
NOTE: the last column is class identifier (1-7).
Attribute Information:
1. Id number: 1 to 214 (do not use for classification)
2. RI: refractive index
3. Na: Sodium (unit measurement: weight percent in corresponding oxide, as are attributes 4-10)
4. Mg: Magnesium
5. Al: Aluminum
6. Si: Silicon
7. K: Potassium
8. Ca: Calcium
9. Ba: Barium
10. Fe: Iron
Class descriptions:
1 building_windows_float_processed
2 building_windows_non_float_processed
3 vehicle_windows_float_processed
4 vehicle_windows_non_float_processed (none in this database)
5 containers
6 tableware
7 headlamps
Use 5-fold cross-validation to evaluate the classification performance of a decision tree and a random forest classifier.
Describe which classifier gives you the best performance.
Provide:
1. Confusion matrix
2, Sensitivity
3. Specificity
4. Total accuracy
5. F1-score
6. Roc curve
7. Area under the curve in python
1 | 1.52101 | 13.64 | 4.49 | 1.1 | 71.78 | 0.06 | 8.75 | 0 | 0 | 1 |
2 | 1.51761 | 13.89 | 3.6 | 1.36 | 72.73 | 0.48 | 7.83 | 0 | 0 | 1 |
3 | 1.51618 | 13.53 | 3.55 | 1.54 | 72.99 | 0.39 | 7.78 | 0 | 0 | 1 |
4 | 1.51766 | 13.21 | 3.69 | 1.29 | 72.61 | 0.57 | 8.22 | 0 | 0 | 1 |
5 | 1.51742 | 13.27 | 3.62 | 1.24 | 73.08 | 0.55 | 8.07 | 0 | 0 | 1 |
6 | 1.51596 | 12.79 | 3.61 | 1.62 | 72.97 | 0.64 | 8.07 | 0 | 0.26 | 1 |
7 | 1.51743 | 13.3 | 3.6 | 1.14 | 73.09 | 0.58 | 8.17 | 0 | 0 | 1 |
8 | 1.51756 | 13.15 | 3.61 | 1.05 | 73.24 | 0.57 | 8.24 | 0 | 0 | 1 |
9 | 1.51918 | 14.04 | 3.58 | 1.37 | 72.08 | 0.56 | 8.3 | 0 | 0 | 1 |
10 | 1.51755 | 13 | 3.6 | 1.36 | 72.99 | 0.57 | 8.4 | 0 | 0.11 | 1 |
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started