はじめに 自然言語処理の領域では広く知られいるLDA(Latent Dirichlet Allocation)について復習する。 LDAはトピックモデルの1種であり、文書がどのようなトピックから構成されているかを推論するモデル。 推論するパラメータは以下の2つ。 トピック分布:文書ごとのトピック構成比率 単語分布:トピックごとの単語比率 トピックモデルに関する理解はこの1枚に尽きると思う。 Fast and Scalable Algorithms for Topic Modeling | Center for Big Data Analyticsより引用 後、日本語でのLDAの説明としては視覚的にも以下が分かりやすかった。 LDA for Pokemon analysis | haripo.com モデリング 数式によるLDAはググれば色々出てくるのでここでは割愛する。今回は「尤度計算」の
はじめに Stan Advent Calendar 2018 11日目の記事です。また、タイトルを見て察した人もいるかもしれませんが、Stan Advent Calendar 2018の2日目の記事である、北條大樹さんによるIntroduction to bayesplot (mcmc_ series) の続編でもあります。bayesplotパッケージそのものについては、本記事では説明を省略するため、まずは北條さんの記事をご一読ください。以下引用。 Stanには、既にggplot2ライクな事後処理用の関数が標準装備されています。ここら辺に関しては、以下の資料をご覧ください。 Stanの便利な事後処理関数 これとは別にStan公式が出しているbayesplotパッケージというものがあって、これも同じようなことができます。 既に日本語文献として小杉先生のサイトで紹介されていました(こちら)。上
## Warning: パッケージ 'knitr' はバージョン 3.5.2 の R の下で造られました 今年も始まりましたね。Stanアドカレ!! 3年連続のエントリーとなりました。本記事は、Stan adventcalender 2018 3日目の記事になります。 2日目のHojoさんの記事で登場したbayesplotパッケージのように、Stanでモデリングした結果を扱いやすくしてくれるパッケージがいくつか出されています。ここでは、tidybayesパッケージを紹介したいと思います。 tidybayesは,ミシガン大学情報学部の助教 Matthew Kayさんが開発したRのパッケージです。去年のアドカレで紹介したctmパッケージの開発もイケメンでしたが、これまたイケメンです。ちなみに昨日担当のHojoさんもイケメン(*´Д`)ハァハァです。 tidybayesのHPに飛ぶとこう書いてい
図1: Monte-Carlo, from Neugebauer (2018) イントロダクション モンテカルロ法とは どこを見て収束を確認するか トレースプロット GR統計量 を確認する. 多重連鎖はいくつ必要か 自己相関関数 (ACF, コレログラム) 有効サンプルサイズ 事後診断ツール bayesplot こういう時どうすればいい? GR統計量の値が大きい アルゴリズムを変える 有効サンプルサイズ の値が小さい 低速混合 間引き そもそもプログラムが間違っている場合 まとめ 参考文献 イントロダクションこの投稿は, 第78回R勉強会@東京(#TokyoR) - connpass での LT の内容を加筆修正したものである. 以下は当時のスライドである. bayesplot を使ったモンテカルロ法の実践ガイド from 智志 片桐 以前, Tokyo.R かどこかの懇親会で, マルコフ
概要A. Vehtari, Gelman, Simpson, Carpenter, & Bürkner (2020)で提案されているマルコフ連鎖モンテカルロ法(MCMC)の収束確認方法を紹介する. これらはや有効サンプルサイズ(ESS)といった従来よく使われた方法の問題点を解消したものである. 特に重要な, 以下の概念の使い方を紹介する. 正規化ランクと中央値まわりの畳み込み bulk-ESSとtail-ESS ランクプロットを始めとする, 上記の視覚化 今回紹介する方法の多くはbayesplotパッケージで用意されている. これは去年Tokyo.Rの5分間LTやるために書いたものの続きである.ill-identified.hatenablog.com 2021/4/7 追記: この論文は Bayesian Analysis 誌にアクセプトされたらしい (DOI: 10.1214/20-B
Stanやベイズ統計モデリングに関するAdvent Calendar 2017です。 Stanに関するRやpythonの情報でもいいと思います! 初心者大歓迎です。ハードルを下げて参入しやすくしましょう。 Stanを知っている時点で,エントリーする才能は十分ありますから!
このページをご覧いただき、ありがとうございます。 ここでは、情報量規準 WAIC を紹介しています。 ベイズ推測のための情報量規準(WAIC)が導出されました。 WAIC は(真の分布、確率モデル、事前分布)がどのような場合でも使う ことができます。他の規準と異なり理論的な基盤を持っています。 (0) モデル選択やハイパーパラメータの最適化に使えます。 (1) 漸近的に汎化損失と同じ平均値と同じ分散を持ちます。 (2) WAIC は簡単に計算できます。 (3) 真の分布が確率モデルで実現可能でなくても使えます。事前分布が真の事前分布でなくても使えます。 (4) 平均対数損失を最小にするパラメータがユニークでなくても使えます。 平均対数損失を最小にするパラメータが特異点を含む解析的集合であっても 使えます(注1)。 (5) フィッシャー情報行列が正則でなくても使えます。 (6) 事後分布が正
先日関学で行われた,Harukara.Rで行われた,Stan超初心者講習会のスライドをスライドシェアにアップしました。 プログラミングを知らない人向けに書いているので,その辺りがわかっている人からすると,やや遠回りな説明をしている部分もあります。 僕が心理学者なのもあって,扱ってるモデルは心理統計的なものから始めています。二項分布,正規分布,平均値の差の推論,相関係数,回帰分析,ロジスティック回帰分析,階層線形モデルまでです。 【追記:20160517】一部間違いを変更しました。あと,階層線形モデルは少し内容が難しい上に,今回の内容は中途半端だったので中級編でちゃんと扱うことにしました。 また,スライドで使われているstanコードはここからすべてダウンロード可能です。ただ,最初はスライドのコードを自分で書きながら練習するほうが,身につくかもしれません。
ggmcmc is an R package aimed at providing tools for assessing and diagnosing convergence of Markov Chain Monte Carlo simulations, as well as for graphically display results from full MCMC analysis. The package also facilitates the graphical interpretation of models by providing flexible functions to plot the results against observed variables. Development ggmcmc is developed in github and has attr
局所的な近似によるMCMCの高速化論文が話題になりました。 http://japan.zdnet.com/article/35073667/ 論文Accelerating Asymptotically Exact MCMC for Computationally Intensive Models via Local Approximations を読んで理解した範囲の内容を書きます。 アイデア 物理現象のモデルは(確率)微分方程式を使って書かれますが、そのパラメータが未知のことが多く、MCMCを使ってパラメータを推定することが行われています。 しかし現実的な問題ではモデルが巨大になって、MCMCの各ステップでそれを評価するのは計算量が多くなりすぎてしまいます。 そこでモデルを近似するということなのですが、サンプリングに近似した事後分布を使うというアイデアはApproximate Bayes
岩波データサイエンス サポートページ 各巻に対応する内容は,上のバーの3本線「三」をクリックして左に表示されるメニューからご覧ください (トップページの内容が空白の場合も,メニューで下位の階層をクリックして頂くと内容が表示される場合があります) 新グーグル・サイトに移行しました.自動変換のため,見難くなっている部分,表示されない部分がありますが,ご容赦ください シリーズ「岩波データサイエンス」では、統計科学や機械学習など、データを扱うさまざまな分野について、多様な視点からの情報を提供することをめざします。まったくの初歩からやや高度な話までのいろいろな手法の解説、実務に役立つソフトの使い方、さらには各領域のサイエンスや応用に踏み込んだ内容まで、多彩な記事を掲載します。 装丁には蛯名優子さんの作品を使わせて頂いています。蛯名さんのホームページはこちらです。 【公式ツイッターアカウント】ツイッタ
Stan is a state-of-the-art platform for statistical modeling and high-performance statistical computation. Many thousands of users rely on Stan for statistical modeling, data analysis, and prediction in the social, biological, and physical sciences, engineering, and business. Stan interfaces with the most popular data analysis languages (R, Python, shell, MATLAB, Julia, Stata) and runs on all majo
This document provides an introduction and overview of Stan, a programming language for Bayesian statistical modeling and inference. It discusses Stan's motivation as a faster alternative to BUGS that compiles models to C++. Key points covered include: - How Stan models are specified using blocks like data, transformed data, parameters, model, and generated quantities. - Stan's support for scalar,
前回のBUGS/Stan勉強会#1でご要望のあったStanチュートリアルの資料を作成しました。 StanTutorial from Teito Nakagawa
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く