Skip to content

ACDC#22

Open
rsenne wants to merge 8 commits into
mainfrom
ACDC
Open

ACDC#22
rsenne wants to merge 8 commits into
mainfrom
ACDC

Conversation

@rsenne

@rsenne rsenne commented Jun 6, 2026

Copy link
Copy Markdown
Owner

Ports over ACDC from this PR. In StateSpaceDynamics.jl. This is a better spot for it as SSD no longer supports HMMs and is refocusing to LDS models explicitly

@nguyenston Would you like to review this? Its you code but ported here and mended a little. Please let me know how that sounds! I don't want your effort to go to waste. I've also credited you on this PR

Port the Accumulated Cutoff Discrepancy Criterion (Li et al., 2026) from
StateSpaceDynamics.jl PR #87, re-scoped to work with any AbstractHMM from
HiddenMarkovModels.jl rather than SSD-internal model types.

- Model-agnostic core (src/acdc/interface.jl): result types, the KL/KS/
  Wasserstein/SquaredError/MMD discrepancies, and acdc_loss/acdc_select/
  get_critical_rho_values.
- Driver recovery (src/acdc/drivers.jl) runs off the standard Distributions
  PIT: cdf for continuous, randomized PIT for discrete, Cholesky-Rosenblatt
  for MvNormal. This subsumes the original Gaussian/Poisson/Bernoulli/
  regression adapters and covers any standard emission; custom emissions add
  one _emission_to_driver method.
- HiddenMarkovModels is a weak dependency: the stochastic_drivers(::AbstractHMM)
  method lives in a package extension, keeping EmissionModels usable standalone.
- New hard deps: NearestNeighbors (KL kNN), Statistics.

GMM/PMM/PPCA adapters and WrappedCauchy support were intentionally dropped
(no counterpart types in HiddenMarkovModels.jl / EmissionModels.jl).

Co-Authored-By: nguyenston <phucnguyen1999.nn@gmail.com>
@codecov

codecov Bot commented Jun 6, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.43750% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 99.11%. Comparing base (7a46b05) to head (da25f74).

Files with missing lines Patch % Lines
src/acdc/interface.jl 98.85% 2 Missing ⚠️
src/acdc/drivers.jl 98.24% 1 Missing ⚠️
src/acdc/hmm.jl 95.83% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #22      +/-   ##
==========================================
- Coverage   99.34%   99.11%   -0.23%     
==========================================
  Files           3        6       +3     
  Lines         759     1014     +255     
==========================================
+ Hits          754     1005     +251     
- Misses          5        9       +4     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

rsenne added 3 commits June 5, 2026 22:38
- Format: relocate an inline block comment in glm.jl that JuliaFormatter v2
  (the version CI pins) strips; repo now passes `format(".", overwrite=false)`.
- Docs: add docs/src/acdc.md documenting the ACDC public API and register it in
  make.jl; convert ACDC internal-helper docstrings to comments (matching the
  project convention) so Documenter's checkdocs=:all passes.
- Coverage: add tests for the KL too-few-samples path, multivariate
  SquaredError/Wasserstein, the MMD block-averaging path, the unsupported-
  emission error, and HMM adapter argument validation.
@nguyenston

Copy link
Copy Markdown

@rsenne I'm currently preparing for my thesis defense. Thank you for porting it through the refactor. I will definitely take a look at this in about 2 weeks. Hope that's ok

@rsenne

rsenne commented Jun 8, 2026

Copy link
Copy Markdown
Owner Author

Hi @nguyenston no worries, good luck with your thesis defense! just ping me when ready, no rush on this

@rsenne

rsenne commented Jul 7, 2026

Copy link
Copy Markdown
Owner Author

Hi @nguyenston just wanted to follow up on this--hope your thesis defense went well!

@nguyenston

Copy link
Copy Markdown

@rsenne yes, I've just submitted the document to library, I will start looking at this now

@rsenne

rsenne commented Jul 7, 2026

Copy link
Copy Markdown
Owner Author

Congrats! Also, feel free to open up any PRs related to work you'd like to showcase (e.g., your paper had the animal tracking example IIRC so that feels on brand here and could be added in docs, where you could also cite yourself!)

Of course no pressure, just wanted to let you know contributions are welcome. Am hoping to add this package to registry in next month or so

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants