Skip to content

[ENH] review distributions extender API with a view to composite distributions #615

@fkiraly

Description

@fkiraly

Currently, the distribution API seems problematic in cases of composite distributions, such as the TransformedDistribution. We should review and possibly alter, or extend, the extension contract.

Three points of issue:

  • internally, methods like _cdf receive 2D np.ndarray in the array case, but cdf expects pd.DataFrame, so a naive internal call needs to attach indices to the np.ndarray again. Calling internal _cdf is not an option due to the boilerplate functions.
  • the contract is undefined on what the index and columns of the inner distributions should be, especially when mathematically they are meant to be equal
    • as a sub-problem, what should happen if a user sets index after construction on the outer distribution - should it also set the inner indices?
  • _iloc is not nesting well with distributions, as already discussed in [ENH] Default _iloc and _iat to include handling of composite distribution objects #559

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions