當前位置: 首頁>>編程示例 >>用法及示例精選 >>正文


R tidyposterior summary.posterior 總結模型統計量的後驗分布

為每個模型創建數值摘要,包括後驗平均值以及上下可信區間(也稱為不確定區間)。

用法

# S3 method for posterior
summary(object, prob = 0.9, seed = sample.int(10000, 1), ...)

參數

object

tidy.perf_mod() 生成的對象。

prob

數字 p (0 < p < 1),表示間隔中包含的所需概率質量。

seed

用於從後驗中采樣的單個整數。

...

目前未使用

包含摘要統計數據的 DataFrame 以及每個模型的一行。

例子

data("ex_objects")

summary(posterior_samples)
#> # A tibble: 3 × 4
#>   model         mean lower upper
#>   <chr>        <dbl> <dbl> <dbl>
#> 1 cart         0.851 0.826 0.875
#> 2 logistic_reg 0.883 0.859 0.909
#> 3 mars         0.884 0.859 0.910
源代碼:R/posteriors.R

相關用法


注:本文由純淨天空篩選整理自Max Kuhn等大神的英文原創作品 Summarize the Posterior Distributions of Model Statistics。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。