# Non-Invasive Painting Pigment Classification Through Supervised Machine Learning
## 7 Conclusions  
This study presented a supervised machine learning framework for non-invasive pigment classification based on image data acquired under three spectral modalities: visible light reflectography (VIS), ultraviolet-induced visible fluorescence (UVFC), and near-infrared reflectography (IRFC). Compact statistical descriptors extracted from each modality enabled efficient feature representation, supporting the application of classical classifiers. Among the tested models, the random forest classifier achieved the highest performance in cross-validation (99.30 \(\pm\) 0.15%) and demonstrated strong generalization during external validation on annotated real-world painting samples. The comparative analysis of classification models revealed that simpler methods, such as stochastic gradient descent, logistic regression, and decision trees, were insufficient in modeling the nonlinear and high-dimensional structure of the pigment dataset. These models exhibited either underfitting or overfitting tendencies, resulting in poor predictive performance. In contrast, ensemble learning techniques (random forest and extra trees) and instance-based methods (KNN) achieved significantly better results, confirming their suitability for learning flexible decision boundaries in complex feature spaces. Two classification strategies were examined: a unified-class approach that groups pigment variants into 40 general categories and a subclass-based approach that assigns a distinct label to each pigment formulation, such as transparent, opaque, or mixed with white pigments. While the two approaches achieved identical top-1 accuracy (25.0%) during real-world validation, the subclass-based model consistently outperformed the unified model in top-3 and top-10 metrics. This indicates that subclassing enables the model to better capture subtle differences in spectral and visual properties, which improves its ability to filter out implausible candidates. Although the unified model simplifies the classification scheme, it sacrifices specificity, which is critical for practical applications in heritage science. An error analysis of the predictions highlighted specific limitations. Misclassifications were most prominent among pigment pairs with similar spectral characteristics, particularly ultramarine blue and Prussian blue, whose profiles overlap in the near-infrared and ultraviolet bands. Furthermore, the method showed limited effectiveness in detecting organic lakes and degraded materials, which often lack strong spectral signatures across the available imaging modalities. While the dataset included samples prepared with different binding media, no systematic tests were performed on artificially aged binders or varnishes. These factors may influence spectral behavior and should be considered in future investigations. Another important limitation is the current assumption of a single dominant pigment per image patch. Although this assumption holds in homogeneous regions, it does not reflect the common practice of pigment mixing and layering in historical artworks. While the subclass-based model achieved top-10 accuracy of up to 100% in visually uniform areas, future improvements will require multi-label classification frameworks or spectral unmixing methods capable of resolving complex pigment compositions. Despite these constraints, the results demonstrate that a lightweight and cost-effective imaging setup--based on a high-resolution digital camera and selected optical filters--can provide meaningful pigment identification capabilities. This system offers a scalable, non-destructive, and interpretable alternative to advanced hyperspectral imaging, making it suitable for smaller laboratories and institutions lacking specialized spectroscopic instrumentation. Future research will focus on expanding the training dataset to include a broader range of pigment formulations, artificial aging effects, and layered samples.