asardaes / dtwclust

R Package for Time Series Clustering Along with Optimizations for DTW
https://cran.r-project.org/package=dtwclust
GNU General Public License v3.0
258 stars 29 forks source link

fuzziness argument in fuzzy_control function #79

Open lucapizzimbone opened 2 days ago

lucapizzimbone commented 2 days ago

Hi, I would like to highlight that using the tsclust function with the following configuration:

tsclust(data, k = 3, distance = "dtw", seed = 123, type = "fuzzy", centroid = "fcmdd", contol = fuzzy_control( fuzziness = 2, iter.max = 100L ))

when changing the fuzziness parameter, there is no change in the membership degrees of the data. In particular, for a fuzziness = 1.000001, I would expect having for each data row one membership degree close to 1 and the others close to zero. However, any value of fuzziness > 1 provide the same results in the membership degrees.

Thank you in advance for the attention.. Grateful, Luca

asardaes commented 1 day ago

Hello, can you elaborate on why you have that expectation? For example, if we assume that the truth is that there's only 1 cluster for the whole data set, trying to attempt fuzzy clustering with k > 1 would likely yield a membership degree of 1 / k for each entity in the data regardless of the other parameters, no?

lucapizzimbone commented 2 hours ago

Dear Alexis,

thank you for the swift response. my observation refers to the following statement (Fuzzy clustering - Wikipedia https://en.wikipedia.org/wiki/Fuzzy_clustering)

[image: image.png] on the above basis, with a parameter m (fuzzifier in the dtwcluster library), I would probably expect membership values equal to 1 or 0, rather than float numbers.

However, I noticed that the fuzziness parameter has only influence when: centroid = "fcm" when using centroid = "fcmdd" any there is no influence of the fuzziness value. Perhaps is the correct behaviour but from my side I cannot say muchmore at the moment. I will investigate further from my side too, and let you know.

Thank you in advance for the help.

Grateful, Luca I

On Wed, Nov 20, 2024 at 7:24 PM Alexis Sardá @.***> wrote:

Hello, can you elaborate on why you have that expectation? For example, if we assume that the truth is that there's only 1 cluster for the whole data set, trying to attempt fuzzy clustering with k > 1 would likely yield a membership degree of 1 / k for each entity in the data regardless of the other parameters, no?

— Reply to this email directly, view it on GitHub https://github.com/asardaes/dtwclust/issues/79#issuecomment-2489274908, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATTE7DISEKQVKHFVRT7TIGL2BTHU5AVCNFSM6AAAAABSEYQAKCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIOBZGI3TIOJQHA . You are receiving this because you authored the thread.Message ID: @.***>