Skip to content

Conversation

@FBruzzesi
Copy link
Collaborator

Description

Issue reported in #664 is very reasonable. I tried to take a look at when ZeroInflatedRegressor was introduced in #442, but I couldn't find any related discussion on such choice.

Fix #664

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

self.classifier_.fit(X, y != 0, sample_weight=sample_weight)
else:
logging.warning("Classifier ignores sample_weight.")
self.classifier_.fit(X, y != 0)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just as a side note after taking a look at the internals: as classifier_ is supposed to classify zeros, wouldn't make sense to fit on y==0? If so, that's a total of 3 lines that need changes. Not big deal anyway

@FBruzzesi FBruzzesi requested a review from koaning May 11, 2024 12:49
@koaning koaning marked this pull request as ready for review May 12, 2024 11:13
@FBruzzesi FBruzzesi merged commit d6eac98 into koaning:main May 12, 2024
@FBruzzesi FBruzzesi deleted the patch/zero-inflated-regressor branch May 12, 2024 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] zero_inflated_regressor.py

2 participants