Comments (5)
I've looked into Distributions.jl
. This error is due to the fact that helper functions for Truncated
still are not defined with generic types (e.g. they use pdf(d::Truncated, x::Float64) = ...
for pdf (https://github.com/JuliaStats/Distributions.jl/blob/master/src/truncate.jl). I will overload them in Turing and submit a PR soon.
from turing.jl.
Submitted a PR for Distributions.jl
JuliaStats/Distributions.jl#586
This example below (same as above but changed β to the right support range) is passed on my local Distribution.jl
fork (https://github.com/xukai92/Distributions.jl/tree/generic-support-to-truncated-dist).
using Distributions, Turing
negbindata = [0, 1, 4, 0, 2, 2, 5, 0, 1]
@model negbinmodel(y) begin
local α, β
α ~ Truncated(Cauchy(0,10), 0, +Inf)
β ~ Truncated(Cauchy(0,10), 0, 1.0)
for i = 1:length(y)
y[i] ~ NegativeBinomial(α, β) # α > 0, 0 < β < 1
end
return(α, β)
end
@sample(negbinmodel(negbindata), HMC(1000, 0.02, 1))
from turing.jl.
@xukai92
Is there anything that we can do to speed up the merging by Distributions package developers?
from turing.jl.
Let me chase them on the PR
from turing.jl.
Closed because PR is merged.
from turing.jl.
Related Issues (20)
- Implementing `adtype` for closely linked "external" samplers / adding metric warm-up HOT 2
- Constrained or partitioned inference for Turing models.
- Compat issue HOT 13
- missing keyword arguments not property processed HOT 5
- Enable Aqua.test_ambiguities
- Progress reporting in parallel sampling HOT 3
- Using @distributed to accelerate but getting wrong results
- Mode estimation's support of Pathfinder integration HOT 5
- Docs on SGHMC / SGLD? HOT 4
- Failing in precompiling dependencies HOT 2
- AbstractMCMC docs page out of date HOT 1
- Attempt fixing `bnn` tests in Ezyme PR HOT 3
- Make MLE and MAP more robust HOT 6
- Depreciate MCMC-interface code in favour of `AbstractMCMC`.
- Fix code test coverage HOT 1
- preallocating an array of random variables, getting `varname As used multiple times in model (subsumes As[1])` HOT 1
- maximum_likelihood function not found in Turing.jl HOT 4
- Allow for a named tuple for `initial_params` HOT 8
- Using the score function estimator as gradient for VI HOT 9
- Import style and modularisation HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from turing.jl.