Bagging Models Example

Bagging Models Example

Problem Statement

Develop a model to predict the gear of the car based on other predictor variables.

How to perform analysis

Step 1: Open Sigma Magic
  1. Click on the Sigma Magic button on the Excel toolbar.
  2. Click on the New button to create a new project.
Step 2: Add the analysis template
  1. Click on the Tool Wizard to add the analysis template.
  2. Click on Analytics and then Bagging Model.

Step 3: Specify analysis options
A new worksheet will be added to your workbook. Analysis Setup will be automatically openedin the setup tab specify the survey results.


Click on Data to specify the data required for this analysis.   


Click on the Train the software will let you pick the options for training the given model. Training is a step where we split the data into groups a train data set and a test data set.


Click on the Tuning to identifying the best set of hyperparameters that gives the best fit for the given model.


Click the Verify tab to ensure all the inputs are okay and shown in a green checkmark. 


Step 4: Generate analysis result
Click OK and then click Compute Outputs to get the final results.



Interpretation of Results

  • The Bagging model used is a Parallel Random Forest, which is an ensemble learning method.
  • Random Forest works by combining multiple decision trees trained on bootstrapped samples of the dataset to reduce variance and improve accuracy.
  • The reported accuracy of the model is 75.69%, which is a decent performance level.
  • This suggests that the model is correctly predicting the target variable in approximately 3 out of 4 cases.
  • If higher accuracy is required, tuning hyperparameters (e.g., number of trees, max depth, feature selection) could improve results.
  • A hyperparameter tuning plot is visible, showing performance across different hyperparameter settings.
  • The accuracy curve indicates that an optimal parameter set was found, but further optimization could help.
  • Adjusting the number of estimators (trees) or max depth may improve accuracy.
  • The Variable Importance Plot indicates the most significant features influencing the model’s predictions.
  • Features with higher importance scores contribute more to decision-making in the Random Forest model.
  • This insight helps in selecting relevant variables and possibly eliminating less important ones to improve efficiency.
  • The table provides predicted values based on the trained model.
  • The dataset consists of multiple independent variables (like displacement, horsepower, speed, and gears).
  • By analyzing errors and misclassifications, we can determine if bias reduction or further tuning is required.
  • The model is performing well with 75.69% accuracy, indicating a reliable prediction system.
  • Further fine-tuning through cross-validation and feature selection could improve the model.
  • If accuracy needs improvement, boosting techniques (like XGBoost or AdaBoost) may be explored as an alternative.
    • Related Articles

    • Bagging Models Overview

      Bagging (Bootstrap Aggregating) is an ensemble learning technique that enhances the accuracy and stability of machine learning models by reducing variance and preventing overfitting. It works by training multiple models on different subsets of the ...
    • Bagging models frequently asked questions

      What is a Bagging Models? A Bagging model is an ensemble learning technique that trains multiple instances of a base model on different bootstrapped datasets and aggregates their predictions to improve accuracy and reduce variance. It is useful in ...
    • Prototype Models Example

      Problem Statement Use the Neural Network model to predict the values for gear based on the other variables. How to perform analysis Step 1: Open Sigma Magic Click on the Sigma Magic button on the Excel toolbar. Click on the New button to create a new ...
    • Regression Models Example

      Problem Statement Determine a regression model between input X (advertisements) and Y (sales). The data for this exercise is given in the Data tab. Fit a regression model between the input(s) and the output? Is this model statistically significant? ...
    • Prototype Models Overview

      Prototype models serve as foundational frameworks for developing and testing analytical solutions. These models help organizations gain insights, make data-driven decisions, and improve processes. Below is an overview of key prototype models in ...