Giter Club home page Giter Club logo

adaboost's Introduction

AdaBoost

機械学習アルゴリズムのひとつであるAdaBoostを実験的にRubyで実装してみた。

##参考文献

  • Rapid Object Detection using a Boosted Cascade of Simple Features Here!
  • 局所特徴量と統計学習手法による物体検出 Here!
  • AdaBoost - Wikipedia Here!

memo

使用にあたって

  • 簡単な学習データ(低次元、学習データ少数)でのみ確認
  • 本格的に使用すると学習時間滅茶苦茶かかるので覚悟(マシンパワー必須)

実行方法

# 学習による識別器構築
$ ruby adaboost.rb

# 学習で構築した識別器を使って未知データ分類
$ ruby classification.rb

※ adaboost.rbを実行すると、識別器パラメータを格納したclassifier.datが生成される。

学習データファイルのフォーマット

# N次元の特徴ベクトル(データ)
[label] [data1] [data2] ... [dataN]   #一個目の学習ベクトル
[label] [data1] [data2] ... [dataN]   #二個目の学習ベクトル

# この時、label = {+1, -1}
# 正クラス:+1、負クラス:-1 をそれぞれとる

# 記述例(二次元データの場合)
-1 -2.416682586290083 -1.6340630148871529
-1 -0.4611169335807954 1.1720161088656624
1 1.771127779864452 0.6400316433636748
1 0.3076072954507474 0.47308423467735405

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.