Skip to content

Commit 89291f1

Browse files
authored
Release: v0.19.0
Release/v0.19.0
2 parents 489d768 + 0152891 commit 89291f1

File tree

132 files changed

+9809
-2006
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

132 files changed

+9809
-2006
lines changed

.github/workflows/rust-build-test.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: 'Rust: Build and Test'
1+
name: "Rust: Build and Test"
22

33
on:
44
push:
@@ -21,7 +21,7 @@ jobs:
2121
- uses: actions/checkout@v4
2222

2323
- name: Set up Rust
24-
uses: dtolnay/rust-toolchain@stable
24+
uses: dtolnay/rust-toolchain@nightly
2525

2626
- name: Install dependencies
2727
run: cargo install cargo-hack
@@ -36,7 +36,7 @@ jobs:
3636
- uses: actions/checkout@v4
3737

3838
- name: Set up Rust
39-
uses: dtolnay/rust-toolchain@stable
39+
uses: dtolnay/rust-toolchain@nightly
4040
with:
4141
components: rustfmt, clippy
4242

@@ -53,7 +53,7 @@ jobs:
5353
run: cargo install cargo-audit
5454

5555
- name: Run audit
56-
run: cargo audit -f Cargo.lock
56+
run: cargo audit -f Cargo.lock
5757

5858
test:
5959
runs-on: ${{ matrix.os }}
@@ -67,7 +67,7 @@ jobs:
6767
- uses: actions/checkout@v4
6868

6969
- name: Set up Rust
70-
uses: dtolnay/rust-toolchain@stable
70+
uses: dtolnay/rust-toolchain@nightly
7171

7272
- name: Run tests
7373
env:
@@ -83,13 +83,13 @@ jobs:
8383
- uses: actions/checkout@v4
8484

8585
- name: Set up Rust
86-
uses: dtolnay/rust-toolchain@stable
86+
uses: dtolnay/rust-toolchain@nightly
8787

8888
- name: Install cargo-llvm-cov
8989
uses: taiki-e/install-action@cargo-llvm-cov
9090

9191
- name: Generate code coverage
92-
run: cargo llvm-cov --all-features --workspace --codecov --output-path codecov.json
92+
run: cargo llvm-cov --doctests --all-features --workspace --codecov --output-path codecov.json
9393

9494
- name: Upload coverage reports to Codecov
9595
uses: codecov/codecov-action@v4.0.1
@@ -99,7 +99,7 @@ jobs:
9999

100100
semver-checks:
101101
runs-on: ubuntu-latest
102-
needs: ["features", "lint" ]
102+
needs: ["features", "lint"]
103103
steps:
104104
- name: Checkout branch
105105
uses: actions/checkout@v4
@@ -113,7 +113,7 @@ jobs:
113113
path: master
114114

115115
- name: Set up Rust
116-
uses: dtolnay/rust-toolchain@stable
116+
uses: dtolnay/rust-toolchain@nightly
117117

118118
- name: Install extra cargo tools
119119
run: cargo install cargo-semver-checks --locked
@@ -136,7 +136,7 @@ jobs:
136136
run: |
137137
git fetch origin master
138138
git tag --merged origin/master | grep $NEW_VERSION
139-
- uses: dtolnay/rust-toolchain@stable
139+
- uses: dtolnay/rust-toolchain@nightly
140140
- name: Install dependencies
141141
run: cargo install cargo-crate
142142
- name: Publish Updated Library Crates to Crates.io

CHANGELOG.md

Lines changed: 99 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,29 @@
11
# Changelog
22

3+
## [0.19.0] - 2025-10-03
4+
5+
### Added
6+
- Added product distributions expressible via tuples. (Note: Sufficient statistics are locked behind the `experimental` option since their behavior is not certain.)
7+
- Added `ScaledPrior` and `ShiftedPrior` wrappers.
8+
9+
10+
### Changed
11+
- Updated to Rust 2024 Edition
12+
- Updated `rand`, `rand_xoshiro`, and `rand_distr` deps.
13+
- Updated nalgebra.
14+
- `NormalInvChiSquared`, `NormalGamma`, and `NormalInvGamme` `PpCache` for Gaussian conjugate analysis changed. `ln_pp_with_cache` is much faster.
15+
- `Gamma` `PpCache` for Poisson conjugate analysis has been optimized. `ln_pp_with_cache` is faster.
16+
- Fixed some typos.
17+
- GitHub CI uses nightly since experimental features require nightly rust.
18+
- `OnceLock` removed on distribution initialization in favor of uniform initialization cost over threads.
19+
- Reworked `extract_stat` internals.
20+
- `CDVM` was cleaned up, errors expanded, and parameters made more clear.
21+
- Von Mises were sped up.
22+
- `LogSumExp` was fixed when encountering -inf.
23+
- `NormalInvGamma::ln_pp` was sped up.
24+
- `NIX` `PpCache` was sped up by 20%.
25+
- `NiX` Posterior predictive has its speed improved.
26+
327
## [0.18.1] - 2025-02-28
428

