Ensemble learning

Source: Wikipedia, the free encyclopedia.

In

predictive performance than could be obtained from any of the constituent learning algorithms alone.[1][2][3]
Unlike a
statistical ensemble
in statistical mechanics, which is usually infinite, a machine learning ensemble consists of only a concrete finite set of alternative models, but typically allows for much more flexible structure to exist among those alternatives.

Overview

Supervised learning algorithms perform the task of searching through a hypothesis space to find a suitable hypothesis that will make good predictions with a particular problem.[4] Even if the hypothesis space contains hypotheses that are very well-suited for a particular problem, it may be very difficult to find a good one. Ensembles combine multiple hypotheses to form a (hopefully) better hypothesis.

Ensemble learning trains two or more Machine Learning algorithms to a specific classification or regression task. The algorithms within the ensemble learning model are generally referred as “base models”, “base learners” or “weak learners” in literature. The base models can be constructed using a single modelling algorithm or several different algorithms. The idea is train a diverse collection of weak performing models to the same modelling task. As a result, the predicted or classified outcomes of each weak learner have poor predictive ability (high bias, i.e. high model errors) and among the collection of all weak learners the outcome and error values exhibit high variance. Fundamentally, an ensemble learning model trains many (at least 2) high-bias (weak) and high-variance (diverse) models to be combined into a stronger and better performing model. Essentially, it’s a set of algorithmic models — which would not produce satisfactory predictive results individually — that get’s combined or averaged over all base models to produce a single high performing, accurate and low-variance model to fit the task as required.

