Skip to content

Conversation

@wrdxwrdxwrdx
Copy link
Collaborator

@wrdxwrdxwrdx wrdxwrdxwrdx commented Dec 23, 2025

UNU.RAN integration

It may be necessary to change the license.

Start with notebooks and scripts under examples/—they showcase end-to-end scenarios for the new sampling strategy.

UNURAN lives in vendor/ and doesn’t need review.

Platforms

  • Supported: Linux (Ubuntu) and macOS.
  • Windows: CFFI build is temporarily skipped.

Added

  1. CFFI build + UNU.RAN bindings.
  2. DefaultUnuranSampler that samples based on a distribution and method config.
  3. DefaultUnuranSamplingStrategy wraps sampling, caches the last sampler, and returns (n, 1) arrays.
  4. Tests covering CFFI build, callbacks, initialization, and orchestration.

Characteristics & methods

  • Continuous (PDF/CDF/PPF) -> methods AROU, TDR, HINV, PINV, NINV.
  • Discrete (PMF/CDF) -> DGT.

AUTO logic

  • UnuranMethodConfig defines use_ppf/pdf/cdf, seed, and explicit method (seed currently unused).
  • Method selection lives in src/pysatl_core/stats/_unuran/bindings/_core/helpers.py (_select_best_method).

@wrdxwrdxwrdx wrdxwrdxwrdx marked this pull request as ready for review December 23, 2025 17:54
@wrdxwrdxwrdx wrdxwrdxwrdx marked this pull request as draft December 23, 2025 18:55
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.

3 participants