Open Jacob-Stevens-Haas opened 1 year ago
Actually this is a little bit confusing. Currently identifying the feature names for the model requires feature_library.fit()
. Not sure how this is working right now That may be worth changing, since knowing the ordering of the features is required for setting ConstrainedSR3
constraints. See #422
Is your feature request related to a problem? Please describe.
If I build a model (
model1
) and fit it on the first 3 POD modes of a PDE, then I runmodel2=sklearn.model.clone(model1)
and fit on the first 6 modes of a PDE, I should get an error becauseself.feature_names
would be the wrong length. Similarly to #386,feature_names
is a data-dependent parameter.This came up in some of the work I was doing for Nathan.
Describe the solution you'd like
See title
Describe alternatives you've considered
Status quo. Not terrible, it just means explicitly re-creating a model (and
feature_library
,differentiation_method
, andoptimizer
) rather than being able to simply deep-clone it's state prior tofit()
.Additional context
This one's a bit less obvious than #386 since there's no overarching zen to achieve; rather, it's about what sklearn API compliance can achieve.