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] sklearn 1.2.0 compatibility - remove private _check_weights import in KNeighborsTimeSeriesClassifier and -Regressor #3918

Merged
merged 2 commits into from Dec 19, 2022

Conversation

fkiraly
Copy link
Collaborator

@fkiraly fkiraly commented Dec 10, 2022

This PR fixes a compatibility issue with sklearn 1.2 and removes the private import _check_weights from KNeighborsTimeSeriesClassifier and KNeighborsTimeSeriesRegressor.

This can be done without deprecation or change in functionality, because _check_weights was just an erroneous leftover from an earlier version that used inheritance and not composition.

Right now, the sklearn classifier is wrapped as a component, so _check_weights (or its 1.2 equivalent) is called again inside the component - therefore, naive removal simply removes an unnecessary duplication.

@fkiraly fkiraly added the maintenance Continuous integration, unit testing & package distribution label Dec 10, 2022
@fkiraly fkiraly changed the title [ENH] remove private _check_weights import in KNeighborsTimeSeriesClassifier [ENH] remove private _check_weights import in KNeighborsTimeSeriesClassifier and -Regressor Dec 10, 2022
@fkiraly fkiraly changed the title [ENH] remove private _check_weights import in KNeighborsTimeSeriesClassifier and -Regressor [ENH] sklearn 1.2.0 compatibility - remove private _check_weights import in KNeighborsTimeSeriesClassifier and -Regressor Dec 10, 2022
@fkiraly fkiraly merged commit 5d17b0b into main Dec 19, 2022
@fkiraly fkiraly deleted the tsn-check_weights branch December 19, 2022 00:44
fkiraly added a commit that referenced this pull request Dec 19, 2022
#3922)

This PR updates the `sklearn` version bound to `<1.3`.

Includes fixes for `sklearn 1.2` compatibility:

* #3918
* #3919
* #3921
* #3923
* #3924
* #3926
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Continuous integration, unit testing & package distribution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant