1
$\begingroup$

I am trying to cluster a bunch of executable files, and I want to use NCD ( normalized compression distance) as the distance metric. Is there any software package which lets me do that?

Update: I'm using a python script which produces a distance matrix for example for 4 instances like:

[[1.0004239875837764, 1.0004587405627736, 1.0012468878082528, 1.0004537475969288],
 [1.0001477300117407, 1.0003889794346572, 1.0007857384580077],
 [1.0005753695194108, 1.0009174811255472],
 [1.0008124881847325],
 []]

Thanks

$\endgroup$

1 Answer 1

3
$\begingroup$

Pretty much any implementation of hierarchical clustering will allow you to supply a distance matrix. This is totally standard functionality. I.e. you have to:

1.) Compute a distance matrix using NCD

2.) Run hierarchical custering.

3.) World Domination!

$\endgroup$
5
  • $\begingroup$ Thanks for your answer.Can you tell me how I can do the first step? or direct me to somewhere I can learn. Cuz I usually see none of the implementations have the NCD as metric. $\endgroup$
    – Sina
    Commented Apr 26, 2014 at 19:49
  • $\begingroup$ I have not used NCD myself. Have you tried implementing it? It does not need to exist beforehand, just load the matrix! $\endgroup$ Commented Apr 26, 2014 at 19:52
  • $\begingroup$ I edited the question. I have matrices like the one that I mentioned in the question. do you know how can I feed them to clustering implementation $\endgroup$
    – Sina
    Commented Apr 26, 2014 at 19:58
  • 1
    $\begingroup$ Then you are pretty much done, invoke hierarchical clustering from sklearn. $\endgroup$ Commented Apr 26, 2014 at 19:59
  • $\begingroup$ does it mater that my matrices are not n*n? $\endgroup$
    – Sina
    Commented Apr 26, 2014 at 20:04

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.