## 2 Materials and Methods
Algorithm development  
The ML algorithm used was the aforementioned Deep Learning Multilayer Perceptron (or DLMP), which, as explained above, is a special type of artificial neural network consisting of multiple layers of interconnected neurons. First, 'data' is the file with which the model has been trained, i.e., the training corpus, provided by the CORDIOPREV study (Figure S1). This file has 294 rows and 26 columns. Each row represents the data of one patient (of whom 64 developed diabetes), while each column represents a clinical biomarker (BMI, waist circumference, fruit and vegetable intake, age, antihypertensive medication intake, family history of DM, personal history of hyperglyaemia, physical activity, blood levels of HDL cholesterol, and triglycerides) and 11 bacterial taxa. It should be noted that some of these clinical biomarkers had been previously considered in previous studies, such as BMI or age. The file also had identifying columns ('CP_number', 'CP_code' and 'CP'), which were removed as they were not necessary for the development of the model, as well as a column called 'incidence' and another one called'months'. The column 'incidence' takes the value of 1 if'months' is less than 60, and the value of 0 otherwise (since the follow-up period was 60 months, patients with a value of 0 may take more than 60 months to develop T2 DM or may never develop T2 DM at all). The column'months' is the target attribute and represents the number of months it took for the patient to develop T2 DM. The aim of the model is to use these data (which have been collected from real patients) to predict that number of months with future patients. An important aspect of data pre-processing in the development of the predictor models is their normalisation. For this, StandardScaler was used, which transforms the data to have a mean of 0 and a standard deviation of 1 (Figure S2). This normalisation allows the model to give equal weight to all parameters. Moreover, otherwise, since they move in drastically different orders of magnitude, certain ML algorithms, such as the L1 and L2 regularisers, would not work. To increase the available data in order to better train the model, a common ML technique of aggregating 'noise' was employed. This allows an increase in the diversity of the data, avoiding overfitting, but keeping the model within reasonable limits (using a normal distribution on the real data) and the original shape (size) (Figure S3). Subsequently,the real data table and the augmented data, which is 'attributes_combined', were combined with the 'VSTACK' function, and the target attribute was concatenated with itself to have the same size as the training corpus. Subsequently, the training attributes and the target attribute ('months') were randomly split into 2 independent sets. One of them (80%) was used for training the model, while the remaining 20% was used to test the model once trained (Figure S4). Regarding the training of the model (Figure S5), Google Colab was used, which is an online environment that allows the remote use of this specialised hardware. TPU acceleration was also used where available. TPUs, or tensor processing units, are application-specific integrated circuits developed by Google. They are optimised for matrix multiplication (a task involved in neural network training) and for using Google's 'tensorflow' library. If not available, GPU (graphics processing units) acceleration is attempted. Finally, if this is not possible, the acceleration is run on the CPU (central processing unit). The one used to train this model had 334 Gb of RAM and 512 interconnected chips. Once the model was trained, the neural network itself was built (Figure S6). To do this, an instance had to be created as a class, and an empty model had to be created with 'Sequential'. First, the input layer was added with as many neurons as there are parameters (columns). Then, the first hidden (intermediate) layer was added, of type 'Dense', where each and every neuron in this layer is connected to all neurons in the previous layer.