Open Lwon2001 opened 1 year ago
I have the same problem. Do you finally solve it?
No, I did not continue to delve into the ***@***.***
---- Replied Message ----
From
Sun ***@***.***>
Date
3/31/2023 11:25
To
***@***.***>
Cc
***@***.***>
,
***@***.***>
Subject
Re: [anamabo/Equal-Size-Spectral-Clustering] Error of 'wcsd' (Issue #1)
I have the same problem. Do you finally solve it?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>
I think I figured this out; whenever the default spectral clustering resulted in an equalized clustering before any swapping, this error would occur.
Specifically, inside cluster_equalization(), self.total_cluster_dispersion was being updated in two different ways because of code duplication, and when clusters were already equalized after the initial clustering the incorrect line would run. I changed those lines to what is called after equalization is completed, which seems to be the correct line of code (and it works for the one dataset I was struggling with)-- however, this could probably be refactored in the future to avoid duplication.
Hello, I have a high probability of making an error "'Series' object has no attribute 'wcsd'" when running your code for my own classification. As far as I know, the wcsd method is not defined in Pandas' dataframe, nor does it appear to be defined in your code.