keras-mdn-layer icon indicating copy to clipboard operation
keras-mdn-layer copied to clipboard

Convert to a scipy distribution object

Open yoavram opened this issue 5 years ago • 2 comments

It would be nice to have a helper function that takes the output of the model and converts it to a scipy.stats rv object so that it can be used to compute density or cumulative density, etc. I’m guessing it’s not complicated to do, looking at the example in https://github.com/cpmpercussion/keras-mdn-layer/blob/master/notebooks/MDN-2D-spiral-prediction.ipynb (specifically the cell starting with “Plot the means”).

yoavram avatar Jun 23 '20 14:06 yoavram

Hm, I'm not really sure what a scipy.stats rv object is, so probably something that would be better handled by someone into using scipy.stats regularly.

cpmpercussion avatar Aug 07 '20 05:08 cpmpercussion

For the record, this is an rv (random variable) in scipy: https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.rv_continuous.html

yoavram avatar Aug 09 '20 05:08 yoavram