julia - Turing.jl 估计器显示提案将因数值错误而被拒绝

标签 julia mcmc statistical-sampling

Turing.jl 中的模型似乎陷入了错误

Warning: The current proposal will be rejected due to numerical error(s).
│   isfinite.((θ, r, ℓπ, ℓκ)) = (true, false, false, false)

适用于 NUTS()HMCDA() 以及有时 HMC() 采样方法。我不太明白是什么导致了这些错误(什么是θ?),但它使得 NUTS 和 HMCDA 无法用作采样方法,而 HMC 约有 2/3 的样本被拒绝。我在这里和论坛上查看了类似的问题,但到目前为止似乎没有人能解决这个问题。

最佳答案

来自 AdvancedHMC GitHub https://github.com/TuringLang/AdvancedHMC.jl/blob/beeb37b418992a3280fc3e59d01d2a124639507e/src/hamiltonian.jl

θ::T  # Position variables / model parameters.
r::T  # Momentum variables
ℓπ::V # Cached neg potential energy for the current θ.
ℓκ::V # Cached neg kinect energy for the current r.

关于julia - Turing.jl 估计器显示提案将因数值错误而被拒绝,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/74319862/

相关文章:

statistics - 从非均匀数据创建均匀分布的示例

julia - 使用 CuArrays 限制 Julia 中的 GPU 内存

performance - Julia - 具有属性的可变结构,它是一个函数和@code_warntype

r - MCMCglmm 中 "trait"的含义

r - 需要有关 R 中 MCMC 估计的建议

r - 评估结果模拟数据

dataframe - Julia:将函数应用于 DataFrame 中的每个单元格(不丢失列名)

julia - 什么是 Julia 中 connect 的替代品?

python - 如何在 python 中格式化角图?

python - 使用 sklearn 进行音乐流派分类 : how to accurately evaluate different models