I used the Glass Identification Database from the UC Irvine Machine Learning Repository (http://archive.ics.uci.edu/ml/datasets/Glass+Identification). The data contains 214 entries with 11 attributes. These attributes were: entry ID, Refractive Index of the sample, Sodium content, Magnesium content, Aluminum content, Silicon content, Potassium content, Calcium content, Barium content, and Iron content of the sample, and the type of glass it is associated with.
I started by processing the data, selecting specific attributes for analysis, visualizing the data, and then transforming the values for classification. I first created a classification tree with a set of train data. I was able to create an 11-terminal node decision tree. Alternatively, I implemented a k-NN algorithm that produced a black-box model that classifies data nodes based on its nearest neighbors. Using the K-Fold Cross Validation technique, I eliminated possible k-values and finalized a single-nearest-neighbor algorithm.
Comparing these two models, I observed that the k-NN model has a higher level of accuracy on the prediction of glass types.