Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Added ensemble learner #884

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 25, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added images/ensemble_learner.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 44 additions & 0 deletions learning.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1716,6 +1716,50 @@
"The correct output is 0, which means the item belongs in the first class, \"setosa\". Note that the Perceptron algorithm is not perfect and may produce false classifications."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## ENSEMBLE LEARNER\n",
"\n",
"### Overview\n",
"\n",
"Ensemble Learning improves the performance of our model by combining several learners. It improvise the stability and predictive power of the model. Ensemble methods are meta-algorithms that combine several machine learning techniques into one predictive model in order to decrease variance, bias, or improve predictions. \n",
"\n",
"\n",
"\n",
"![ensemble_learner.jpg](images/ensemble_learner.jpg)\n",
"\n",
"\n",
"Some commonly used Ensemble Learning techniques are : \n",
"\n",
"1. Bagging : Bagging tries to implement similar learners on small sample populations and then takes a mean of all the predictions. It helps us to reduce variance error.\n",
"\n",
"2. Boosting : Boosting is an iterative technique which adjust the weight of an observation based on the last classification. If an observation was classified incorrectly, it tries to increase the weight of this observation and vice versa. It helps us to reduce bias error.\n",
"\n",
"3. Stacking : This is a very interesting way of combining models. Here we use a learner to combine output from different learners. It can either decrease bias or variance error depending on the learners we use.\n",
"\n",
"### Implementation\n",
"\n",
"Below mentioned is the implementation of Ensemble Learner."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"psource(EnsembleLearner)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"This algorithm takes input as a list of learning algorithms, have them vote and then finally returns the predicted result."
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down