## 2 Materials and Methods
### Chemometric Modelling  
Classification models relating the molecular descriptors to the GIT permeability at the different pH were built using partial least squares discriminant analysis (PLS-DA) [16; 17].  
This technique represents a generalization of the PLS regression algorithm [18] to discrimination problems and allows the calculation of reliable and stable classification models in the presence of a high number of (even highly correlated) descriptors, when more traditional approaches, such as linear discriminant analysis (LDA [19]), would not be applicable due to ill-conditioning issues hindering the invertibility of the within-class variance/covariance matrix.  
Figure 1: Distribution of the molecules into the two classes according to the different pHs, together with IP-based outcome. Legend: red—low permeability; blue—high permeability.  
However, by transforming a classification problem into a regression one, PLS-DA exploits all the advantages of the PLS algorithm to deal with such ill-conditioning through bilinear modeling. This possibility is mediated by the introduction of a (binary) dummy response **y** that encodes the class membership of the molecules. In particular, in the present study, such a dependent variable is given the value of one if the molecule has high permeability, and zero if it has low permeability. A regression model is then built to relate the matrix of molecular descriptors **X** and the dummy response **y** by means of the PLS algorithm, according to:  
\[\textbf{y}=\textbf{Xb} \tag{1}\]  
where **b** is the vector of regression coefficients.  
PLS can deal with ill-conditioned descriptor matrices since it operates by projecting the data onto a relevant low-dimensional subspace of orthogonal component scores (**T**) having maximum covariance with the response:  
\[\textbf{T}=\textbf{XR} \tag{2}\]  
with **R** being the projection weights. The scores are then the actual predictors for the response:  
\[\textbf{y}=\textbf{Tq} \tag{3}\]  
through the set of coefficients **q** (inner relation), so that Equation (1) is in fact the result of the combination of the relations in (2) and (3), with:  
\[\textbf{b}=\textbf{Rq} \tag{4}\]  
Once the model is built on the training data, the regression coefficients **b** can be used to predict the response for new molecules \(\dot{\textbf{y}}_{\text{new}}\), based on the value of their molecular descriptors \(\textbf{X}_{\text{new}}\):  
\[\dot{\textbf{y}}_{\text{new}}=\textbf{X}_{\text{new}}\textbf{b} \tag{5}\]  
However, differently from their target counterparts, the predicted values of the response will not be binary but real-valued; therefore, there is the need of defining a classification criterion to predict the class-membership of the molecules based on the values of \(\dot{\textbf{y}}_{\text{new}}\). In the case of a two-class problem, such as the one addressed in the present paper, this translates to identifying a threshold value \(\dot{\textbf{y}}_{\text{threshold}}\) for the predicted response, so that if \(\dot{\textbf{y}}_{\text{new}}>\dot{\textbf{y}}_{\text{threshold}}\) the molecule is predicted as high-permeable, whereas if \(\dot{\textbf{y}}_{\text{new}}<\dot{\textbf{y}}_{\text{threshold}}\) its permeability is predicted to be low. To establish such a threshold value, different strategies have been proposed in the literature. In the present study, the probabilistic approach suggested by [PERSON] et al. [20] has been applied.