Skip to content

[BUG] Hurdle CDF is wrong for negative values #651

@tingiskhan

Description

@tingiskhan

Describe the bug

The CDF of the Hurdle distribution should return 0 for values < 0, currently returns 1-p.

Kudos to @Khushmagrawal for finding it!

To Reproduce

E.g.

from skpro.distributions import Hurdle, Normal

dist = Normal(mu=0.0, sigma=1.0)
hurdle = Hurdle(0.5, dist)

samples = -1.0

p = hurdle.cdf(samples)

Expected behavior

Should be zero for all values less than 0.

Environment

Not nocessary for skpro <= 2.10

Additional context

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions