Skip to content

dist_math.incomplete_beta is very slow #4420

Closed
@ricardoV94

Description

@ricardoV94

I notice this when running test_distributions.py. Any distribution logcdf method that uses incomplete_beta takes ages to run.

Right now it is used in the logcdf methods of Beta, StudentT, Binomial, NegativeBinomial, and ZeroInflated versions of the last two distributions.

Is there a reason why this cannot be implemented as a Theano C Op? Scipy has C implementation here, which seems to be doing exactly the same as our algorithm in dist_math.py:
https://github.com/scipy/scipy/blob/master/scipy/special/cephes/incbet.c

In addition, this would probably make it trivial to implement a vectorized version for tensors, allowing the logcdf methods of the distributions above to evaluate more than one value at a time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions