-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dev #88
Merged
Dev #88
Changes from 250 commits
Commits
Show all changes
392 commits
Select commit
Hold shift + click to select a range
1d2b66c
drop debugging code
cscherrer b5891c5
small update for Likelihood, and a test
cscherrer 21e2c19
fixing up likelihoods
cscherrer 622fa32
improve `basemeasure_depth` dispatch
cscherrer 630067b
still some trouble with inferred basemeasure_depth
cscherrer b0a0f66
clean up `For` dispatch
cscherrer 8f28472
simplify _logdensityof
cscherrer 80be728
optimize for Returns{True} case
cscherrer 4de454c
Merge branch 'dev' of github.com:cscherrer/MeasureBase.jl into dev
cscherrer 1b65a57
rework basemeasure_depth
cscherrer 18e5605
aggressive tests passing!!
cscherrer 9b7e8aa
drop type-level stuff
cscherrer f907b8f
drop help
cscherrer d047fc1
license
cscherrer 7fb384a
affero
cscherrer 68dd214
copyright notice
cscherrer 143d7a7
merge
cscherrer 7e3dab1
Merge branch 'dev' of github.com:cscherrer/MeasureBase.jl into dev
cscherrer 040c815
Drop Create Commons
cscherrer d24550f
Merge branch 'master' into dev
cscherrer ae80dc1
cleanup after merge
cscherrer d6c12f5
update support computations
cscherrer 2f5c31d
insupport(d::SuperpositionMeasure, x)
cscherrer 35271fc
dorp ParamWeighted
cscherrer de9ccdd
insupport(d::FactoredBase, x)
cscherrer 1e8615d
export unsafe_logdensityof
cscherrer 305ed0e
call promote_type instead of promote_rule
cscherrer 0d35552
logdensity_def for named tuple product measures
cscherrer cf45278
type annotation for now
cscherrer e6705af
debugging
cscherrer 093282c
drop shows
cscherrer 7843aea
speed up mapped arrays
cscherrer 641d222
throw an error for `Union{}` types
cscherrer 396405b
MT tests passing
cscherrer b880018
updates
cscherrer 5afed52
get tests passing
cscherrer 5139be2
MIT license for MeasureBase
cscherrer 101a5fe
bump version
cscherrer 191c5ef
cleanup
cscherrer 636b734
spacing
cscherrer 66ea65c
Merge branch 'dev' of github.com:cscherrer/MeasureBase.jl into dev
cscherrer 6036ec2
Move ConditionalMeasure to MeasureBase
cscherrer 03a7aba
add LogarithmicNumbers
cscherrer d45e91e
export basemeasure_sequence
cscherrer b6cf835
update superpose
cscherrer c483099
fix logdensity_rel
cscherrer 9da96fa
remove FIXME (it's fixed!!)
cscherrer c8b8822
logdensityof(d::Density, x)
cscherrer 66cee3c
Merge branch 'dev' of github.com:cscherrer/MeasureBase.jl into dev
cscherrer dc82f20
simplify insupport(::Lebesgue, ::Real)
cscherrer 2f9e5f0
clean up
cscherrer 4e1861f
assume insupport yields Bool
cscherrer e1b03de
change logdensity_rel fall-through to warning and return NaN
cscherrer 08b40e2
update logdensity_rel
cscherrer 3881dda
drop old code
cscherrer 719be40
fix warning
cscherrer 002bd57
export logdensity_rel
cscherrer 6c00bae
logdensity_def(μ::Dirac, ν::Dirac, x)
cscherrer 9168a2c
logdensity_def methods
cscherrer 2524aa1
drop `static`
cscherrer b6f5292
]add StatsFuns
cscherrer c3e2f13
Fixing up superposition
cscherrer 027bc12
[compat] entries
cscherrer 91aa7be
trying to speed things up
cscherrer b069640
bugfixes
cscherrer b0078d2
logdensity_rel tests
cscherrer 4b1b49e
logdensity_rel tests
cscherrer 1c16e2c
drop qualifier, and add a test
cscherrer f469ae0
more tests
cscherrer aec6841
type constraint in "logdensityof(μ::AbstractMeasure, x)" (was piracy,…
cscherrer 9e45cf2
add some docs
cscherrer f4ca677
docs
cscherrer a6cffe5
docs
cscherrer 47ee084
typo
cscherrer 46f8a9b
moar speed
cscherrer 380d696
Merge branch 'dev' of github.com:cscherrer/MeasureBase.jl into dev
cscherrer b3703bd
don't export Test
cscherrer b3d3afc
some more updates
cscherrer 1893ae3
logdensity_rel for products
cscherrer ec64718
`kleisli` docs
cscherrer 09f1c40
update instance_type
cscherrer a355832
instance_type => Core.Typeof
cscherrer 866b466
`powermeasure` bug fix
cscherrer 74777dc
fix logdensity_rel bug
cscherrer 5436d32
get `commonbase` to take x type into account
cscherrer fdbd12b
test powers
cscherrer c3ec497
commonbase docstring
cscherrer 725d2dd
deprecate instance_type
cscherrer 09d5196
avoid breakage
cscherrer f6f776e
switch || terms
cscherrer a316828
@ifelse macro
cscherrer 2ca07e7
simplify logdensity_rel
cscherrer 15d8ad4
give up on this @ifelse business
cscherrer 535dcbc
bump version
cscherrer b30963b
Merge branch 'master' into dev
cscherrer 77156ad
Make `instance` non-generated
cscherrer a733431
working on likelihoods
cscherrer f494086
update likelihood
cscherrer 999df37
powerweightedmeasure
cscherrer 5815d17
powerweighted update
cscherrer 9016423
more powerweighted methods
cscherrer c3fff7e
bugfix
cscherrer a38da82
dropFactoredBase
cscherrer 7199c22
drop FactoredBase
cscherrer a66c070
(::ProductMeasure) | constraint
cscherrer 8eda66d
update conditional measure
cscherrer fa19d73
update Dirac
cscherrer 9b86a8d
move conditional.jl down in the `include`s
cscherrer ceb310b
Kleisli => TransitionKernel
cscherrer e4bb7ff
simplify logdensity_def(::PowerMeasure, x)
cscherrer a4b3f44
rename kleisli.jl to kernel.jl
cscherrer ed5a61d
update Dirac tests
cscherrer 1f9eeaa
update Half
cscherrer f98c7db
get tests passing
cscherrer 3bb68fe
update kernel
cscherrer fafb3a2
Update Project.toml
cscherrer c9bafa5
Merge remote-tracking branch 'origin/master' into dev
cscherrer 536992f
no call-site inlining
cscherrer 3ae0f65
restrict single-arg `kernel` to <:ParameterizedMeasure
cscherrer 7364006
export log_likelihood_ratio
cscherrer 3eebcfb
Drop DensityKind(::Likelihood), at least for now
cscherrer 38b26c7
isfinite(x) instead of x>-Inf
cscherrer ba1eb20
add `condition` constructor
cscherrer 417b2d0
EOF newline
cscherrer c81ca07
simplify logdensity_def for power measures
cscherrer 11adfcf
finishing up
cscherrer a76a9ed
Merge branch 'master' into dev
cscherrer 4998111
updates
cscherrer 7408e6b
kernel stuff
cscherrer 2210d3d
kernel stuff
cscherrer c4ea293
update showe methods
cscherrer a7ba363
ass a TODO
cscherrer bc08f16
use `dot` instead of `sum`
cscherrer 20dafa9
drop old code
cscherrer 11f78c4
typo
cscherrer 0db846c
Merge branch 'kernels' into dev
cscherrer 8f9ab6b
formatting
cscherrer 0e1ecf1
cleanup
cscherrer e2a1d80
kernel updates
cscherrer 2392d8a
uncomment
cscherrer 90d4908
bugfix
cscherrer dc74704
drop old code
cscherrer 71be3c5
pretty printing
cscherrer 51d15a9
exports, cleanup
cscherrer 79dd234
drop old for.jl
cscherrer 370c8d1
Make DensityKind(::AbstractLikelihood) = IsDensity()
cscherrer c2fa848
update Compat version
cscherrer e7ec78d
Merge remote-tracking branch 'origin/master' into dev
cscherrer 5b32581
Make likelihoods work with Distributions
cscherrer 4cb7e16
_map(f, x::MappedArrays.ReadonlyMappedArray)
cscherrer 8a6ef5c
export productmeasure
cscherrer 407a8f7
Merge branch 'master' into dev
cscherrer e8a1be5
AbstractMeasure(::AbstractMeasure)
cscherrer c1b52cd
Merge branch 'master' into dev
cscherrer a08119f
Merge branch 'master' into dev
cscherrer d260e61
fixedrng
cscherrer 3bd74a0
StdNormal
cscherrer d309637
add SpecialFunctions
cscherrer 1b9cec9
no need to qualify
cscherrer aa22bef
update basemeasure
cscherrer 249b74e
include stdnormal
cscherrer ed83e12
include fixedrng
cscherrer f60f85e
update tests
cscherrer 4765887
using SpecialFunctions
cscherrer 88e1ced
fixing transport_def
cscherrer 023f3a4
transport_def bugfix
cscherrer 7c6e430
StdMeasure(::typeof(randn))
cscherrer d3f0076
checked_arg for LebesgueMeasure
cscherrer 7bfc189
NoTransformOrigin => NoTransportOrigin
cscherrer 07d2de8
transport interface for pushforwards
cscherrer 1d52b13
transporting pushforwards
cscherrer af88a14
Use LebesgueMeasure for basemeasure
cscherrer 03fa9fa
updates
cscherrer 0ee3c5a
make testvalue fall back on FixedRNG approach
cscherrer 853013c
un-break testvalue
cscherrer 00fdfd7
CI for Juila 1.8
cscherrer 3132af5
fixes
cscherrer 9bbf833
`rand` on a pushforward calls rand on its parent
cscherrer d8b52c5
LebesgueMeasure => LebesgueBase
cscherrer 9b6e066
tests passing!
cscherrer ad279ce
change `invoke` type
cscherrer 0bf97b5
Change `test_interface` to check for 2-arg testvalue
cscherrer 4720e21
manually-specifed inverses
cscherrer d2c3858
more pushfwd stuff
cscherrer beb7618
A little less wrong
cscherrer 806f314
add mass interface
cscherrer d05c044
pullback
cscherrer c0d5ba3
mass interface
cscherrer c3e8a22
working on mass interface
cscherrer 617ce41
add some `massof` methods
cscherrer 0490a25
Maybe <:Number is better for invalidations?
cscherrer f68a932
float instead of Int
cscherrer c05b5c4
logmassof
cscherrer a2d3a3b
transports for proxies
cscherrer ff7af02
drop latent-joint.jl
cscherrer 8482cf3
drop exports
cscherrer cdeb2a0
Drop `logmassof` for now
cscherrer b15190c
reorganize Lebesgue measure
cscherrer cccdaf7
IntervalSets
cscherrer dffa2ec
proxy(::Lebesgue{MeasureBase.RealNumbers}) = LebesgueBase()
cscherrer 44a1512
calling a "useproxy" measure calls its proxy
cscherrer 590c933
StdUniform()(s::Interval)
cscherrer d46afbf
typo
cscherrer 0838fa2
(m::AbstractMeasure)(s::Interval)
cscherrer 78cf303
bugfix
cscherrer 20a8378
comment
cscherrer a16d487
IntervalSets version constraint
cscherrer fcca309
update dynamic_basemeasure_depth
cscherrer c6c2bff
format
cscherrer ef7f1ab
Calling a measure calls `massof`
cscherrer 0cfacfd
work on massof
cscherrer 504936c
AbstractSuperpositionMeasure
cscherrer 0e9a563
fix typo
cscherrer e4147cf
typo
cscherrer 3eba519
format
cscherrer 2393222
docstrings
cscherrer 8ba4f5b
remove massof(::PowerWeightedMeasure) method
cscherrer d413544
make `massof` better
cscherrer 2164d71
update testvalue
cscherrer 8e63526
formatting
cscherrer 4bc9d93
update _massof
cscherrer 782c412
Update transports for weighted measures
cscherrer bb092d5
add chain rules
cscherrer be8251a
invariant mass under transport
cscherrer 38f0fe2
typo
cscherrer 93804cf
bugfix
cscherrer 4aa2b44
hasmethod => Tricks.static_hasmethod
cscherrer 6e5526f
`massof` methods
cscherrer 93ad7d4
Merge remote-tracking branch 'origin/master' into dev
cscherrer d0530c3
roll back tranports for WeightedMeasure
cscherrer e9cffcd
Improve transport implementation and add product support (#97)
oschulz 57ecece
`@useproxy` delegates `massof`
cscherrer 2201dc9
drop CI for nightly
cscherrer f58dfd4
callable densities (#85)
cscherrer 304163d
Pushfwd-inverses (#98)
cscherrer 5d1807d
remove duplicate method
cscherrer 29e0040
remove duplicate `include`
cscherrer d44ead0
simplify getdof(::PushforwardMeasure)
cscherrer 6d59555
Stieltjes measure function (#100)
cscherrer aa50a0d
drop redundant `transport_def`s
cscherrer 3dbbddf
update `pushfwd`
cscherrer d245978
change name
cscherrer 868c348
add type
cscherrer 00b128a
formatting
cscherrer 97cbb33
fix docstring
cscherrer b6c039f
depend on FunctinoChains
cscherrer f96b546
Use fchain
cscherrer 0a21672
simplify transport_def for StdLogistic
cscherrer 046b48c
simplify transport_def for StdNormal
cscherrer 18a9f99
drop redundant method
cscherrer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,6 +25,7 @@ jobs: | |
version: | ||
- '1.6' | ||
- '1.7' | ||
- '1.8' | ||
- 'nightly' | ||
os: | ||
- ubuntu-latest | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
export FixedRNG | ||
struct FixedRNG <: AbstractRNG end | ||
|
||
Base.rand(::FixedRNG) = one(Float64) / 2 | ||
Random.randn(::FixedRNG) = zero(Float64) | ||
Random.randexp(::FixedRNG) = one(Float64) | ||
|
||
Base.rand(::FixedRNG, ::Type{T}) where {T<:Real} = one(T) / 2 | ||
Random.randn(::FixedRNG, ::Type{T}) where {T<:Real} = zero(T) | ||
Random.randexp(::FixedRNG, ::Type{T}) where {T<:Real} = one(T) | ||
|
||
# We need concrete type parameters to avoid amiguity for these cases | ||
for T in [Float16, Float32, Float64] | ||
@eval begin | ||
Base.rand(::FixedRNG, ::Type{$T}) = one($T) / 2 | ||
Random.randn(::FixedRNG, ::Type{$T}) = zero($T) | ||
Random.randexp(::FixedRNG, ::Type{$T}) = one($T) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using SpecialFunctions: erfc, erfcinv | ||
using IrrationalConstants: invsqrt2 | ||
|
||
struct StdNormal <: StdMeasure end | ||
|
||
export StdNormal | ||
|
||
@inline insupport(d::StdNormal, x) = true | ||
|
||
@inline logdensity_def(::StdNormal, x) = -x^2 / 2 | ||
@inline basemeasure(::StdNormal) = WeightedMeasure(static(-0.5 * log2π), LebesgueBase()) | ||
|
||
@inline getdof(::StdNormal) = static(1) | ||
|
||
@inline transport_def(::StdUniform, μ::StdNormal, x) = erfc(-x * invsqrt2) / 2 | ||
@inline transport_def(::StdNormal, μ::StdUniform, p) = -erfcinv(2*p) * sqrt2 | ||
|
||
@inline Base.rand(rng::Random.AbstractRNG, ::Type{T}, ::StdNormal) where {T} = randn(rng, T) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not working yet:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 juhu!