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


R tidyposterior autoplot.posterior 可視化模型統計量的後驗分布

對於 posteriorperf_mod 類的對象,autoplot() 生成簡單的後驗分布圖。對於工作流集對象,可以生成多種類型的繪圖。

用法

# S3 method for posterior
autoplot(object, ...)

# S3 method for perf_mod
autoplot(object, ...)

# S3 method for perf_mod_workflow_set
autoplot(object, type = "intervals", prob = 0.9, size = NULL, ...)

參數

object

perf_mod()tidy.perf_mod() 或具有計算結果的工作流集生成的對象。

...

傳遞給 geom_line(stat = "density", ...) 的選項。

type

值為以下之一:"intervals"(對於使用區間估計的模型排名與後驗概率)、"posteriors"(每個模型的密度圖)或"ROPE"(對於實際等效概率與工作流排名)。

prob

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

size

所選指標單位的有效差異大小。例如,兩個模型之間的準確度 (size = 0.05) 提高 5% 可能會被視為 "real" 差異。

ggplot2::ggplot() 對象。

例子

data(ex_objects)
autoplot(posterior_samples)

源代碼:R/posteriors.R

相關用法


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