Coder Social home page Coder Social logo

adaboost-toolbox's Introduction

##Peking University Machine Learning Homework two Group Member: zhouzhaoping dongzhuoyao snowingmush

Data Source:Image Segmentation data

####Basic Adaboost Binary-Classification

  • decision_stump.py:
    单层决策树的实现,buildStump接口找到当前加权数据集上的最优单层决策树
  • adaboost.py:
    基于单层决策树adaboost算法的类Adaboost,关键方法fit学习训练集和predict预测
  • data_preprocess.py:
    数据预处理

####OVR(one-versus-rest)

  • one_versus_rest.py:
    run Adaboost to implement one-versus-others multi-classification
             precision    recall  f1-score   support
  BRICKFACE       0.55      0.99      0.71       300
     CEMENT       0.83      0.65      0.73       300
    FOLIAGE       0.88      0.81      0.84       300
      GRASS       0.99      0.98      0.99       300
       PATH       1.00      0.91      0.95       300
        SKY       0.99      1.00      1.00       300
     WINDOW       0.86      0.51      0.64       300
avg / total       0.87      0.84      0.84      2100

####OVO(one-versus-one)

  • one_versus_rest.py:
    run Adaboost to implement one-versus-one multi-classification
             precision    recall  f1-score   support
  BRICKFACE       0.19      1.00      0.32       300
     CEMENT       0.00      0.00      0.00       300
    FOLIAGE       0.64      0.31      0.41       300
      GRASS       1.00      0.95      0.97       300
       PATH       0.00      0.00      0.00       300
        SKY       0.03      0.00      0.01       300
     WINDOW       0.87      0.11      0.20       300
avg / total       0.39      0.34      0.27      2100

####Adaboost.MH (Improved boosting algorithms using confidence-rated predictions)

  • adaboostmh.py:
    based on Adaboost,evolve into AdaBoostMH
  • run_adaboostmh.py:
             precision    recall  f1-score   support
  BRICKFACE       0.60      0.99      0.74       300
     CEMENT       0.80      0.63      0.71       300
    FOLIAGE       0.86      0.81      0.83       300
      GRASS       1.00      0.98      0.99       300
       PATH       1.00      0.90      0.95       300
        SKY       0.99      1.00      1.00       300
     WINDOW       0.86      0.62      0.72       300
avg / total       0.87      0.85      0.85      2100

####How to run

cd PATH_TO_THE_PROJECT
python one_versus_one.py
python one_versus_rest.py
python run_adaboostmh.py

adaboost-toolbox's People

Contributors

dongzhuoyao avatar r8sn8t avatar zhouzhaoping avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.