Skip to content

[BUG] zero_inflated_regressor.py #664

@jcoding2022

Description

@jcoding2022

The Bug

  • The ZeroInflatedRegressor class consists of a classifier and a regressor and it says in the documentation that "The regressor is only trained on examples where the target is non-zero, which makes it easier for it to focus." In the code, however, the regressor is actually trained on examples where the classifier-predicted target is non-zero.

How to Fix the Bug

  • Just replace line 111 with the following code:
non_zero_indices = np.where(y != 0)[0]

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions