Skip to content

Conversation

@plidan123
Copy link
Collaborator

This commit unifies the sample generators for all mixture types (NMM, NMV, NV) by integrating canonical form support directly into the main generator function. Previously, each mixture type had separate classical and canonical generators.

Now, the generator checks mixture_form inside the function and switches behavior accordingly. In canonical form, the beta parameter is not used. This simplifies the generator API and reduces code duplication.

  • Updated nm_generator.py, nmv_generator.py, nv_generator.py
  • Remembered mixture_form in AbstractMixture class
  • Updated tests and notebook to use the new unified API

BREAKING CHANGE: canonical_generate() methods were removed; use generate() instead.

@plidan123 plidan123 requested a review from Engelsgeduld May 10, 2025 12:44
This commit unifies the sample generators for all mixture types (NMM, NMV, NV)
by integrating canonical form support directly into the main generator function.
Previously, each mixture type had separate classical and canonical generators.

Now, the generator checks mixture_form inside the function and switches behavior
accordingly. In canonical form, the beta parameter is not used. This simplifies
the generator API and reduces code duplication.

- Updated nm_generator.py, nmv_generator.py, nv_generator.py
- Remembered `mixture_form` in AbstractMixture class
- Updated tests and notebook to use the new unified API

BREAKING CHANGE: canonical_generate() methods were removed; use generate() instead.
@Desiment Desiment force-pushed the feat/unify-mixture-generators branch from 175f890 to 87bd31a Compare May 28, 2025 18:34
plidan123 added a commit that referenced this pull request Jun 25, 2025
feat: unify mixture generators and support canonical forms
@plidan123 plidan123 mentioned this pull request Jun 26, 2025
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