Related Experiment Video
Updated: Jul 13, 2025

Automatic Image Processing to Determine the Community Size Structure of Riverine Macroinvertebrates
Published on: January 13, 2023
An R package for ensemble learning stacking
1Department of Life Sciences, Faculty of Agriculture, Ryukoku University, Otsu, Shiga 520-2194, Japan.
Summary:
Supervised learning is widely used in biology for prediction, and ensemble learning, including stacking, is a promising technique for increasing and stabilizing the prediction accuracy. In this study, we developed an R package for stacking. This package depends on the R package caret and can handle models supported by caret. Stacking involves cross-validation of training data with multiple base learners, and the predicted values are used as explanatory variables for the meta-learner. In the prediction, the testing data were fed into the base models, and the returned values were averaged for each base learner. The averaged values were then fed into the meta-model, and the final predictions were returned. Using this package, the training and prediction procedures for stacking can be conducted using one-row scripts.
Availability And Implementation:
The R package stacking is available at the Comprehensive R Archive Network (CRAN) (https://cran.r-project.org/) and GitHub (https://github.com/Onogi/stacking). R scripts to reproduce the presented results are also reposited at GitHub.
Related Concept Videos
Introduction to R
Observational Learning
Introduction to Learning
In contrast to learned behaviors, unlearned behaviors such as crying, sexual...
Associative Learning
Classical conditioning, also known...
Cognitive Learning
E. C. Tolman's theory of purposive behavior emphasizes that much behavior is goal-directed. He argued that to understand behavior, we must look at the entire sequence of actions leading to a goal. For instance, high school students study hard, not just due to past reinforcement but also to achieve the goal of getting into a good college.
Tolman introduced the idea that behavior is influenced by...
Avoidance Learning and Learned Helplessness
Avoidance learning occurs when an organism learns that a specific behavior can prevent an unpleasant outcome. For example, a student who receives a bad grade may start studying harder to avoid future poor grades. This behavior persists even when the negative outcome is no longer present. Avoidance learning is powerful because it maintains behavior in the absence of the...

