# An Interpretable XGBoost Framework for Predicting Oxide Glass Density
## 2 Materials and Methods
### Descriptors  
A crucial subsequent step involves converting the chemical compositions into numerical arrays, known as feature vectors. This process, known as featurization, translates the chemical information into a format understandable by machine learning algorithms. In this study, we constructed feature vectors directly from the glass compositions and evaluated four distinct feature sets.  
The first feature set, hereafter referred to as Compositional, was built from the molar fraction of each constituent element. Initially, each composition was represented by a 118-element vector, where each element corresponds to the fraction of a chemical element in the periodic table, ordered by its atomic number. Since many elements were absent from the glasses in our dataset, a feature selection process was required. First, sparse features were removed: any feature vector element that was zero in over 90% of the dataset entries was eliminated, assuming its predictive influence would be marginal. Second, highly correlated features were removed. A Pearson correlation matrix was computed using the Scikit-learn library, and if the absolute correlation coefficient between a pair of features exceeded 0.95, one of the features was discarded. This two-step procedure reduced the feature vector dimensionality from 118 to 16. The final features are listed in Table S1 (Supplementary Information).  
Individual elements play different roles within the glass network. Therefore, we decided to augment the previous feature set with four additional attributes based on these roles. These attributes are the total molar fraction of network-forming atoms (B, Si, Ge, As, P, Sb, In, TI, Sn, Pb, Se), the total molar fraction of intermediate atoms (Fe, Al, Te,  
Figure 1: Histograms of (**a**) oxygen fraction in the dataset; (**b**) glass densities.  
Se, Mo, W, Bi, V, S), the total molar fraction of anions (O, F), and the total molar fraction of network-modifying atoms (all remaining elements). The classification of atoms into these roles was based on [1]. These attributes were designated as atom type fractions, and the combined feature set was named Atomic types. The features included in this set are detailed in Table S2.  
The third feature set was based on the concept proposed by [PERSON] et al. [17]. In this approach, the feature vector combines compositional attributes with an additional 17 statistical properties derived from the constituent elements, such as average atomic mass, electronegativity, and atomic radii. The full list of these attributes can be found in the original publication [17]. We generated this set using the Matminer library [18]. However, we modified the original implementation by replacing the standard compositional attributes with our previously defined atom type fractions. Following this, the same procedure for removing sparse and highly correlated features was applied. The final feature vector, designated as Meredig, consists of 18 attributes, which are presented in Table S3.  
The final feature set tested was based on the Magpie descriptor [19], which extends the concept proposed by [PERSON] et al. The original descriptor is a comprehensive set of 145 features falling into four categories: stoichiometric, elemental property statistics, electronic structure, and ionic compound attributes. This set was also generated using the Matminer library. We adapted the descriptor by first replacing the original stoichiometric attributes with our atom type fractions. Subsequently, we performed a multi-step feature reduction: we removed attributes deemed less relevant to glass density (e.g., those describing magnetic properties), eliminated sparse features (containing mostly null values), and discarded highly correlated features. This extensive selection process resulted in a final set of 43 attributes, designated as Magpie and summarized in Table S4.