機械学習の分野で最近話題になってきている Deep Learning。 Deep Learningでは、何層ものニューラルネットワークを用いて訓練・予測を行いますが、各層でそれぞれ学習を行い、段階的に特徴を抽出していくのがこれまでの機械学習手法と異なる点です。 最近の動向については、 Learning Deep Architectures for AI (Bengio 2009) で詳しくまとめられています。 今回は、Deep Learningにおける各層の学習で用いられている Restricted Boltzmann Machine (RBM, 制約付きボルツマンマシン)のコードを紹介します。 ソースは以下。 Referencesにも書いてあるように、RBMを含むDeep LearningのコードはDeepLearningTutorialsにあるのですが、theanoという特殊なpyth