Skip to main content
. 2021 Nov 2;11(11):e052663. doi: 10.1136/bmjopen-2021-052663

Table 6.

Summary of machine learning algorithms’ description, advantages and disadvantages

Algorithm Description Advantages Disadvantages
LR58 LR is a supervised ML algorithm adopted from linear regression. It can be used for classification problems and finding the probability of an event happening. Fast training, good for small data sets, easy to understand. Not very accurate, not proper for non-linear problems, high chance of overfitting, not flexible to adopt to complex data sets.
DT59 DT is a supervised ML algorithm that solves a problem by transforming the data into a tree representation where each internal node represents an attribute, and each leaf denotes a class label. Easy to understand and interpret, robust to outliers, no standardisation or normalisation required, useful for regression and classification. High chance of overfitting, not suitable for large data sets, adding new samples lead to regeneration of the whole tree.
KNN60 KNN is a supervised and instance-based ML algorithm. It can be used when we want to forecast a label of a new sample based on similar samples with known labels. Different similarity or distance measures such as Euclidean can be used. Simple and easy to understand, easy to implement, no need for training, useful for regression and classification. Memory intensive, costly, slow performance, all training data might be involved in decision-making.
SVM61 SVM is an instance-based and supervised ML technique that generates a boundary between classes known as hyperplane. Maximising the margin between classes is the main goal of this technique. Efficient in high dimensional spaces. Effective when the number of dimensions is greater than the number of samples, long training time, useful for regression and classification. Not suitable for large data sets, not suitable for noisy data sets, Regularisation capabilities which prevent overfitting, handling non-linear data.
GB62 GB is a supervised ML algorithm, which produces a model in the form of an ensemble of weak prediction models, usually DT. GB is an iterative gradient technique that minimises a loss function by iteratively selecting a function that points towards the negative gradient. High accuracy, high flexibility, fast execution, useful for regression and classification, robust to missing values and overfitting. Sensitive to outliers, not suitable for small data sets, many parameters to optimise.
RF63 RF is an ensemble and supervised ML algorithm that is based on the bagging technique, which means that many subsets of data are randomly selected with replacement and each model such as DT is trained using one subset. The output is the average of all predictions of various single models. High accuracy, fast execution, useful for regression and classification, robust to missing values and overfitting. Not suitable for limited data sets, may change considerably by a small change in the data.
NN64 NN is a family of supervised ML algorithms. It is inspired by biological neural network of the human brain. NN consists of input, hidden, output layers and multiple neurons (nodes) carry data from input layer to output layer. Accurate, suitable for complex, non-linear classification and regression problems. Very slow to train and test, requires large amount of data, computationally expensive and prone to overfitting.
DNN65 DNN is a family of supervised ML algorithms. DNN is based on NN where the adjective ‘deep’ comes from the use of multiple layers in the network. Usually having two or more hidden layers counts as DNN. There are some specific training algorithms and architecture such as LSTM, GAN, CNN for DNNs. DNNs provide the opportunity to solve complex problems when the data are very diverse, unstructured and interconnected. High accuracy, features are automatically deduced and optimally tuned, robust to noise, architecture is flexible. Needs very large amount of data, computationally expensive, not easy to understand, no standard theory in selecting the right settings, difficult for less skilled researchers.

CNN, convolutional neural networks; DNN, deep neural networks; DT, decision tree; GAN, generative adversarial networks; GB, gradient boosting; KNN, K-nearest neighbours; LR, logistic regression; LSTM, long-short term memory networks; ML, machine learning; NN, neural networks; RF, random forest; SVM, support vector machine.