-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
Description
ExponentialClassFamily: registry integration and runtime introspection
Task
Integrate ExponentialClassFamily into the existing families infrastructure and make it detectable at runtime.
Requirements
1. Placement and inheritance
ExponentialClassFamilymust live in thefamiliesmodule.- It must inherit from
ParametricFamily. - It must satisfy the
ParametricFamilyinterface so that any function that expects aParametricFamilycan also accept anExponentialClassFamily.
2. Registry integration
- Ensure that instances of
ExponentialClassFamilycan be created and registered in the existing registry (the same mechanism used for “ordinary” parametric families). - The registry should not need a separate code-path just for exponential families:
- registration should use the same API as for regular
ParametricFamilyinstances, - but it should be possible to query whether a family is exponential-class.
- registration should use the same API as for regular
3. Runtime introspection
Provide a minimal mechanism to distinguish at runtime whether a given family is:
- a “generic” parametric family (
ParametricFamilywithout special exponential structure), - or an exponential-class family (
ExponentialClassFamily).
Possible approaches (choose one and document):
- add a boolean property
is_exponential_familyonParametricFamily, overridden toTrueinExponentialClassFamily; - rely on
isinstance(family, ExponentialClassFamily)checks; - or a small registry of exponential families.
The chosen approach should:
- be simple to use in downstream code (e.g. Bayesian utilities),
- avoid breaking existing code that only knows about
ParametricFamily.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
No status