Ensemble learning typically refers to Bagging (bootstrap-aggregating), Boosting or Stacking/Blending techniques to induce high variability among the base models. Bagging creates diversity by generating random samples from the training observations and fitting the same model to each different sample — also known as “homogeneous parallel ensembles”. Boosting follows an iterative process by sequentially training each next base model on the up-weighted errors of the previous base model’s errors, producing an additive model to reduce the final model errors — also known as “sequential ensemble learning”. Stacking or Blending consists of different base models, each trained independently (i.e. diverse/high variability) to be combined into the ensemble model — producing a “heterogeneous parallel ensemble”. Common applications of ensemble learning include Random Forests (extension of Baggin), Boosted Tree-Models, Gradient Boosted Tree-Models and models in applications of stacking are generally more task-specific — such as combing clustering techniques with other parametric and/or non-parametric techniques. (See here for a comprehensive overview: [5]

The broader term of multiple classifier systems also covers hybridization of hypotheses that are not induced by the same base learner.[citation needed]

Evaluating the prediction of an ensemble typically requires more computation than evaluating the prediction of a single model. In one sense, ensemble learning may be thought of as a way to compensate for poor learning algorithms by performing a lot of extra computation. On the other hand, the alternative is to do a lot more learning on one non-ensemble system. An ensemble system may be more efficient at improving overall accuracy for the same increase in compute, storage, or communication resources by using that increase on two or more methods, than would have been improved by increasing resource use for a single method. Fast algorithms such as decision trees are commonly used in ensemble methods (for example, random forests), although slower algorithms can benefit from ensemble techniques as well.

By analogy, ensemble techniques have been used also in unsupervised learning scenarios, for example in consensus clustering or in anomaly detection.

Ensemble theory

Empirically, ensembles tend to yield better results when there is a significant diversity among the models.[6][7] Many ensemble methods, therefore, seek to promote diversity among the models they combine.[8][9] Although perhaps non-intuitive, more random algorithms (like random decision trees) can be used to produce a stronger ensemble than very deliberate algorithms (like entropy-reducing decision trees).[10] Using a variety of strong learning algorithms, however, has been shown to be more effective than using techniques that attempt to dumb-down the models in order to promote diversity.[11] It is possible to increase diversity in the training stage of the model using correlation for regression tasks [12] or using information measures such as cross entropy for classification tasks.[13]

An ensemble of classifiers usually has smaller classification error than base models.

Theoretically, one can justify the diversity concept because the lower bound of the error rate of an ensemble system can be decomposed into accuracy, diversity, and the other term. [14]

The geometric framework

Ensemble learning, including both regression and classification tasks, can be explained using a geometric framework. [15] Within this framework, the output of each individual classifier or regressor for the entire dataset can be viewed as a point in a multi-dimensional space. Additionally, the target result is also represented as a point in this space, referred to as the "ideal point."

The Euclidean distance is used as the metric to measure both the performance of a single classifier or regressor (the distance between its point and the ideal point) and the dissimilarity between two classifiers or regressors (the distance between their respective points). This perspective transforms ensemble learning into a deterministic problem.

For example, within this geometric framework, it can be proved that the averaging of the outputs (scores) of all base classifiers or regressors can lead to equal or better results than the average of all the individual models. It can also be proved that if the optimal weighting scheme is used, then a weighted averaging approach can outperform any of the individual classifiers or regressors that make up the ensemble or as good as the best performer at least.

Ensemble size

While the number of component classifiers of an ensemble has a great impact on the accuracy of prediction, there is a limited number of studies addressing this problem. A priori determining of ensemble size and the volume and velocity of big data streams make this even more crucial for online ensemble classifiers. Mostly statistical tests were used for determining the proper number of components. More recently, a theoretical framework suggested that there is an ideal number of component classifiers for an ensemble such that having more or less than this number of classifiers would deteriorate the accuracy. It is called "the law of diminishing returns in ensemble construction." Their theoretical framework shows that using the same number of independent component classifiers as class labels gives the highest accuracy.[16][17]

Common types of ensembles

Bayes optimal classifier

The Bayes optimal classifier is a classification technique. It is an ensemble of all the hypotheses in the hypothesis space. On average, no other ensemble can outperform it.[18] The Naive Bayes classifier is a version of this that assumes that the data is conditionally independent on the class and makes the computation more feasible. Each hypothesis is given a vote proportional to the likelihood that the training dataset would be sampled from a system if that hypothesis were true. To facilitate training data of finite size, the vote of each hypothesis is also multiplied by the prior probability of that hypothesis. The Bayes optimal classifier can be expressed with the following equation:

where is the predicted class, is the set of all possible classes, is the hypothesis space, refers to a probability, and is the training data. As an ensemble, the Bayes optimal classifier represents a hypothesis that is not necessarily in . The hypothesis represented by the Bayes optimal classifier, however, is the optimal hypothesis in ensemble space (the space of all possible ensembles consisting only of hypotheses in ).

This formula can be restated using Bayes' theorem, which says that the posterior is proportional to the likelihood times the prior:

hence,

Bootstrap aggregating (bagging)

Three datasets bootstrapped from an original set. Example A occurs twice in set 1 because these are chosen with replacement.

Bootstrap aggregation (bagging) involves training an ensemble on bootstrapped data sets. A bootstrapped set is created by selecting from original training data set with replacement. Thus, a bootstrap set may contain a given example zero, one, or multiple times. Ensemble members can also have limits on the features (e.g., nodes of a decision tree), to encourage exploring of diverse features.[19] The variance of local information in the bootstrap sets and feature considerations promote diversity in the ensemble, and can strengthen the ensemble.[20] To reduce overfitting, a member can be validated using the out-of-bag set (the examples that are not in its bootstrap set).[21]

Inference is done by voting of predictions of ensemble members, called aggregation. It is illustrated below with an ensemble of four decision trees. The query example is classified by each tree. Because three of the four predict the positive class, the ensemble's overall classification is positive. Random forests like the one shown are a common application of bagging.

An example of the aggregation process for an ensemble of decision trees. Individual classifications are aggregated, and an overall classification is derived.
An example of the aggregation process for an ensemble of decision trees. Individual classifications are aggregated, and an overall classification is derived.

Boosting

Boosting involves training successive models by emphasizing training data mis-classified by previously learned models. Initially, all data (D1) has equal weight and is used to learn a base model M1. The examples mis-classified by M1 are assigned a weight greater than correctly classified examples. This boosted data (D2) is used to train a second base model M2, and so on. Inference is done by voting.

In some cases, boosting has yielded better accuracy than bagging, but tends to over-fit more. The most common implementation of boosting is

Adaboost, but some newer algorithms are reported to achieve better results.[citation needed
]

Bayesian model averaging

Bayesian model averaging (BMA) makes predictions by averaging the predictions of models weighted by their posterior probabilities given the data.[22] BMA is known to generally give better answers than a single model, obtained, e.g., via stepwise regression, especially where very different models have nearly identical performance in the training set but may otherwise perform quite differently.

The question with any use of Bayes' theorem is the prior, i.e., the probability (perhaps subjective) that each model is the best to use for a given purpose. Conceptually, BMA can be used with any prior. R packages ensembleBMA[23] and BMA[24] use the prior implied by the Bayesian information criterion, (BIC), following Raftery (1995).[25] R package BAS supports the use of the priors implied by Akaike information criterion (AIC) and other criteria over the alternative models as well as priors over the coefficients.[26]

The difference between BIC and AIC is the strength of preference for parsimony. BIC's penalty for model complexity is , while AIC's is . Large-sample asymptotic theory establishes that if there is a best model, then with increasing sample sizes, BIC is strongly consistent, i.e., will almost certainly find it, while AIC may not, because AIC may continue to place excessive posterior probability on models that are more complicated than they need to be. On the other hand, AIC and AICc are asymptotically “efficient” (i.e., minimum mean square prediction error), while BIC is not .[27]

Haussler et al. (1994) showed that when BMA is used for classification, its expected error is at most twice the expected error of the Bayes optimal classifier.[28] Burnham and Anderson (1998, 2002) contributed greatly to introducing a wider audience to the basic ideas of Bayesian model averaging and popularizing the methodology.[29] The availability of software, including other free open-source packages for R beyond those mentioned above, helped make the methods accessible to a wider audience.[30]

Bayesian model combination

Bayesian model combination (BMC) is an algorithmic correction to Bayesian model averaging (BMA). Instead of sampling each model in the ensemble individually, it samples from the space of possible ensembles (with model weights drawn randomly from a Dirichlet distribution having uniform parameters). This modification overcomes the tendency of BMA to converge toward giving all the weight to a single model. Although BMC is somewhat more computationally expensive than BMA, it tends to yield dramatically better results. BMC has been shown to be better on average (with statistical significance) than BMA and bagging.[31]

Use of Bayes' law to compute model weights requires computing the probability of the data given each model. Typically, none of the models in the ensemble are exactly the distribution from which the training data were generated, so all of them correctly receive a value close to zero for this term. This would work well if the ensemble were big enough to sample the entire model-space, but this is rarely possible. Consequently, each pattern in the training data will cause the ensemble weight to shift toward the model in the ensemble that is closest to the distribution of the training data. It essentially reduces to an unnecessarily complex method for doing model selection.

The possible weightings for an ensemble can be visualized as lying on a simplex. At each vertex of the simplex, all of the weight is given to a single model in the ensemble. BMA converges toward the vertex that is closest to the distribution of the training data. By contrast, BMC converges toward the point where this distribution projects onto the simplex. In other words, instead of selecting the one model that is closest to the generating distribution, it seeks the combination of models that is closest to the generating distribution.

The results from BMA can often be approximated by using cross-validation to select the best model from a bucket of models. Likewise, the results from BMC may be approximated by using cross-validation to select the best ensemble combination from a random sampling of possible weightings.

Bucket of models

A "bucket of models" is an ensemble technique in which a model selection algorithm is used to choose the best model for each problem. When tested with only one problem, a bucket of models can produce no better results than the best model in the set, but when evaluated across many problems, it will typically produce much better results, on average, than any model in the set.

The most common approach used for model-selection is cross-validation selection (sometimes called a "bake-off contest"). It is described with the following pseudo-code:

For each model m in the bucket:
    Do c times: (where 'c' is some constant)
        Randomly divide the training dataset into two sets: A and B
        Train m with A
        Test m with B
Select the model that obtains the highest average score

Cross-Validation Selection can be summed up as: "try them all with the training set, and pick the one that works best".[32]

Gating is a generalization of Cross-Validation Selection. It involves training another learning model to decide which of the models in the bucket is best-suited to solve the problem. Often, a perceptron is used for the gating model. It can be used to pick the "best" model, or it can be used to give a linear weight to the predictions from each model in the bucket.

When a bucket of models is used with a large set of problems, it may be desirable to avoid training some of the models that take a long time to train. Landmark learning is a meta-learning approach that seeks to solve this problem. It involves training only the fast (but imprecise) algorithms in the bucket, and then using the performance of these algorithms to help determine which slow (but accurate) algorithm is most likely to do best.[33]

Amended Cross-Entropy Cost: An Approach for Encouraging Diversity in Classification Ensemble

The most ommon approach for training classifier is using Cross-entropy cost function. However, one would like to train an ensemble of models that have diversity so when we combine them it would provide best results[34].[35] Assuming we use a simple ensemble of averaging classifiers. Then the Amended Cross-Entropy Cost is

where is the cost function of the classifier, is the probability of the classifier, is the true probability that we need to estimate and is a parameter between 0 and 1 that define the diversity that we would like to establish. When we want each classifier to do its best regardless of the ensemble and when we would like the classifier to be as diverse as possible.

Stacking

Stacking (sometimes called stacked generalization) involves training a model to combine the predictions of several other learning algorithms. First, all of the other algorithms are trained using the available data, then a combiner algorithm (final estimator) is trained to make a final prediction using all the predictions of the other algorithms (base estimators) as additional inputs or using cross-validated predictions from the base estimators which can prevent overfitting.[36] If an arbitrary combiner algorithm is used, then stacking can theoretically represent any of the ensemble techniques described in this article, although, in practice, a logistic regression model is often used as the combiner.

Stacking typically yields performance better than any single one of the trained models.[37] It has been successfully used on both supervised learning tasks (regression,[38] classification and distance learning [39]) and unsupervised learning (density estimation).[40] It has also been used to estimate bagging's error rate.[3][41] It has been reported to out-perform Bayesian model-averaging.[42] The two top-performers in the Netflix competition utilized blending, which may be considered a form of stacking.[43]

Voting

Voting is another form of ensembling. See e.g. Weighted majority algorithm (machine learning).

Implementations in statistics packages

  • R: at least three packages offer Bayesian model averaging tools,[44] including the BMS (an acronym for Bayesian Model Selection) package,[45] the BAS (an acronym for Bayesian Adaptive Sampling) package,[46] and the BMA package.[47]
  • Python: scikit-learn, a package for machine learning in Python offers packages for ensemble learning including packages for bagging, voting and averaging methods.
  • MATLAB: classification ensembles are implemented in Statistics and Machine Learning Toolbox.[48]

Ensemble learning applications

In recent years, due to growing computational power, which allows for training in large ensemble learning in a reasonable time frame, the number of ensemble learning applications has grown increasingly.[49] Some of the applications of ensemble classifiers include:

Remote sensing

Land cover mapping

decision trees with boosting,[53] random forest[50][54] and automatic design of multiple classifier systems,[55] are proposed to efficiently identify land cover
objects.

Change detection

The earliest applications of ensemble classifiers in change detection are designed with the majority
maximum posterior probability.[59] Given the growth of satellite data over time, the past decade sees more use of time series methods for continuous change detection from image stacks.[60] One example is a Bayesian ensemble changepoint detection method called BEAST, with the software available as a package Rbeast in R, Python, and Matlab.[61]

Computer security

Distributed denial of service

Malware Detection

Classification of

trojans, ransomware and spywares with the usage of machine learning techniques, is inspired by the document categorization problem.[63] Ensemble learning systems have shown a proper efficacy in this area.[64][65]

Intrusion detection

An

computer systems to identify intruder codes like an anomaly detection process. Ensemble learning successfully aids such monitoring systems to reduce their total error.[66][67]

Face recognition

Face recognition, which recently has become one of the most popular research areas of pattern recognition, copes with identification or verification of a person by their digital images.[68]

Hierarchical ensembles based on Gabor Fisher classifier and

preprocessing techniques are some of the earliest ensembles employed in this field.[69][70][71]

Emotion recognition

While speech recognition is mainly based on deep learning because most of the industry players in this field like Google, Microsoft and IBM reveal that the core technology of their speech recognition is based on this approach, speech-based emotion recognition can also have a satisfactory performance with ensemble learning.[72][73]

It is also being successfully used in facial emotion recognition.[74][75][76]

Fraud detection

Fraud detection deals with the identification of bank fraud, such as money laundering, credit card fraud and telecommunication fraud, which have vast domains of research and applications of machine learning. Because ensemble learning improves the robustness of the normal behavior modelling, it has been proposed as an efficient technique to detect such fraudulent cases and activities in banking and credit card systems.[77][78]

Financial decision-making

The accuracy of prediction of business failure is a very crucial issue in financial decision-making. Therefore, different ensemble classifiers are proposed to predict

Medicine

Ensemble classifiers have been successfully applied in

Alzheimer or myotonic dystrophy) detection based on MRI datasets,[80][81][82] and cervical cytology classification.[83][84]

