Hierarchal clustering methods as well as some others such as DBSCAN use a notion of (dis-)similarity between data points to cluster the data. Such dissimilarity can be formalized by the mathematical notion of a metric. Now imagine we have a few different metrics on our data set. These metrics may have different scales (i.e. take values in different intervals in real numbers).

Question: Is there any clustering method that can cluster data sets w.r.t multiple given metrics at the same time?

More detail: Imagine we have two metrics $d_1, d_2$ on our dataset. The maximum distances $c_i=\max_{k,l} \,d_i(p_k,p_l)$ are $c_1=1$ and $c_2=1000$. A simple way to cluster w.r.t. the two metrics is to obtain a composite metric out of $d_1, d_2$. We can take $D=d_1+d_2$ but the problem is that the contribution from $d_2$ can easily "knock out" the contribution from $d_1$.

One can try to normalize the contributions by defining $D'=d_1/c_1+d_2/c_2$ but now adding or removing points to/from the data set can drastically change the distances between the points.

  • 1
    $\begingroup$ If the input data are cases by features dataset and you want to cluster cases but features are of different type (such as some quantitative, some categorical nominal, some binary), heuristic devices like Gower similarity could be used. Also, some implementations of log-likelihood distance allow for the quantitative\nominal mix. Search the site, clustering data mixed type. $\endgroup$
    – ttnphns
    Jan 18, 2017 at 15:06
  • $\begingroup$ All my data is quantitative. I added more detail to the question. It seems something like PCA would be more relevant. $\endgroup$
    – Reza
    Jan 18, 2017 at 15:59
  • $\begingroup$ If you truly need a metric (which enjoys the axiomatic properties of symmetry, reflexivity, and the triangle inequality) then you have to make sure that any combination of metrics is itself a metric: and then you would be clustering with respect to that metric, not with multiple metrics. $\endgroup$
    – whuber
    Jan 20, 2017 at 0:47
  • $\begingroup$ Combining the metrics into one is one simple way to cluster in a way that takes all those metrics into account. A linear sum of metrics with positive coefficients is always a metric. $\endgroup$
    – Reza
    Jan 20, 2017 at 12:54
  • $\begingroup$ What, then, is your question? Could you elaborate on what you mean by "cluster ... [with] multiple metrics at the same time"? What do you hope this would do with your data? What should the results look like? Could you illustrate it with a small example showing the data, the metrics, and the desired results? $\endgroup$
    – whuber
    Jan 20, 2017 at 16:28

1 Answer 1


Yes. Generalized DBSCAN (GDBSCAN):

Ester, Martin, et al. "Density-Connected Sets and their Application for Trend Detection in Spatial Databases." KDD. Vol. 97. 1997.

For example, you can define a different epsilon for each metric.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.