Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENH] interfacing Poisson regressor from sklearn #213

Merged
merged 5 commits into from
Apr 25, 2024

Conversation

nilesh05apr
Copy link
Contributor

Reference Issues/PRs

#7

What does this implement/fix? Explain your changes.

Added interface for Poisson Regressor

Does your contribution introduce a new dependency? If yes, which one?

None

Did you add any tests for the change?

None

PR checklist

For all contributions
  • I've added myself to the list of contributors with any new badges I've earned :-)
    How to: add yourself to the all-contributors file in the skpro root directory (not the CONTRIBUTORS.md). Common badges: code - fixing a bug, or adding code logic. doc - writing or improving documentation or docstrings. bug - reporting or diagnosing a bug (get this plus code if you also fixed the bug in the PR).maintenance - CI, test framework, release.
    See here for full badge reference
  • The PR title starts with either [ENH], [MNT], [DOC], or [BUG]. [BUG] - bugfix, [MNT] - CI, test framework, [ENH] - adding or improving code, [DOC] - writing or improving documentation or docstrings.
For new estimators
  • I've added the estimator to the API reference - in docs/source/api_reference/taskname.rst, follow the pattern.
  • I've added one or more illustrative usage examples to the docstring, in a pydocstyle compliant Examples section.
  • If the estimator relies on a soft dependency, I've set the python_dependencies tag and ensured
    dependency isolation, see the estimator dependencies guide.

@nilesh05apr
Copy link
Contributor Author

@fkiraly can you please approve changes? I will keep adding more linear models.

Copy link
Collaborator

@fkiraly fkiraly left a comment

Choose a reason for hiding this comment

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

Thanks, nice idea!

However, I think more is needed to add the poisson regressor.

The current SklearnProbaReg assumes a normal distribution, and predict having an return_std argument. This is not true for the sklearn PoissonRegressor:

  • the assumed return distribution is the Poisson distribution
  • predict does not have a return_std, it simply returns the rate parameter.

To make this work, you would have to:

  • add a tabular Poisson distribution to the distributions module
  • use that to encode the output of predict (the rate parameter)

@fkiraly fkiraly added enhancement module:regression probabilistic regression module labels Mar 15, 2024
@nilesh05apr
Copy link
Contributor Author

@fkiraly thanks for the review, I will implement the changes soon

@fkiraly fkiraly changed the title [ENH] interfacing Poission regressors from sklearn [ENH] interfacing Poisson regressors from sklearn Apr 8, 2024
@fkiraly fkiraly changed the title [ENH] interfacing Poisson regressors from sklearn [ENH] interfacing Poisson regressor from sklearn Apr 25, 2024
Copy link
Collaborator

@fkiraly fkiraly left a comment

Choose a reason for hiding this comment

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

Abandoned - wrapped it up so it can be merged

@fkiraly fkiraly merged commit 5345bdf into sktime:main Apr 25, 2024
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement module:regression probabilistic regression module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants