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

clusterer: Update AgglomerativeClustering keyword to fix deprecation #218

Merged
merged 1 commit into from
Dec 9, 2022

Conversation

EwoutH
Copy link
Collaborator

@EwoutH EwoutH commented Dec 8, 2022

Changes the keyword for the metric used to compute the linkage in sklearn.cluster.AgglomerativeClustering from affinity, which is deprecated in scikit-learn 1.2, to metric.

Behaviour should be identical.

See https://scikit-learn.org/stable/whats_new/v1.2.html#sklearn-cluster.

API Change The affinity attribute is now deprecated for cluster.AgglomerativeClustering and will be renamed to metric in v1.4. #23470 by Meekail Zain.

Changes the keyword for the metric used to compute the linkage in sklearn.cluster.AgglomerativeClustering from `affinity`, which is deprecated in scikit-learn 1.2, to `metric`.

Behaviour should be identical.

See https://scikit-learn.org/stable/whats_new/v1.2.html#sklearn-cluster and https://scikit-learn.org/stable/modules/generated/sklearn.cluster.AgglomerativeClustering.html
@EwoutH EwoutH added this to the 2.4.0 milestone Dec 8, 2022
@EwoutH EwoutH requested a review from quaquel December 8, 2022 22:15
@coveralls
Copy link

Coverage Status

Coverage remained the same at 81.139% when pulling a559223 on sklearn-1.2-deprecation into 4636fdb on master.

@EwoutH
Copy link
Collaborator Author

EwoutH commented Dec 9, 2022

I got confirmation from scikit-learn that this doesn't change the behaviour, just a name change:

Yes, you should be able to replace affinity-->metric with no change in behavior!

@quaquel I need your approval to merge (that's a new policy for this repo right?)

@quaquel
Copy link
Owner

quaquel commented Dec 9, 2022

Thanks for checking.

@EwoutH EwoutH merged commit 3f98867 into master Dec 9, 2022
@quaquel quaquel deleted the sklearn-1.2-deprecation branch October 31, 2023 11:14
@EwoutH EwoutH mentioned this pull request Dec 13, 2023
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants