### Introduction to Predictive Algorithms  
Research on the prediction of depression makes use of technical jargon unique to the machine learning literature. A brief discussion of commonly encountered concepts is thus needed to cover some recurring terms and methods. In general, a predictive algorithm is the predetermined set of computer instructions for how the data will be processed to ultimately come to the desired predictions. To assess how successful an algorithm is, a measure of the true outcome is measured when possible, or a gold standard within the expert field is used as the \"ground truth\" or ideal expected result. The goal for the prediction is to be as close as possible to this ground truth. For example, the ground truth of whether a person is depressed can be assessed by a clinician or, somewhat less optimally, by a screener survey, independently from the algorithm. The time between the last collected data and the predicted outcome can vary and is henceforth referred to as the prediction horizon. After the instructions are coded, the model is trained. This is typically conducted using cross-validation, randomly splitting the data into folds of training and testing sets. For each fold, model parameters are optimized iteratively by exploring combinations of features. The model trained on each training set will predict the outcome found in each test set. Very little input is required at this stage. To conclude the training, the parameters for all folds are integrated into a unified model. The quality of this unified model is then assessed by applying it to yet-unused data that were put aside from the start and comparing the predictions to the ground truth. Cross-validation is a crucial tool to prevent overfitting. This happens when the model is so fine-tuned to the training data that it loses generalizability to new populations [43]. Other ways to minimize the chances of overfitting include regularization and feature selection. The exact way model performance is assessed depends on the type of prediction it makes. For classification models, performance is commonly assessed using the error matrix and accompanying area under the receiver operator characteristic (AUROC) curve. The error matrix is built up of true (T)/false (F) positives (P)/negatives (N). Then, sensitivity (TP/(TP + FN)), i.e., the proportion of positive cases correctly predicted, and specificity (TN/(TN + FP)), i.e., the proportion of negative cases correctly predicted, are formulated to create the ROC. We obtain the AUROC by taking the integral of this curve, which ranges between 0 and 1, where 0 would mean all outcomes wrongly classified, 0.5 would mean no discriminatory power or similar to random guessing, and 1 would mean all correctly classified. For regression models, to assess performance with AUROC, a threshold is set on the outcome scale to define everything above as positive and below as negative. When no gold standard is present, relative quality measures such as the mean square error and variations on it are used. Generally, the lower the relative quality measure, the better a given model is able to fit a dataset. Finally, one should be aware of the fundamental difference between the statistical modeling encountered in classical epidemiological research and the predictive modeling in wearables research. In classical epidemiology, we build models to remove bias from specific estimates, which we then interpret individually in terms of direction and effect size [44; 45]. These interpretations often rely on statistical assumptions about the data. In predictive modeling, the focus is instead exclusively on achieving more accurate predictions as measured by the metrics described above. Biased relationships are not a problem and can paradoxically be exploited for the purpose of better prediction [46]. Individual associations are irrelevant, as only the performance of all the variables taken together is assessed.