Skip to content

Commit 38dde57

Browse files
committed
add comment
1 parent e771b09 commit 38dde57

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

Chapter 1/01_Thinking_Probabilistically_a_Bayesian_Inference_Primer (3).ipynb

+12-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
{
44
"cell_type": "code",
55
"execution_count": 1,
6-
"metadata": {},
6+
"metadata": {
7+
"collapsed": true
8+
},
79
"outputs": [],
810
"source": [
911
"%matplotlib inline\n",
@@ -317,6 +319,15 @@
317319
"plt.savefig('B04958_01_08.png', dpi=300, figsize=(5.5, 5.5))"
318320
]
319321
},
322+
{
323+
"cell_type": "markdown",
324+
"metadata": {},
325+
"source": [
326+
"关于如何计算**最大后验区间**,*Doing Bayesian Data Analysis*一书的第25章有详细介绍和R代码的实现。\n",
327+
"\n",
328+
"这里原作者实现计算多峰分布的最大后验区间的逻辑是,首先根据原始数据计算KDE分布,然后将其离散化,sort之后根据参数alpha过滤掉概率较低的值,然后再按原始数据sort之后即可找出对应的区间。具体可查看本目录下的`hpd.py`文件"
329+
]
330+
},
320331
{
321332
"cell_type": "code",
322333
"execution_count": 11,

0 commit comments

Comments
 (0)