sktime / skpro

A unified framework for tabular probabilistic regression and probability distributions in python
https://skpro.readthedocs.io/en/latest
BSD 3-Clause "New" or "Revised" License
232 stars 45 forks source link

[ENH] `numpy` and outer product functionality for distribution methods #341

Open fkiraly opened 4 months ago

fkiraly commented 4 months ago

Design issue related to adding outer product evaluation mode to distribution methods.

Related to comments of @felixwick in https://github.com/sktime/skpro/pull/327#discussion_r1603946431.

Currently, BaseDistribution descendants support up-broadcasting of arguments, but not up-broadcasting of results, if arguments with additional dimensions are given. Mathematically, this is related to taking outer products instead of element-wise products, in scalar or vector cases

This is a natural feature to offer, for instance tensorflow.probability functions in this way, and cyclic-boosting also has the feature.

There are a few obstacles for adding this:

Imo the most elegant way to allow this is as follows:

Examples:

Thoughts, @setoguchi-naoki, @felixwick, @vascosch92, @ShreeshaM07 ?

VascoSch92 commented 4 months ago

Makes sense to me.