## 2 Materials and Methods
### Data Preparation  
Ten craniometric measurements were selected from the datasets, and their definitions are reported in Table 1. The measurements were chosen to represent most of the morphology of the human cranium using only a reduced number of variables (to reduce redundancy across measurements); at the same time, the measurements were chosen to account for some cranial traits previously associated with high levels of sexual dimorphism in modern humans (e.g., mastoid and orbital shape [1; 45; 46]. The measurements are shown in Figure 1. Only adult individuals were included in the analysis. The sex attribution in [PERSON]'s dataset is not known with certainty but is estimated based on non-metric traits by the same [PERSON], using a procedure described in [43]. Although it is not ideal to train the model on specimens whose sex is estimated, this choice was necessary due to the difficulties of finding cranial metric datasets of suitable size and with worldwide representation; therefore, this limitation may be reflected in the final model. To balance population representation within the dataset, we removed populations including only one or the other sex. In the UT database, sex information is based on direct identification or on soft tissue estimation--only individuals whose sex is identified directly are included in our dataset--thus, the sex of the individuals included in this dataset is known. To avoid biases during the training and testing phases, in both datasets, the female and male sample size was balanced by randomly reducing the male subsample (originally more abundant). To account for outliers in [PERSON]'s dataset, all the observations that exceed three standard deviations from the mean of at least one of the 10 measurements were removed. Outliers were not removed from the UT dataset because it constitutes the test data and because of the need for evaluating the performance of the eventual model on a realistic variability of the human cranium. Missing data were present in the subset obtained for the UT dataset; those individuals missing 50% of data or more (at least 5 out of 10 measurements) were discarded from the dataset. The other incomplete observations were estimated using Additive Regression, performed using the R package \"Hmisc\" [47]. The percentage of missing data in each measurement did not exceed 7.9%. In both datasets, the 10 linear measurements were adjusted for the isometric effect of size using Mosimann transformation, which weighs each measurement on the geometric mean of all measurements [48]. The geometric mean was included as an additional measurement in both datasets to explicitly represent size. The measurements were then standardised by z-score transformation (scaled to zero mean and unit variance). \begin{table}
\begin{tabular}{l l l} \hline \hline
**Measurement** & **Abbreviation** & **Definition** \\ \hline \multirow{2}{*}{Biauricular breadth} & \multirow{2}{*}{AUB} & The shortest distance across the roots of the zygomatic processes \\  & & \\  & & \\  & & \\  & & \\  & & \\  & & \\ \end{tabular}
\begin{tabular}{l l} Basin-bregma height & BBH \\ \end{tabular} \\  & \multirow{2}{*}{GOL} & The linear distance from glabella to opisthocranion \\  & & along the midsagittal plane \\  & & The linear distance between portion and \\  & & mastoidale points \\  & & NLB \\  & & The maximum breadth of the nasal aperture \\  & & The height from the nasion to the lowest point on \\  & & the rim of the nasal aperture \\  & & The linear distance from dacryon to ectoconchion \\  & & points \\  & & The linear distance between the superior and \\  & & inferior margins of the orbits, measured \\  & & perpendicularly to orbital breadth \\  & & The linear distance from lambda to opisthion \\  & & along the mid-sagittal plane \\  & & The maximum breadth across the zygomatic \\  & & arches, perpendicular to the mid-sagittal plane \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Cranial measurements used in the analysis, abbreviations, and definitions.