Code Monkey home page Code Monkey logo

attention_time's Introduction

Attention Neural Network for Time-Series

AttentionalTime is a Python implementation of a time-series model with (optional) attention where the encoder is CNN, decoder is LSTM.

The attention model is from __.

This project is maintained by Kenshi Uchihashi.

Dependencies

Python

  • numpy
  • tensorflow

Quickstart

We are going to working with some example data in data/ folder. It contains delicious dataset, Twitter hashtags, and so on. First run the data-processing code like this:

python preprocessing.py

Details

Preprocessing options(preprocessing.py)

Data options

  • data_dir:

Training options()

Data options

Model options

Optimization options

Other options

Evaluation options()

Visualization options()

Acknowledgements

Our implementation utilizes code from the following:

Licence

attention_time's People

Contributors

uchihashikenshi avatar

Stargazers

 avatar  avatar  avatar KoiBoy avatar  avatar DICP_Zhou avatar  avatar  avatar  avatar  avatar 胡宏周 avatar  avatar Shubham Pachori avatar  avatar RuiLiu avatar VectorFF avatar  avatar  avatar Xiao SUN avatar hassaku avatar yuanke avatar

Watchers

 avatar

attention_time's Issues

コード整形

要件

  • データ生成部分について, 時系列の標準表現を得てから(get_timeseries_normal_representation.py)それに対してトレーニング用データの生成スクリプト(data.py)を適用する形に変更.
  • 統計情報を表示するスクリプト(stats.py)を作成
  • データの分割方法を複数指定できるように拡張(時間分割, サイト分割の二種類で当面はOK)

実装

  • data/ folder以下に実装.
  • data/dataname/ folder以下にデータを保存する感じ
  • BaseData classを継承した形でdata.pyを実装

新データで実験

要件

  • tweet hashtagsとmemetrackerでの実験結果を追加

実装

  • ipython notebookに直書き

学習データの作成方法変更

要件

  • データセットを分割して学習データとテストデータを作成する際, strideを入力次元(30)以下の値にすると, n+1番目の入力にn番目の教師(の情報の一部)が少し含まれてしまう.
  • bookmarkデータではあまり影響が無いように見えたので放置していたが, さすがにサチり過ぎなので学習が進めば影響が出てくる感じなのかもしれない

実装

  • PreprocessingでWebページ抽出の段階でtrainとtestを分ける

note

モデルの基底クラス作成

要件

  • CNNやLSTMの基底クラスを作り, 直上ディレクトリに格納する

実装

  • 直上ディレクトリをimportする際, ..baseというように双対パスによる指定が出来ないっぽい
  • ディレクトリを分けるのをやめるべきな気もする(CNN, LSTM, seq2seqなどを全て同じディレクトリで管理
  • keras実装だとモデル定義は1ファイルでできるので問題なさそう

XGBoostの結果可視化

要件

実装

  • 重要な変数の可視化
  • 決定木の可視化
    • こちらから決定木を指定するのではなく, あるデータについて貢献度の高い決定木であったり, 平均して重要度の高い決定木を自動で発見する仕組みが欲しい

note

CNNで多次元同時正解確率取得

要件

  • multilabel CNNで多次元が同時に正解する確率を求めたい
  • そもそも今バグってるっぽいのでそれを直す

実装

  • accuracyに多次元同時正解確率を追加する

XGBoostへの換装

要件

scikit-learnのGBDTよりXGBoostのほうがよく使われていそうだったのでそちらに変更.

実装

xgboostというライブラリがあるのであるのでそれを使うだけでたぶんok

note

実験設定の見直し

要件

  • 実験をシステマティックにやる
  • scikit-learnのcross validationとかgrid searchとかを使う?
  • テストデータもリサンプリングされている問題を解決したい

実装

  • kerasだとgrid searchとかはラッパーっぽく使えたはず

時間で分けたデータセットの作成

要件

  • train:testの分割で, これまでWebサイト単位で分けていたものを時間で分けたものについても実験する
  • より実際の使用シーンに近そうではある

実装

kNNでベースライン作成

要件

  • 学習器としてkNNを追加してベースラインにする

実装

  • model/kNN/を作ってそこにコードを置いとく
  • コマンドラインから呼べる感じには後でまとめてする
  • metricはeuclideanとDTWくらいで
  • data_feed的なクラスを作って継承する方がよさげ

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.