JuliaStats / Clustering.jl

A Julia package for data clustering
Other
353 stars 117 forks source link

Hierarchical clustering with connectivity #144

Open YoungFaithful opened 5 years ago

YoungFaithful commented 5 years ago

I'm using this package for calculating representative periods for my research. As I need chronological clustering for one aspect, I was wondering, if you think a connectivity like this one:

connectivity : sparse matrix (optional). connectivity matrix. Defines for each sample the neighboring samples following a given structure of the data. The matrix is assumed to be symmetric and only the upper triangular half is used. Default is None, i.e, the Ward algorithm is unstructured. from (https://github.com/scikit-learn/scikit-learn/blob/7389dba/sklearn/cluster/hierarchical.py#L657) could be integrated without messing too much with the algorithm.

alyst commented 5 years ago

I had a brief look, it seems SKLearn has a separate implementation of e.g. Ward algorithm if connectivity matrix is provided. So I'm not sure it's would be a matter of a few minor changes to support the connectivity information. But you are welcome to propose a PR implementing it.

YoungFaithful commented 5 years ago

I also got the impression that some major addition would be necessary. I'll see if I can do that.