This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! coding:utf-8 | |
| """ | |
| CircleRace main.py | |
| サークルレースゲーム | |
| (2015/11/19) 21:50 ver0.2 センサ追加 | |
| (2015/11/19) 4:47 ver0.1作成 | |
| Created by 0160929 on 2015/11/19 7:28 | |
| """ | |
| __version__ = '0.1' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! coding:utf-8 | |
| """ | |
| CircleRace main.py | |
| サークルレースゲーム | |
| (2015/11/19) 4:47 ver0.1作成 | |
| Created by 0160929 on 2015/11/19 7:28 | |
| """ | |
| __version__ = '0.1' | |
| import sys |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! coding:utf-8 | |
| """ | |
| CircleRace main.py | |
| サークルレースゲーム | |
| (2015/11/19) 4:47 | |
| """ | |
| import numpy as np | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- coding: utf-8 -*- | |
| ## 必要なモジュールをインポート | |
| import os | |
| import sys | |
| import time | |
| ## PySide系モジュール | |
| from PySide.QtGui import * | |
| from PySide.QtCore import * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| http://deeplearning.net/tutorial/logreg.html | |
| """ | |
| import theano | |
| import theano.tensor as T | |
| import numpy | |
| class LogisticRegression(object): | |
| """Multi-class Logistic Regression Class |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! coding:utf-8 | |
| """ | |
| Theanoの使い方 | |
| Theano で Deep Learning <1> : MNIST データをロジスティック回帰で判別する | |
| http://sinhrks.hatenablog.com/entry/2014/11/26/002818 | |
| """ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # coding: utf-8 | |
| """ | |
| QLearn4.py | |
| QLearn3.pyの改良版。 | |
| AgentクラスとStateクラスとQLearnクラスを実装 | |
| 参考 | |
| Q学習-最良経路を学習するスクリプト書いた (powered by Python) | |
| http://d.hatena.ne.jp/Kshi_Kshi/20111227/1324993576 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # numpy配列をプリントした場合の表示桁数 | |
| np.set_printoptions(precision=3) | |
| def ndprint(a, format_string='{0:.2f}'): | |
| """ | |
| ndarrayをprintする関数 | |
| :example: ndprint(x) | |
| """ | |
| return [format_string.format(v, i) for i, v in enumerate(a)] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- coding: utf-8 -*- | |
| """ | |
| ## Description | |
| 多層パーセプトロンの高速化 | |
| http://aidiary.hatenablog.com/entry/20140201/1391218771 | |
| 入力層 - 隠れ層 - 出力層の3層構造で固定(PRMLではこれを2層と呼んでいる) | |
| 隠れ層の活性化関数にはtanh関数またはsigmoid logistic関数が使える | |
| 出力層の活性化関数にはtanh関数、sigmoid logistic関数、恒等関数が使える |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- coding: utf-8 -*- | |
| """ | |
| kawa1128の日記 Pythonでニューラルネット | |
| http://d.hatena.ne.jp/kawa1128/20090920/1253456109 | |
| """ | |
| import math | |
| import random | |
| import sys |