Comments (3)
Hi @sethaxen ,
I fixed some bugs in #68 (thanks again for initiating this), and I dropped the need to specify N
as a keyword argument. So as it stands, you can call particles(m)
or particles(m,N::Int)
. Do you see a compelling reason to have this as a keyword argument? If not, do you still see a benefit from splitting the function, rather than just having multiple methods? Do you have results other than Particles
in mind?
I really like the idea of overloading mcmc_keep_warmup
. And since we own JointDistribution
, there's no concern for type piracy.
For your third point, I had played a bit with having just a single sample
function taking a method
argument, that could be e.g. dynamicHMC
or advancedHMC
. I don't think it was necessarily a bad approach, but it did make the internals a little more complex and I didn't see much benefit at the time. Happy to come back to this (or something similar) if you think it would make a big difference.
from soss.jl.
Do you see a compelling reason to have this as a keyword argument?
No, this is fine.
If not, do you still see a benefit from splitting the function, rather than just having multiple methods? Do you have results other than
Particles
in mind?
For your third point, I had played a bit with having just a single
sample
function taking amethod
argument, that could be e.g.dynamicHMC
oradvancedHMC
.
I've not thought about this very much, but I like the idea of having a generic function like sample
. I was thinking it would be handy to have a preferred order of sampling algorithms. e.g. exact sampling if possible, dynamic HMC if all continuous, Gibbs sampler with dynamic HMC and MH otherwise. I would consider this an advanced feature though.
I'm mainly concerned about cases when Particles
output maybe isn't appropriate. e.g. what if a variable is a custom type that represents a point on a manifold? If the variable is just an Array
, you'll get Array{Particles}
, where each Particles
corresponds to an element of the array. But if you used a custom type such as a Manifolds.MPoint
, you'd probably want a Particles{<:Manifolds.MPoint}
. If that works and everything will behave correctly, then maybe these concerns are irrelevant.
I really like the idea of overloading
mcmc_keep_warmup
. And since we ownJointDistribution
, there's no concern for type piracy.
I think this is a good idea either way, and I'll submit a PR for this and overloading the necessary function(s) for AdvancedHMC.sample
as well.
It would also be nice to have something like Turing's psample
for sampling chains in parallel.
from soss.jl.
After taking a stab at this, one problem with overloading mcmc_keep_warmup
to create the TransformedLogDensity
is that the same TransformedLogDensity
is needed to transform the samples, and it won't be available to us if we create it in the method. I'll think some more tomorrow if there's a better abstraction.
from soss.jl.
Related Issues (20)
- What am I doing wrong? HOT 3
- Examples page in documentation does not exist HOT 1
- sample(...) does not work HOT 9
- No more Soss.predict() methods for densities from Distributions.jl HOT 3
- Implemention of Gaussian mixture model fails when sampling the posterior HOT 4
- Collision of filenames on OS X HOT 3
- Int argument for predict function HOT 2
- Follow Traditional Style Guide? (At least in public API)
- Help fitting a simple t distribution HOT 4
- For(...) do i ... broken using Soss with [email protected] or later HOT 4
- Empty model in predict HOT 6
- Modeling discrete variables
- CSV interference HOT 1
- dynamicHMC UndefVarError
- Can't use M as variable name HOT 4
- Precompilation warning HOT 2
- Example in Readme fails HOT 7
- README example fails HOT 32
- Empty transform with (new) Soss.as HOT 4
- Unable to sample posterior of the MC example from JuliaCon 2021 HOT 3
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 soss.jl.