Coder Social home page Coder Social logo

chainer-peak-detect's Introduction

ディープラーニングフレームワークのchainerによるピーク位置の推定

内容

凸型のピークをもつ1Dデータの左端の第1ピークの位置(index)を推定する。
下図に1Dデータの例を示す。
1Dデータ

学習モデル

入力64次元。5層のFCで中間層のユニット数は100。出力1次元。
学習する未知パラメーターの数は36901個ある。
モデル可視化
モデルを可視化したグラフがdocsホルダーの中にあります。(docs/cg_MLP.png)

学習サンプル数と損失の関係

学習サンプル数を、4830個(-d 1.5), 18975個(-d 1.0), 241773個(-d 0.5)と変化させたときの損失(main/loss)の様子を下図に示す。
サンプル数毎の収束度合い

学習サンプル数が少ないと(4830,18975)、損失はより大きな値で止まり下がりきらない。 学習サンプル数は学習する未知パラメーター数よりも十分大きいものが必要のようだ。

プログラムとオプション

  • make_dataset.py データセットを作成する
  • train.py chainerで学習する
  • log_plot.py chainerのlog出力の中の損失をまとめてプロットする

オプション

  • -d  分割する幅を示す。値が小さいほど、細かく分割して、サンプル数が増す。  

動作例

python make_dataset.py -d 1.0 train用のデータセットの作成
python make_dataset.py -d 1.5 test用のデータセットの作成
python train.py -d 1.0 -e 1000 1000エポック回、学習する
python log_plot.py 損失のプロット(任意)

ここではchainer 3.2.0を使っています。chainerのバージョンが違うとエラーが発生するかもしれない。

結果

学習サンプルを使っての判定でも正解率85~95%とよくない。

ライセンス

train.pyとplot_report_logscale.pyはchainerのレポジトリにあるものを変更したものです。chainerのライセンスについては、LICENSE-chainer.txtを見てください。
上記以外は、MITライセンスに従います。

chainer-peak-detect's People

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.