## 2 Materials and Methods
available on the United States Environmental Protection Agency (EPA) website ([[https://www.epa.gov/comptox-tools/toxicity-estimation-software-tool-test](https://www.epa.gov/comptox-tools/toxicity-estimation-software-tool-test)]([https://www.epa.gov/comptox-tools/toxicity-estimation-software-tool-test](https://www.epa.gov/comptox-tools/toxicity-estimation-software-tool-test)), accessed on 28 June 2024). For the 3D descriptors, geometrical optimization of the chemical structures of the dataset compounds was carried out by employing the quantum chemical semi-empirical PM6 method through ULYSSES [18] on the OCHEM platform. The descriptors were then processed with the in-house open-access software QSAR-Co-X (available at [[https://github.com/ncordeirfcup/QSAR_Co_X_v2](https://github.com/ncordeirfcup/QSAR_Co_X_v2)]([https://github.com/ncordeirfcup/QSAR_Co_X_v2](https://github.com/ncordeirfcup/QSAR_Co_X_v2)), accessed on 4 July 2024), which was specifically designed for developing Multitasking Quantitative Structure-Toxicity Relationship (mt-QSTR) classification models using the Box-Jenkins moving average (BJMA) technique [19]. A detailed description of the BJMA technique, including its applications and scope, can be found elsewhere [16; 19; 20]. Note that the 'QSAR-Co-X' term is derived from Quantitative Structure Activity Relationship with COnditions eXtended version. To begin with, the dataset was split into training (70%) and validation (30%) sets using _k_-means cluster analysis (_k_-MCA), with five clusters and a random state of 42. This method ensures a uniform and representative distribution of the dataset by grouping data points based on diversity derived from the response variable and the calculated descriptors [21; 22; 23]. After the initial split, the BJMA technique was applied to the training set to calculate deviation descriptors using the 'Method-1' option in QSAR-Co-X [19]. This option uses the simplest form of BJMA to calculate the deviation descriptors \(\Delta(D_{i})c_{j}\), as follows:  
\[\Delta(D_{i})c_{j}=D_{i}-\text{avg}(D_{i})c_{j},\text{ where }avg\ (D_{i})c_{j}=\sum_{i=1}^{n(c_{j})}D_{i}/n(c_{j})\]  
Specifically, the new descriptors, i.e., the deviation descriptors, are calculated for a unique experimental condition (ontology), \(c_{j}\), by the difference between the input descriptors (\(D_{i}\)) and the arithmetic mean from positive samples ('toxic', or +1 in our case) associated with a specific element from this ontological condition. This stage yielded a training set with deviation descriptors, while the obtained \(avg(D_{i})c_{j}\) descriptors were also deployed to determine the validation set's deviation descriptors. The training dataset was further divided into a sub-training set (80%) and a test set (20%) using a random seed (42). We then developed the models using solely this sub-training dataset and estimated their external predictive performance using both the test and validation sets. Since the validation set is independent of both descriptor calculation and model development, it provides a true measure of the model's predictive power. In contrast, the test set, while not used for model development, is involved in descriptor calculation. If the test set's predictive accuracy is significantly higher than the validation set's, the model may be biased towards the moving average technique. In such cases, the validation set's prediction becomes more reliable for assessing the model's true external predictive ability. To conclude this phase, prior to model development, a preprocessing step removed highly correlated (>0.95) and near-constant descriptors (variance < 0.001) to improve model performance. **Linear modeling. ** In this study, we employed linear discriminant analysis (LDA) coupled with three feature selection algorithms: fast-stepwise selection (FS), stepwise forward selection (SFS), and genetic algorithm (GA). Each LDA model was limited to a maximum of ten descriptors. FS-LDA models relied on \(p\)-values for feature selection.