Skip to content

Conversation

thomasjpfan
Copy link
Member

I think in_fit or fitting has clearer semantics than reset when thinking of _validate_data.

The small code change is to check y only when fitting:

if in_fit and self._get_tags()['requires_y']:

CC @NicolasHug

@NicolasHug
Copy link
Member

I think the name was discussed quite a bit in the SLEP PR and in the implementation PR.

We need to reset the n_features_in attribute when:

  • fit is called
  • partial_fit is called for the first time only

in_fit and fitting don't reflect this semantic, I think.

@thomasjpfan
Copy link
Member Author

For the partial fit it makes sense. The semantics of calling _validate_data in predict is strange to me:

if reset and self._get_tags()['requires_y']:

Closing. I can not think of a nicer way handle this.

@NicolasHug
Copy link
Member

The semantics of calling _validate_data in predict is strange to me

I agree. Maybe we should consider having a second method to use in predict, transform, etc?

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.

2 participants