See also

References

  1. .
  2. .
  3. ^ .
  4. .
  5. ^ Ibomoiye Domor Mienye, Yanxia Sun (2022). A Survey of Ensemble Learning: Concepts, Algorithms, Applications and Prospects.
  6. ^ Kuncheva, L. and Whitaker, C., Measures of diversity in classifier ensembles, Machine Learning, 51, pp. 181-207, 2003
  7. ^ Sollich, P. and Krogh, A., Learning with ensembles: How overfitting can be useful, Advances in Neural Information Processing Systems, volume 8, pp. 190-196, 1996.
  8. ^ Brown, G. and Wyatt, J. and Harris, R. and Yao, X., Diversity creation methods: a survey and categorisation., Information Fusion, 6(1), pp.5-20, 2005.
  9. doi:10.19153/cleiej.8.2.1 (inactive 2024-04-17).{{cite journal}}: CS1 maint: DOI inactive as of April 2024 (link
    )
  10. ^ Ho, T., Random Decision Forests, Proceedings of the Third International Conference on Document Analysis and Recognition, pp. 278-282, 1995.
  11. S2CID 614810
    .
  12. .
  13. .
  14. ^ Terufumi Morishita et al, Rethinking Fano’s Inequality in Ensemble Learning, International Conference on Machine Learning, 2022
  15. ^ R. Bonab, Hamed; Can, Fazli (2016). A Theoretical Framework on the Ideal Number of Classifiers for Online Ensembles in Data Streams. CIKM. USA: ACM. p. 2053.
  16. ].
  17. ^ Tom M. Mitchell, Machine Learning, 1997, pp. 175
  18. .
  19. .
  20. .
  21. .
  22. , ch. 4.
  23. .
  24. .
  25. ^ The Wikiversity article on Searching R Packages mentions several ways to find available packages for something like this. For example, “sos::findFn('{Bayesian model averaging}')” from within R will search for help files in contributed packages that includes the search term and open two tabs in the default browser. The first will list all the help files found sorted by package. The second summarizes the packages found, sorted by the apparent strength of the match.
  26. ^ Monteith, Kristine; Carroll, James; Seppi, Kevin; Martinez, Tony. (2011). Turning Bayesian Model Averaging into Bayesian Model Combination (PDF). Proceedings of the International Joint Conference on Neural Networks IJCNN'11. pp. 2657–2663.
  27. ^ Saso Dzeroski, Bernard Zenko, Is Combining Classifiers Better than Selecting the Best One, Machine Learning, 2004, pp. 255-273
  28. .
  29. ISBN 978-3-030-20950-6. {{cite book}}: |journal= ignored (help
    )
  30. arXiv:2007.08140 [cs.LG]. {{cite arXiv}}: Unknown parameter |DUPLICATE_first1= ignored (help
    )
  31. ^ "1.11. Ensemble methods".
  32. .
  33. .
  34. ].
  35. .
  36. .
  37. ^ Clarke, B., Bayes model averaging and stacking when model approximation error cannot be ignored, Journal of Machine Learning Research, pp 683-712, 2003
  38. ].
  39. .
  40. ^ "BMS: Bayesian Model Averaging Library". The Comprehensive R Archive Network. 2015-11-24. Retrieved September 9, 2016.
  41. ^ "BAS: Bayesian Model Averaging using Bayesian Adaptive Sampling". The Comprehensive R Archive Network. Retrieved September 9, 2016.
  42. ^ "BMA: Bayesian Model Averaging". The Comprehensive R Archive Network. Retrieved September 9, 2016.
  43. ^ "Classification Ensembles". MATLAB & Simulink. Retrieved June 8, 2017.
  44. ^
    S2CID 11632848
    .
  45. ^ .
  46. .
  47. .
  48. ^ Mochizuki, S.; Murakami, T. (November 2012). "Accuracy comparison of land cover mapping using the object-oriented image classification with machine learning algorithms". 33rd Asian Conference on Remote Sensing 2012, ACRS 2012. 1: 126–133.
  49. S2CID 92025959
    .
  50. .
  51. .
  52. ^ Defined by Bruzzone et al. (2002) as "The data class that receives the largest number of votes is taken as the class of the input pattern", this is simple majority, more accurately described as plurality voting.
  53. S2CID 201310998
    .
  54. .
  55. .
  56. ^ Li, Yang; Zhao, Kaiguang; Hu, Tongxi; Zhang, Xuesong. "BEAST: A Bayesian Ensemble Algorithm for Change-Point Detection and Time Series Decomposition". GitHub.
  57. .
  58. .
  59. .
  60. .
  61. .
  62. .
  63. .
  64. .
  65. .
  66. .
  67. .
  68. .
  69. .
  70. .
  71. .
  72. .
  73. .
  74. ^ .
  75. .
  76. .
  77. .
  78. .
  79. .

Further reading

External links