-
-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Closed
Labels
Milestone
Description
I propose a __sk_clone__
method that clone
calls (if the method exist). This way arbitrary objects can define how they want to be cloned. This is similar to mechanism behind __sk_is_fitted__
+ check_is_fitted
.
Purpose
There are PR that run into issues with clone
, and it would be nice to allow the estimator
to define how it wants to be cloned.
- Metadata routing: Base sample-prop implementation and docs #21284 Needed to change
clone
to copy an private attribute that is configured outside of__init__
- Search spaces in estimator: Initial implementation of GridFactory #21784 (comment) the search space itself needs to be copied over when
clone
gets called. - Ability to customize cloning: Strict identity parameter check in sklearn.base.clone #15371 (comment)