Skip to content

Separate sampling from the distribution scoring contract - #88

Draft
jonathanberthias wants to merge 2 commits into
migration/explicit-state-metricsfrom
migration/sampleable-capability
Draft

jonathanberthias wants to merge 2 commits into
migration/explicit-state-metricsfrom
migration/sampleable-capability

Conversation

@jonathanberthias

Copy link
Copy Markdown
Collaborator

The new distribution base currently requires random sampling even though fitting, scoring, profiling, and information criteria only need pointwise log_prob. That requirement would force future scoreable models to implement a sampler before they can use the shared graph.

This PR makes Distribution the scoring contract and adds SampleableDistribution for laws that support rvs. Existing SciPy wrappers, extreme-value conveniences, truncation, and Bernoulli explicitly implement the sampling capability. A score-only distribution can now participate in fitting without a placeholder sampler.

The continuous CDF and quantile operations remain a separate capability; this change does not add requirements for discrete or multivariate laws.

@jonathanberthias
jonathanberthias force-pushed the migration/sampleable-capability branch from c0e25e5 to a43ab0f Compare September 27, 2026 15:27
@jonathanberthias
jonathanberthias force-pushed the migration/explicit-state-metrics branch from e295cf4 to 141a918 Compare September 27, 2026 15:27
@jonathanberthias
jonathanberthias force-pushed the migration/sampleable-capability branch from a43ab0f to 3fda28a Compare September 27, 2026 20:09
@jonathanberthias
jonathanberthias force-pushed the migration/explicit-state-metrics branch 2 times, most recently from 53554f1 to 5a7a426 Compare September 27, 2026 20:27
@jonathanberthias
jonathanberthias force-pushed the migration/sampleable-capability branch 2 times, most recently from ef29e8b to 5490832 Compare October 2, 2026 21:05
@jonathanberthias
jonathanberthias force-pushed the migration/explicit-state-metrics branch from 9e3f684 to 22b2aa8 Compare October 2, 2026 21:05
@jonathanberthias
jonathanberthias force-pushed the migration/sampleable-capability branch from 5490832 to a4e6af2 Compare October 2, 2026 22:25
@jonathanberthias
jonathanberthias force-pushed the migration/explicit-state-metrics branch from 22b2aa8 to 6a6b37c Compare October 2, 2026 22:25
@jonathanberthias
jonathanberthias force-pushed the migration/explicit-state-metrics branch from 6a6b37c to 4f6d924 Compare October 3, 2026 11:02
@jonathanberthias
jonathanberthias force-pushed the migration/sampleable-capability branch from a4e6af2 to 8def56e Compare October 3, 2026 11:03
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.

1 participant