529
### Fixed
@@ -49,41 +73,60 @@
4973

5074

5175
## [0.16.5] - 2024-03-14
76+
77+
### Changed
5278
- Moved repository to GitHub.
5379

5480
## [0.16.4] - 2024-01-31
81+
### Changed
5582
- Bump min rust version to 1.72
5683
- Fix bug in `dist::Beta` that sometimes resulted in invalid cache setting
5784
`alpha`or `beta`.
5885
- Add `set_a` and `set_b` methods to `dist::Uniform`
5986

6087
## [0.16.3] - 2024-01-23
88+
89+
### Added
6190
- Implement `Variance<f64>`for mixture models whose component distribution type
6291
also implements `Variance<f64>` and `Mean<f64>`.
6392
- Implement `Variance<f32>`for mixture models whose component distribution type
6493
also implements `Variance<f32>` and `Mean<f32>`.
6594

6695
## [0.16.2] - 2024-01-02
96+
97+
### Changed
6798
- Fix edge case in `misc::logsumexp` that would return `NaN` if the first value
6899
in the slice was `-inf`.
69100

70101
## [0.16.1] - 2023-12-14
102+
103+
### Changed
71104
- Performance improvements in `misc::logsumexp`
72105

73106
## [0.16.0] - 2023-06-07
107+
108+
### Changed
74109
- Fix bug in `InvGaussianSuffStat`
110+
- Cache ln(weights) for `Mixture` to improve `ln_f` computation performance
111+
112+
### Added
75113
- Add `ln_f_stat` method to `HasSuffStat` trait. This method computes the log
76114
likelihood of the data represented by the statistic.
77-
- Un-implement `HasSuffStat<f64>` for `InverseGamma`
78115
- Add `InvGammaSuffStat`
79116
- Add `BetaSuffStat`
80-
- Cache ln(weights) for `Mixture` to improve `ln_f` computation performance
117+
118+
### Removed
119+
- Un-implement `HasSuffStat<f64>` for `InverseGamma`
81120

82121
## [0.15.1] - 2023-05-22
122+
123+
### Changed
83124
- Fix bug in `Empirical::draw` that causes an `index out of bounds error` when
84125
the last last bin is drawn.
85126

86127
## [0.15.0] - 2023-03-07
128+
129+
### Changed
87130
- All structs and enums use `snake_case` naming.
88131
- Dependency updates (thanks @bsull).
89132
- Entropy impl for Bernoulli Mixuture.
@@ -93,31 +136,45 @@
93136
- Improve CI.
94137

95138
## [0.14.4] - 2022-02-16
139+
140+
### Changed
96141
- re-export nalgebra (flag `arraydist`)
97142
- add `reparameterize` method to `process::gaussian::Kernel`, which will
98143
replace `from_parmeters` in 0.15.0
99144
- Implement `Error` for `NormalInvGammaError` and `NormalInvChiSquaredError`
100145

101146
## [0.14.3] - 2022-02-16
147+
148+
### Removed
102149
- Remove dependency on peroxide
103150

104151
## [0.14.2] - 2022-01-31
152+
153+
### Changed
105154
- Fix some incorrect documentation
106155
- Pass `--all-features` to docs.rs builds
107156

108157
## [0.14.1] - 2022-01-21
158+
159+
### Changed
109160
- Fix bug in computation of entropies for continuous mixture models
110161

111162
## [0.14.0] - 2022-01-05
163+
164+
### Changed
112165
- Fix typo: `CategoricalError::EmptyWights` to `CategoricalError::EmptyWeights`
113166
- Allow `Categorical::from_ln_weights` to accept zero (-Inf) weights
114167
- Update `lru` crate to 0.7 due to security vulnerability in 0.6.6
115168

116169
## [0.13.1] - 2021-08-14
170+
171+
### Changed
117172
- When using `dist::Gamma` to draw a `dist::Poisson`, the Poisson rate
118173
parameter is shifted to `f64::EPSILON` in the event of underflow.
119174

120175
## [0.13.0] - 2021-07-15
176+
177+
### Changed
121178
- Clippy lints
122179
- Use `&'a [T]` instead of `&'a Vec<T>` in `DataOrSuffStat`
123180
- Use `&[T]` instead of `&Vec<T>` in `GewekeTester`
@@ -131,6 +188,8 @@
131188
`Mixture::combine` where one or more of the inputs was an empty mixture
132189

