Efficient Running Median using an Indexable Skiplist (Python recipe) by Raymond Hettinger Maintains sorted data as new elements are added and old one removed as a sliding window advances over a stream of data. Also gives fast indexed access to value. Running time per median update is proportional to the log of the window size. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
みなさん、こんにちは、今回は乱数の話です。 特に複数機種でのコンシューマ機でゲームを開発をしていると、機種間で乱数値を統一するために乱数生成アルゴリズムを自作しますよね。 そこでよく使われるアルゴリズムが「線形合同法」です、内容は至って簡単で、以下の漸化式を使います。 A,B,Mは定数で、どの値が入るかは処理系依存です。 例えばUnixなどの処理系ではA=1103515245,B=12345,M=2147483647などが入ります。 C言語ですと以下のようになります。 static unsigned int x=1; void srand(unsigned int s) { x=s; } unsigned int rand() { x=x*1103515245UL+12345UL; return x&2147483647UL; } この「線形合同法」は計算が簡単で高速ですから、いろいろな環
This webpage contains the code and other supporting material for the textbook "Machine Learning: An Algorithmic Perspective" by Stephen Marsland, published by CRC Press, part of the Taylor and Francis group. The first edition was published in 2009, and a revised and updated second edition is due out towards the end of 2014. The book is aimed at computer science and engineering undergraduates studi
今、python界でPyBrainが熱い!…わけじゃないですけど、個人的にけっこう注目しているライブラリ。機械学習ライブラリにおける、期待の新人が出てきなような気持ちです。 0.PyBrainとは?PyBrainっていうのはPythonによって動く、モジュール式の機械学習ライブラリです。python界ではいままでにもニューラルネットワークとかSVMなどを扱うライブラリが存在していましたが、PyBrainではそれらをより包括的に扱う、一種の環境としての機械学習ライブラリを目指しているようです。 PyBrainが優れているのはその思想もさることながら、扱っているアルゴリズムの多さにもあります。例えばFeaturesの欄を見てみると、 BackpropRpropPolicy GradientsSupport Vector MachinesEvolution StrategiesCMA-ESCom
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く