# Recommender System for University Degree Selection:
## 4 Materials and Methods  
It is difficult to anticipate which supervised model will be the one that will achieve a better fit to the data a priori; this condition is known as the No Free Lunch theorem. The algorithms with a greater theoretical prediction capacity have less or no capacity of explaining the relationships between the input and output variables. Thus, four algorithms with different fitting approaches will be used: Random Forest, XGBoost, GLMNET, and KNN. Random Forest (RF) is an ensemble machine learning technique capable of performing classification and regression tasks that involve training many decision trees. The scores of individual trees are combined through a majority vote in the case of classification or by averaging in the case of regression. It has the advantages of no parameter tuning and being robust enough to overfit. Random Forest is efficient when applied to a large amount of data with many attributes and is currently one of the most widely used classification algorithms in the prediction models. Extreme Gradient Boosting, or XGBoost, is an implementation of gradient boosting, an ensemble of decision trees where new trees are trained to predict the residuals of the existing trees. It has become one of the most popular machine learning algorithms due to its good performance and superior speed. XGBoost was originally implemented in C++, and several wrappers for other programming languages are currently offered. Among these, the R implementation used in this study appears to be the most popular because the R package is available as open-source and is actively maintained. K-Nearest Neighbours (KNN) is a non-parametric method for classification and regression tasks. It avoids overfitting, especially with smaller datasets. KNN classifies data points based on their neighbours, making it intuitive and straightforward. It does not assume any data distribution, allowing it to adapt to various data types. KNN is computationally efficient and serves as a baseline for comparing complex algorithms. It is a valuable tool in machine learning, serving as a benchmark for evaluating sophisticated models. Generalised Linear Models Regularised, or GLMNET is a versatile package that implements regularised generalised linear models. It can deal with high-dimensional challenges and can be used for binary classification, multiclass classification, multi-response problems, or time-to-event models. Its implementation uses the coordinate descent approach combined with warm starts, leading to a significant speedup. It is more memory-efficient than the other available techniques that fit LASSO (L1-penalized) models. The implementation used in this study is based on the package from [32]. An important aspect to consider when creating machine learning models is achieving a high model generalisation. Therefore, the algorithms have strategies to achieve robust results and maximise generalisation to avoid overfitting. For example, the GLMNET model uses the Lasso (L1) and Ridge [L2] regularisation techniques, increasing the generalisation capacity of the model. In addition, in the XGBoOST, GLMNET and Random Forest models, a grid search was used to identify the optimal fit of the data (See Table 2). For the decision tree model, the pruning technique involves trimming the branches of the tree that have little importance and are likely to represent noise in the data. Consequently, the XGBoOST and Random Forest algorithms internally perform a feature selection process due to their random way of incorporating variables in the creation of trees.