Skip to content

MAINT make affinity_propagation calling AffinityPropagation #24884

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

Merged
merged 4 commits into from
Nov 18, 2022

Conversation

glemaitre
Copy link
Member

@glemaitre glemaitre commented Nov 10, 2022

Linked to #24862 and #24868

In order to have some validation for the public function and to avoid a double validation, the estimator is created within the class and the fitted attributes are returned.

@glemaitre glemaitre changed the title MAINT refactor affinity_propagation to make a private function without validation MAINT make affinity_propagation calling AffinityPropagation Nov 10, 2022
Copy link
Member

@adrinjalali adrinjalali left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, this looks much cleaner.

@jeremiedbb jeremiedbb merged commit 9953bc6 into scikit-learn:main Nov 18, 2022
@jeremiedbb
Copy link
Member

As a second step, we could get rid of the private function and move its content into the fit method of the estimator, but it's not mandatory

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