Skip to content

Conversation

@cscherrer
Copy link
Owner

WIP-- DO NOT MERGE

Currently we write, e.g.,

dynamicHMC(m(x=x), observations::NamedTuple)

There's an implicit step here of creating the conditional distribution of m(x=x) given observations, but we currently have no way to write this. Also, it would be useful to move closer to Turing's representation for sampling, which doesn't require observations in a separate argument.

At the same time, we need to keep our generative representation. So this is a start on letting us write

m(x=x) | observations

Note that the | here is usually a bitwise or. But I don't see this being used for models, so the overloading feels safe for this usage.

With this change, we now have Model, JointDistribution, and also Conditional. Duplicating methods is starting to seem a bit much. So let's add AbstractModel and define operations on that whenever possible.

For now, we have AbstractModel <: Distribution, but we'll soon move this to <: MeasureTheory.Measure

@codecov-io
Copy link

Codecov Report

Merging #216 (6d6ff54) into master (97e49f2) will increase coverage by 2.45%.
The diff coverage is 16.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #216      +/-   ##
==========================================
+ Coverage   28.53%   30.99%   +2.45%     
==========================================
  Files          43       45       +2     
  Lines        1265     1381     +116     
==========================================
+ Hits          361      428      +67     
- Misses        904      953      +49     
Impacted Files Coverage Δ
src/core/models/conditional.jl 0.00% <0.00%> (ø)
src/core/models/jointdistribution.jl 21.42% <ø> (ø)
src/core/models/model.jl 77.17% <ø> (ø)
src/core/models/abstractmodel.jl 25.00% <25.00%> (ø)
src/core/toposort.jl 100.00% <100.00%> (ø)
src/particles.jl 14.54% <0.00%> (-1.25%) ⬇️
src/core/dependencies.jl 100.00% <0.00%> (ø)
src/transforms/basictransforms.jl 100.00% <0.00%> (ø)
... and 16 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 97e49f2...6d6ff54. Read the comment docs.

@cscherrer cscherrer closed this Apr 6, 2021
@cscherrer cscherrer deleted the cs-conditional branch August 9, 2021 23:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants