All Projects → srijarkoroy → adaboost

srijarkoroy / adaboost

Licence: MIT license
An implementation of the paper "A Short Introduction to Boosting"

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to adaboost

biteopt
Derivative-Free Optimization Method for Global Optimization (C++)
Stars: ✭ 91 (+355%)
Mutual labels:  optimization-algorithms
SGDLibrary
MATLAB/Octave library for stochastic optimization algorithms: Version 1.0.20
Stars: ✭ 165 (+725%)
Mutual labels:  optimization-algorithms
portfolio allocation js
A JavaScript library to allocate and optimize financial portfolios.
Stars: ✭ 145 (+625%)
Mutual labels:  optimization-algorithms
geneticalgorithm2
Supported highly optimized and flexible genetic algorithm package for python
Stars: ✭ 36 (+80%)
Mutual labels:  optimization-algorithms
SuffixTree
Optimized implementation of suffix tree in python using Ukkonen's algorithm.
Stars: ✭ 38 (+90%)
Mutual labels:  optimization-algorithms
irace
Iterated Racing for Automatic Algorithm Configuration
Stars: ✭ 26 (+30%)
Mutual labels:  optimization-algorithms
GPBoost
Combining tree-boosting with Gaussian process and mixed effects models
Stars: ✭ 360 (+1700%)
Mutual labels:  boosting
zoofs
zoofs is a python library for performing feature selection using a variety of nature-inspired wrapper algorithms. The algorithms range from swarm-intelligence to physics-based to Evolutionary. It's easy to use , flexible and powerful tool to reduce your feature size.
Stars: ✭ 142 (+610%)
Mutual labels:  optimization-algorithms
VariationalNeuralAnnealing
A variational implementation of classical and quantum annealing using recurrent neural networks for the purpose of solving optimization problems.
Stars: ✭ 21 (+5%)
Mutual labels:  optimization-algorithms
Ascension
A metaheuristic optimization framework
Stars: ✭ 24 (+20%)
Mutual labels:  optimization-algorithms
GARI
GARI (Genetic Algorithm for Reproducing Images) reproduces a single image using Genetic Algorithm (GA) by evolving pixel values.
Stars: ✭ 41 (+105%)
Mutual labels:  optimization-algorithms
fmin adam
Matlab implementation of the Adam stochastic gradient descent optimisation algorithm
Stars: ✭ 38 (+90%)
Mutual labels:  optimization-algorithms
HashedExpression
Type-safe modelling DSL, symbolic transformation, and code generation for solving optimization problems.
Stars: ✭ 40 (+100%)
Mutual labels:  optimization-algorithms
Operations-Research
Some lecture notes of Operations Research (usually taught in Junior year of BS) can be found in this repository along with some Python programming codes to solve numerous problems of Optimization including Travelling Salesman, Minimum Spanning Tree and so on.
Stars: ✭ 92 (+360%)
Mutual labels:  optimization-algorithms
aws-machine-learning-university-dte
Machine Learning University: Decision Trees and Ensemble Methods
Stars: ✭ 119 (+495%)
Mutual labels:  boosting
paper-simulation
Let's reproduce paper simulations of multi-robot systems, formation control, distributed optimization and cooperative manipulation.
Stars: ✭ 133 (+565%)
Mutual labels:  optimization-algorithms
click-through-rate-prediction
📈 Click-Through Rate Prediction using Logistic Regression and Tree Algorithms
Stars: ✭ 60 (+200%)
Mutual labels:  decision-tree-classifier
Learning-Lab-C-Library
This library provides a set of basic functions for different type of deep learning (and other) algorithms in C.This deep learning library will be constantly updated
Stars: ✭ 20 (+0%)
Mutual labels:  optimization-algorithms
geneal
A genetic algorithm implementation in python
Stars: ✭ 47 (+135%)
Mutual labels:  optimization-algorithms
csmath-2021
This mathematics course is taught for the first year Ph.D. students of computer science and related areas @zju
Stars: ✭ 30 (+50%)
Mutual labels:  optimization-algorithms

A Short Introduction to Boosting implementation -- AdaBoost

This is an implementation of the research paper "A Short Introduction to Boosting" written by Yoav Freund and Robert E. Schapire.

Inspiration

Machine Learning algorithms specially those concerning classification and regression can perform weakly while encountering huge datasets. In order to overcome such inconveniences, a number of optimisation algorithms were developed that could improve a model's performance significantly. Adaboost is one such boosting technique which we have implemented here to analyse the improvement in the performance of our classification model.


Introduction

Boosting refers to a general and provably effective method of producing a very accurate prediction rule by combining rough and moderately inaccurate rules of thumb. The AdaBoost algorithm was introduced in 1995 by Freund and Schapire which solved many of the practical difficulties of the earlier boosting algorithms. The algorithm takes as input a training set (x1,y1),...., (xm,ym) where each xi belongs to some domain or instance space, and each label yi is in some label set assuming Y = {-1, 1}. AdaBoost calls a given weak or base learning algorithm repeatedly in a series of rounds t = 1,..., T whose job is to find a weak hypothesis ht and outputs a final hypothesis H which is a weighted majority vote of the T weak hypotheses.


Dataset

The Dataset used here is a Toy Dataset generated by utilising make_gaussian_quantiles from sklearn.datasets module. This generated our input variable X in a two dimensional plane equivalently explained to have two features and our target variable y which took either -1 or +1.


Model Components

Our model architecture consists of the following components :-

  • The weak learner was decided to be a Decision Tree Classifier with two leaf nodes.
  • The output obtained from the weak learners were combined into a weighted sum that represented the final boosted output.

Adaboost Algorithm

Implementation Details

  • The custom defined datagenerate module is used to generate the input and the target variables.
  • The generated data is plotted in a two dimensional plane through another custom defined module named plot, for visualizing the input.
  • The weak learners are defined as Decision Tree Classifiers with two leaf nodes and are used to make predictions for fifty iterations in our case.
  • The weighted sum of all the weak learners are computed as the final boosting output to study the performance enhancement.
  • Lastly, the decision boundaries are visualized using the visualize module for every iteration.

Results

  • After 1st iteration -

  • After 50 iterations -

  • Training error of Weak Hypothesis vs Training error of Final Hypothesis -


Requirements

scikit-learn==0.24.1
numpy==1.19.2
matplotlib==3.3.4
typing==3.7.4.3


To use repo and obtain the graphs please follow the steps mentioned below

  • Setting up the Python Environment with dependencies:

      pip install -r requirements.txt
    
  • Cloning the Repository:

      git clone https://github.com/srijarkoroy/adaboost
    
  • Entering the directory:

      cd adaboost
    
  • Running the file:

      python3 test.py
    

Contributors

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].