-
Notifications
You must be signed in to change notification settings - Fork 37
Commit 3a0b7e3
Implementation of
* initial work on VecCorrBijector
* added some tests for CorrBijector, and fixed implementation for VecCorrBijector
* improved tests and are now using integer sqrt and division
* moved things around a bit
* added chainrule for ReverseDiff
* some fixes for AD
* added some TODOs
* Update src/bijectors/corr.jl
* define bijectors for `LKJ` and `LKJCholesky`
* add `TransformedDistribution` constructor
for `LKJCholesky`
* define `logpdf` for `LKJ` & `LKJCholesky`
* define `rand` for `LKJ` & `LKJCholesky`
* add util to extract Cholesky factor
* TYPO: capitalize matrix
* add util to convert `Vector` index
to `Matrix` row index
* add `VecTriBijector`s for `LKJCholesky`
* TYPO: capitilize matrix
* add `LKJCholesky` link for `UpperTriangular`
* add `LKJCholesky` link for `LowerTriangular`
* TYPO: capitalize matrix
* add `LKJCholesky` inverse link to `UpperTriangular`
* rename `_logabsdetjac_chol_lkj`
to `_logabsdetjac_inv_corr`
* dispatch `_logabsdetjac_inv_corr` for `::Vector`
* add logabsdetjac for inverse link of `LKJCholesky`
* add tests for `VecTriBijector`s
* add `rrule` for LKJ(Cholesky) link function
* use `transpose` in link for `::LowerTriangular'
* add `Tracker` support for inverse link
* better utility function call
* use function barrier properly for type stability
* account for difference in support dimensions
* fix indexing in Jacobian of `VecCorrBijector`
* add `_logabsdetjac_dist` for `::LKJCholesky`
* replace function composition for proper barrier
* add util convert `Transpose -> Matrix` for type stability
* add `LKJCholesky` Jacobian+type tests
* fix `logabsdetjac` for inverse link
* use `Cholesky` constructor compatible with `v1.6`
* add empty line
* fix `rrule` for link function
* add link `rrule` test
* add `rrule` for inverse link
* remove TODO
* add inverse link `rrule` test
* Update src/bijectors/corr.jl
Co-authored-by: Tor Erlend Fjelde <[email protected]>
* add link `rrule` for `LowerTriangular`
* add `LowerTriangular` chainrule test
* Update src/bijectors/corr.jl
Co-authored-by: Tor Erlend Fjelde <[email protected]>
* remove unused util
* use `similar` instead of `zeros`
* update comments
* remove old comment
* minimize zero-setting operations in inverse link
* minimize zero-setting operations in `rrule`
* add parametric `Val` type to `VecCorrBijector`
* update `VecCorrBijector` tests
* use field value instead of `Val`-parametric type
* update tests with new `VecCorrBijector`
* `using VecCorrBijector` in test utils
* add `VecCorrBijector.mode` check
* update `VecCorrBijector` docstring
* specialise `Zygote@adjoint` for `AbstractMatrix`
* `ReverseDiff` opt-in to `ChainRules`
* empty lines format
* add AD test for inverse link
* include `VecCorrBijector` tests
* remove broken flag for `Tracker`
* add roundtrip AD tests for `VecCorrBijector`
* remove wrong `ReverseDiff.@grad` for `pd_from_upper`
* add corrected `rrule` for `pd_from_upper`
* update AD tests
* remove `Tracker` from broken
* update zero-filling in `Tracker` pullback
* fix `Zygote`
* merge lines - applying feedback suggestions
* `unthunk` in `pd_from_upper` rrule
* split structs into `VecCorrBijector` and `VecCholeskyBijector`
* remove old `Zygote` adjoints
* update tests
* fix `Union` in `@inferred` after splitting structs
* remove `Tracker` tests as support is dropped
* use `permutedims` instead of casting
* remove `Union` in `@inferred`
* initial work on VecCorrBijector
* added some tests for CorrBijector, and fixed implementation for VecCorrBijector
* improved tests and are now using integer sqrt and division
* moved things around a bit
* added chainrule for ReverseDiff
* some fixes for AD
* added some TODOs
* define bijectors for `LKJ` and `LKJCholesky`
* add `TransformedDistribution` constructor
for `LKJCholesky`
* define `logpdf` for `LKJ` & `LKJCholesky`
* define `rand` for `LKJ` & `LKJCholesky`
* add util to extract Cholesky factor
* TYPO: capitalize matrix
* add util to convert `Vector` index
to `Matrix` row index
* add `VecTriBijector`s for `LKJCholesky`
* TYPO: capitilize matrix
* add `LKJCholesky` link for `UpperTriangular`
* add `LKJCholesky` link for `LowerTriangular`
* TYPO: capitalize matrix
* add `LKJCholesky` inverse link to `UpperTriangular`
* rename `_logabsdetjac_chol_lkj`
to `_logabsdetjac_inv_corr`
* dispatch `_logabsdetjac_inv_corr` for `::Vector`
* add logabsdetjac for inverse link of `LKJCholesky`
* add tests for `VecTriBijector`s
* add `rrule` for LKJ(Cholesky) link function
* use `transpose` in link for `::LowerTriangular'
* add `Tracker` support for inverse link
* better utility function call
* use function barrier properly for type stability
* account for difference in support dimensions
* fix indexing in Jacobian of `VecCorrBijector`
* add `_logabsdetjac_dist` for `::LKJCholesky`
* replace function composition for proper barrier
* add util convert `Transpose -> Matrix` for type stability
* add `LKJCholesky` Jacobian+type tests
* fix `logabsdetjac` for inverse link
* use `Cholesky` constructor compatible with `v1.6`
* add empty line
* fix `rrule` for link function
* add link `rrule` test
* add `rrule` for inverse link
* remove TODO
* add inverse link `rrule` test
* Update src/bijectors/corr.jl
Co-authored-by: Tor Erlend Fjelde <[email protected]>
* add link `rrule` for `LowerTriangular`
* add `LowerTriangular` chainrule test
* Update src/bijectors/corr.jl
Co-authored-by: Tor Erlend Fjelde <[email protected]>
* remove unused util
* use `similar` instead of `zeros`
* update comments
* remove old comment
* minimize zero-setting operations in inverse link
* minimize zero-setting operations in `rrule`
* add parametric `Val` type to `VecCorrBijector`
* update `VecCorrBijector` tests
* use field value instead of `Val`-parametric type
* update tests with new `VecCorrBijector`
* `using VecCorrBijector` in test utils
* add `VecCorrBijector.mode` check
* update `VecCorrBijector` docstring
* specialise `Zygote@adjoint` for `AbstractMatrix`
* `ReverseDiff` opt-in to `ChainRules`
* empty lines format
* add AD test for inverse link
* include `VecCorrBijector` tests
* remove broken flag for `Tracker`
* add roundtrip AD tests for `VecCorrBijector`
* remove wrong `ReverseDiff.@grad` for `pd_from_upper`
* add corrected `rrule` for `pd_from_upper`
* update AD tests
* remove `Tracker` from broken
* update zero-filling in `Tracker` pullback
* fix `Zygote`
* merge lines - applying feedback suggestions
* `unthunk` in `pd_from_upper` rrule
* split structs into `VecCorrBijector` and `VecCholeskyBijector`
* remove old `Zygote` adjoints
* update tests
* fix `Union` in `@inferred` after splitting structs
* remove `Tracker` tests as support is dropped
* use `permutedims` instead of casting
* remove `Union` in `@inferred`
* wrap matrix in `Hermitian` before `cholesky`
* add hacky dispatch for `cholesky_factor` and `ReverseDiff`
* import `cholesky_factor` in ReverseDiff module for hacky dispatch
* only use hacky `cholesky_factor` in versions before fix
* change `LKJCholesky` shape to avoid stochastic test failures
* remove old TODOs
* add explicit zero-filling in link for `CorrBijector`
---------
Co-authored-by: harisorgn <[email protected]>
Co-authored-by: Hong Ge <[email protected]>VecCorrBijector
(#246)1 parent 24fa396 commit 3a0b7e3Copy full SHA for 3a0b7e3
File tree
14 files changed
+777
-181
lines changedFilter options
- src
- bijectors
- compat
- test
- ad
- bijectors
14 files changed
+777
-181
lines changed+4-1
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
33 | 33 |
| |
34 | 34 |
| |
35 | 35 |
| |
36 |
| - | |
| 36 | + | |
37 | 37 |
| |
38 | 38 |
| |
39 | 39 |
| |
| |||
145 | 145 |
| |
146 | 146 |
| |
147 | 147 |
| |
| 148 | + | |
| 149 | + | |
| 150 | + | |
148 | 151 |
| |
149 | 152 |
| |
150 | 153 |
| |
|
0 commit comments