133190
## [0.12.0] - 2021-05-05
191+
192+
### Added
134193
- Added Inverse X^2 distribution
135194
- Added Scaled Inverse X^2 distribution (`InvChiSquared`)
136195
- Added Inverse Gaussian distribution
@@ -140,55 +199,78 @@
140199
- Added Inverse X^2 distribution (`InvChiSquared`)
141200
- Implemented `From` instead of `Into` for sufficient statistic converters to
142201
allow the more explicit/ergonomic `From` conversions.
202+
- Added Gaussian prior geweke tests and example
203+
- More robust dpgmm example -- can use different priors
204+
205+
### Changed
143206
- Improved some error messages in `NormalGamma`
144207
- Caching of a normalizing constant in `BetaBinomial`
145208
- Lots of testing verifying proper conjugate prior behavior
146-
- Added Gaussian prior geweke tests and example
147-
- More robust dpgmm example -- can use different priors
148209
- Version updates
149210
- Misc styling and warning fixes
150211

151212
## [0.11.1] - 2021-02-12
213+
214+
### Added
152215
- Added Normal Inverse Gamma (`NormalInvGamma`) distribution as prior for
153216
Gaussian
154217

155218
## [0.11.0] - 2020-11-20
219+
220+
### Changed
221+
- Gaussian process improvements including new kernels
222+
223+
### Added
156224
- Added `_with_cache` variants to `ConjugatePrior` `ln_m` and `ln_pp` methods
157225
for use cases where these methods are called many times in different data
158226
without changing the underlying distribution. This also adds two more
159227
associated types to the trait (`LnMCache` and `LnPpCache`), and one method
160228
each to compute the caches.
229+
230+
### Removed
161231
- Remove all references to `serde_derive` crate
162-
- Gaussian process improvements including new kernels
163232

164233
## [0.10.4] - 2020-10-09
234+
235+
### Added
165236
- Added Gaussian processes
166237

167238
## [0.10.3] - 2020-10-07
239+
### Changed
168240
- Updated math in `NormalGamma` and `GaussianSuffStat` to reduce rounding errors
169241

170242
## [0.10.2] - 2020-09-07
243+
### Changed
171244
- Categorical datum converters work like standard usize-to-boolean casting where
172245
0 is false, and anything greater than 0 is true.
173246

174247
## [0.10.1] - 2020-08-10
248+
### Changed
175249
- Add `from_parts_unchecked` method for constructing sufficient statistic since
176250
there was no way of manipulating statistic's fields or creating them
177251
manually.
178252

179253
## [0.10.0] - 2020-06-02
254+
255+
### Changed
180256
- Implement Poisson Mode
181257
- Store `GaussianSuffStat` in a more numerically stable way. The extra numerical
182258
stability comes at the cost of slower `observe` and `forget`. Serialization
183259
on `GaussianSuffStat` has changed.
184260

185261
## [0.9.3] - 2020-05-30
262+
263+
### Changed
186264
- Entropy for Gaussian mixtures more robust to models with dispersed
187265
low-variance components
188266
- Categorical::new_unchecked is now public
189267

190268
## [0.9.2] - 2020-05-23
269+
270+
### Changed
191271
- Benchmarks
272+
273+
### Added
192274
- implement `Entropy` and `KlDivergence` for `Poisson`
193275
- Implement `QuadBounds` and `Entropy` for `Mixture<Poisson>`
194276
- Implement `Mean` for mixtures of distributions that implement `Mean<f64>` or
@@ -197,29 +279,40 @@
197279
random numbers.
198280

199281
## [0.9.1] - 2020-05-16
282+
283+
### Removed
200284
- Remove printlns
201285

202286
## [0.9.0] - 2020-05-16
287+
288+
### Changed
203289
- Refactor errors to provide more information
204290
- Errors implement the `std::error::Error` trait
205291
- Fixed a bug with `rv::dist::Mixture` that would compute means incorrectly
206292
- `MvGaussian::dims` renamed to `MvGaussian::ndims`
207293
- More aggressive caching of log likelihood terms
208294
- Cached terms no longer unnecessarily computed on `Clone`
209-
- Remove dependency on `getset`
210295
- Setters do input validation unless prefixed by `_unchecked`.
211296
- feature `serde_support` renamed to `serde1`
212297

298+
### Removed
299+
- Remove dependency on `getset`
300+
213301
## [0.8.3] - 2020-05-05
302+
303+
### Added
214304
- Added Negative Binomial distribution
215305
- Added Skellam Distribution
216306
- Add `try_quad` function for numerical integration of functions that return
217307
`Result<f64, E>`.
218308

219309
## [0.8.2] - 2020-02-12
310+
311+
### Removed
220312
- Remove dependency on `quadrature` crate in favor of hand-rolled adaptive
221313
Simpson's rule, which handles multimodal distributions better.
222314

315+
[0.19.0]: https://github.com/promise-ai/rv/compare/v0.18.1...v0.19.0
223316
[0.18.1]: https://github.com/promise-ai/rv/compare/v0.18.0...v0.18.1
224317
[0.18.0]: https://github.com/promise-ai/rv/compare/v0.17.0...v0.18.0
225318
[0.17.0]: https://github.com/promise-ai/rv/compare/v0.16.5...v0.17.0

0 commit comments

Comments
 (0)