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

Sklearn depreating linear sum #18

Open
ghar1821 opened this issue Feb 21, 2020 · 1 comment
Open

Sklearn depreating linear sum #18

ghar1821 opened this issue Feb 21, 2020 · 1 comment

Comments

@ghar1821
Copy link

Looks like linear_assignment is being moved from sklearn to scipy. The warning says the move is permanent from 0.23 onwards.

DeprecationWarning: The linear_assignment function is deprecated in 0.21 and will be removed from 0.23. Use scipy.optimize.linear_sum_assignment instead..

Consider changing the imports.

@HichemAK
Copy link

HichemAK commented Dec 3, 2021

There is also an issue with the function coclust.evaluation.external.accuracy which uses scipy.optimize.linear_sum_assignment to find the best correspondence between true labels and predicted labels.

In the file coclust/evaluation/external.py, I propose to replace line 36 which is:

for row, column in indexes:

by:

for row, column in np.stack(indexes, axis=1)

Because indexes, which is the output of the function scipy.optimize.linear_sum_assignment, does not have the right format for the loop.

A simple example to test the function : accuracy(np.array([1,2,3,1,2]), np.array([2,1,3,2,1]))

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

No branches or pull requests

2 participants