# Comparison of Machine Learning Methods in Stochastic Skin Optical Model Inversion
## 2 Materials and Methods
### Machine Learning Models  
The inversion methods we compare are multi-layer perceptron (MLP) [21], convolutional neural network (CNN) [16], stochastic gradient descent regressor (SGD) [22], linear support vector regressor (SVR) [23], and lasso regressor [24].  
The machine learning methods for inversion are selected by following criteria:  
1. Applicability for special characters of hyperspectral data, such as \(\bullet\) nonlinearity, \(\bullet\) sparsity, i.e., some wavelengths have greater significance.
2. Applicability for the dataset and sample size  
The multi-layer perceptron was chosen based on its applicability to nonlinear data [25; 26], which is usually the case when light is scattering in complex media. The convolutional neural network fills both criteria, as it is proven to be good in image [14; 15] and signal regression [16; 17] problems, and it scales well to big datasets. It also takes the structure/shape of the data into account by use of convolution. The stochastic gradient descent regressor is also used in signal regression, and, according to scikit-learn documentation, version 0.23.2 [19], it is also a good fit for the size of our data, which  
\begin{table}
\begin{tabular}{c c c c c c c c c} \hline \hline
**Wavelength (nm)**: & 460, & 461.84, & 464.2, & 466.43, & 468.96, & 471.16, & 473.83, & 476.66, & 479.12, \\  & 481.5, & 483.88, & 486.82, & 489.01, & 491.28, & 494.12, & 496.09, & 498.67, & 501.44, \\  & 504.48, & 506.89, & 509.53, & 512.15, & 514.76, & 517.53, & 520.37, & 523.1, & 525.76, \\  & 528.48, & 531.25, & 534.27, & 536.97, & 539.63, & 542.39, & 545.15, & 547.8, & 550.48, \\  & 553.09, & 555.93, & 558.72, & 561.27, & 564.1, & 566.55, & 569.19, & 571.85, & 575.39, \\  & 579.44, & 582.22, & 584.92, & 587.49, & 590.13, & 592.77, & 595.46, & 598.37, & 600.98, \\  & 603.7, & 606.47, & 609.16, & 612. & 615.07, & 617.84, & 621.01, & 623.53, & 626.28, \\  & 629.25, & 632.06, & 634.8, & 637.95, & 640.51, & 643.59, & 648.48, & 649.04, & 651.97, \\  & 654.93, & 657.75, & 660.5, & 663.63, & 666.51, & 669.53, & 672.59, & 675, & 678.46, \\  & 682.67, & 687.25, & 691.66, & 696.16, & 700.39, & 704.64, & 708.56, & 712.78, & 716.63, \\  & 720.81, & 725.04, & 729.34, & 733.99, & 738.38, & 742.65, & 746.64, & 751.27, & 755.19, \\  & 759.42, & 763.86, & 768.13, & 772.48, & 776.92, & 781.83, & 786.09, & 790.58, & 795.01, \\  & 799.41, & 803.62, & 807.85, & 812.18, & 816.33, & 820.69, & 824.78, & 829.33, & 832.96, \\  & 836.72, & 840.25, & 842.35 & & & & & & \\ \hline \hline \end{tabular}
\end{table}
Table 2: Wavelength of the measured hyperspectral data and the wavelengths used in training data production.  
is in the range of hundreds of thousands pixels. The lasso regressor was chosen based on the first criteria. It is also good for sparse problems [27], which means only some of the input parameters are important. This is the case with spectral data: the spectra will follow the same line in many places, but the differences are found in the wavelength zone of the chromophore of interest. The linear support vector regression was included based on its applicability on pattern recognition [28].  
All machine learning algorithms were either implemented in scikit-learn Python library [19] version 0.20.1 or written by the authors using Python programming language and Tensorflow library [29] version 2.0.0.