koaning / scikit-lego

Extra blocks for scikit-learn pipelines.
https://koaning.github.io/scikit-lego/
MIT License
1.28k stars 118 forks source link

`DeadZoneRegressor` support for "constant" effect #588

Closed FBruzzesi closed 1 year ago

FBruzzesi commented 1 year ago

Description

The PR solves #587 by adding support for effect="constant".

Additionally, as discussed in the issue, it removes the need of autograd by implementing derivative by hand (😂) and by using scipy.optimize.minimize for optimization.

This leads to a few potential breaking changing in the API as the following argument are no longer needed:

and the following attributes are no longer available:

Type of change

Checklist:

If you feel your PR is ready for a review, ping @koaning or @mbrouns.