## 3 Materials and Methods
### Partial Least Squares  
The PLS analysis technique is used to compare input and output variables. It was initially designed to deal with multiple regression problems where there needs to be more data, many null values, and multicollinearity. The main objective of PLS is to predict the dependent variable using the independent variable and determine the structure between the two. This regression method allows the identification of underlying factors, which are linear combinations of the dependent variables that best explain the independent variable [49].  
PLS focuses on training the correlation strategy between the X and Y variables by utilizing a specific part of the correlation or covariance matrix. It measures the covariance between multiple variables and creates a new set of variables through optimized linear combinations, aiming to achieve maximum covariance with the least number of dimensions. This reduces the number of input variables, using the covariance of the input data and information of the dependent variable [50].  
The method involves using matrices of variable \(X\) and linear combinations of them along with variable \(Y\). Assuming that \(X\) is an \(n\times p\) matrix and \(Y\) is an \(n\times q\) matrix, the technique works by successfully extracting factors from both variables \(X\) and \(Y\), where the covariance of the extracted factors is the maximum. This technique can also work with multiple response variables, but for this particular model, we will only assume one response variable; \(Y\) is \(n\times 1\), and \(X\) is \(n\times p\).  
This method seeks to find a linear decomposition of \(X\) and \(Y\) that satisfies Equation (4):  
\[X=TP^{T}+E\hskip 28.452756 ptY=UQ^{T}+F \tag{4}\]  
where:  
\[T_{n\times r}=X-\textit{scores}\hskip 28.452756 ptU_{n\times r}=Y-\textit{scores} \tag{5}\]  
\[P_{p\times r}=X-\textit{loadings}\hskip 28.452756 ptQ_{1\times r}=Y-\textit{loadings} \tag{6}\]  
\[E_{n\times p}=X-\textit{residuals}\hskip 28.452756 ptF_{n\times 1}=Y-\textit{residuals} \tag{7}\]  
The linear decomposition is achieved when the algorithms use an iterative process to extract \(X-\textit{scores}\) and \(Y-\textit{scores}\), finding the maximum covariance between \(T\) and \(U\). These scores are successfully extracted, and the number (\(r\)) depends on the \(X\) and \(Y\) range.  
Each \(x-\textit{score}\) is a linear combination of \(X\). Specifically, the first \(X-\textit{score}(t)\) is \(t=Xw\), where \(w\) is an eigenvector corresponding to the first eigenvalue of \(X^{T}YY^{T}X\). Similarly, the first \(y-\textit{score}(u)\) is \(u=Yc\), where \(c\) is the eigenvector corresponding to the first eigenvalue of \(Y^{T}XX^{T}Y\). \(X^{T}\) represents the covariance between \(X\) and \(Y\).  
Once the first factor is extracted, the original values of \(X\) and \(Y\) are deflected with \(X_{1}=X-tt^{T}X\) and \(Y_{1}=Y-tt^{T}Y\). This process is repeated until all possible latent factors of \(t\) and \(u\) are obtained, and \(X\) is reduced to a null matrix. The number of factors obtained depends on the \(X\) range, typically ranging from 3 to 7 factors containing 99% of the variance.  
PLS regression enables the creation of a model with varying dependent and independent variables while accounting for multicollinearity. The model generates new uncorrelated factors, allowing for a robust set even with missing or noisy data. Including the output variable when creating the X factors makes the prediction more precise without the risk of overfitting [50].