# Random Forest-Based Prediction of the Optimal Solid Ink Density in Offset Lithography
## 2 Theory  
### Methods for Testing the Quality of Printed Matter  
#### 2.1.1 Density Testing  
In the density testing of printed matter, the actual metric measured is the amount of light transmitted or reflected by the ink. This can be expressed by the Lambert-Beer law in the following formula:  
\[D_{\tau}=\lg\frac{\Phi_{i}}{\Phi_{\tau}}=\lg\frac{1}{\tau}=a_{\lambda}\cdot 1\cdot c \tag{1}\]  
where \(D_{\tau}\) is the optical density, \(\Phi_{i}\) is the incident flux, \(\Phi_{\tau}\) is the transmitted flux, \(\tau\) is the optical transmittance ratio, \(c\) is the object concentration, \(1\) is the object thickness, and \(a_{\lambda}\) is the object absorption index.  
Density testing is a method for measuring the absorption of inks at different wavelengths of light using filters. The principle involves using green (G), red (R), and blue (B) filters to isolate red, green, and blue light from white light (the standard light source), and determining the ink's thickness (density) by measuring the light absorbed by cyan (C), magenta (M), and yellow (Y) at different wavelengths [13]. For example, in the case of magenta ink, a densitometer with a green filter is used to measure the ink's ability to absorb green light in the spectrum, thus calculating its thickness and saturation. When no filter is used, the densitometer reflects the absorption capacity of magenta ink across the entire spectrum (white light). The following mathematical formula can be used to represent the principle described above:  
Figure 1: Input parameters used in the field-density prediction model.  
Magenta ink density without green filter:  
\[D_{\text{C}}=\text{lg}\frac{1}{\rho_{\text{C}}}=\text{lg}\frac{\int_{\lambda}S( \lambda)\cdot s(\lambda)\cdot d\lambda}{\int_{\lambda}S(\lambda)\cdot s(\lambda) \cdot\rho_{\text{C}}(\lambda)\cdot d\lambda} \tag{2}\]  
Magenta ink density using a green filter:  
\[D_{\text{CR}}=\text{lg}\frac{1}{\rho_{\text{CR}}}=\text{lg}\frac{\int_{ \lambda}S(\lambda)\cdot s(\lambda)\cdot\tau_{\text{R}}(\lambda)\cdot d\lambda} {\int_{\lambda}S(\lambda)\cdot s(\lambda)\cdot\tau_{\text{R}}(\lambda)\cdot \rho_{\text{C}}(\lambda)\cdot d\lambda} \tag{3}\]  
where \(s(\lambda)\) is the spectral energy distribution, \(\tau_{\text{R}}(\lambda)\) is the spectral transmittance of the filter, \(\rho_{\text{C}}\) is the reflectance of the magenta ink over the whole spectrum, \(\rho_{\text{C}}(\lambda)\) is the spectral reflectance of the magenta color over each wavelength, \(\rho_{\text{CR}}\) is the reflectance of the magenta ink over the filter after absorption, \(D_{\text{C}}\) is the optical density of the magenta ink over the whole spectrum, and \(D_{\text{CR}}\) is the optical density of the magenta ink over the filter.  
Although density testing allows practitioners to directly control the amount of ink in prints, it has several disadvantages. For instance, when print density is controlled, it theoretically only affects the brightness of the color during tone adjustment, without influencing the hue or saturation of the color performance [14]. Conversely, density adjustment cannot be independent of hue and color saturation. After density adjustment, the colorimetric value will also change according to the ink's step reproduction curve. Furthermore, density testing does not align with the human eye's intuitive perception of color change [15]. Even if the density value changes only slightly, the color performance may differ significantly. Therefore, while density testing is effective for measuring ink characteristics and thickness, it also has significant limitations.