Skip to content

This repository contains an example of each of the Ensemble Learning methods: Stacking, Blending, and Voting. The examples for Stacking and Blending were made from scratch, the example for Voting was using the scikit-learn utility.

Notifications You must be signed in to change notification settings

gvvsraju/Stacking-Blending-Voting-Ensembles

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Medium Twitter Linkedin

Ensemble Learning: Stacking, Blending and Voting

This repository contains an example of each of the Ensemble Learning methods: Stacking, Blending, and Voting. The examples for Stacking and Blending were made from scratch, the example for Voting was using the scikit-learn utility.

If you want to know more about the theory of each of these models, I recommend you take a look at the blog: Ensemble Learning: Stacking, Blending & Votingr

Table of Contents

1. Files

  • stacking.py: Contains an example from scratch about Stacked Generalization method
  • blending.py: Contains an example from scratch about Blending, a variation from Stacked Generalization method.
  • voting.py: Contains an example about Voting method by using the scikit-learn module.

2. How to use

For running stacking.py:

python stacking.py

For running blending.py:

python blending.py

For running voting.py:

python voting.py

however, I recommend you to work with a virtual environment, in this case I am using pipenv. So in order to install the dependencies located in the Pipfile you just need to type:

pipenv install

and then

pipenv shell

3. Contributing

Feel free to fork the model and add your own suggestiongs.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/YourGreatFeature)
  3. Commit your Changes (git commit -m 'Add some YourGreatFeature')
  4. Push to the Branch (git push origin feature/YourGreatFeature)
  5. Open a Pull Request

5. Contact

If you have any question, feel free to reach me out at:

6. License

Distributed under the MIT License. See LICENSE.md for more information.

About

This repository contains an example of each of the Ensemble Learning methods: Stacking, Blending, and Voting. The examples for Stacking and Blending were made from scratch, the example for Voting was using the scikit-learn utility.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%