2014-11-01から1ヶ月間の記事一覧

ベータ分布のquantile

はじめに boostには、確率分布のquantile(分位数、分布をp:1-pに分割する点)を計算するものが用意されている。 ベータ分布の場合について、自分でも書いてみる。 コード #include <iostream> #include <cmath> //#include <boost/math/distributions/beta.hpp> class BetaDistribution { double eps; double val_a</boost/math/distributions/beta.hpp></cmath></iostream>…

Feature Hashingを試す

はじめに Feature Hashingについて気になったことがあったので試してみた。 Feature Hashingとは Hashing trick ハッシュ関数を使って、素性群をM次元ベクトルにする 一種の次元圧縮 Bag of wordsなどの素性をそのままハッシュ値にすることで、素性とIDのペ…