Normalized compression distance
Normalized compression distance is way of measuring the similarity between two objects, be it two documents, two letters, two emails, two music scores, two languages, two programs, two pictures, two systems, two genomes, to name a few. Such a measurement should not be application dependent or arbitrary. A reasonable definition for the similarity between two objects is how difficult it is to transform them into each other.
We assume that the objects one talks about are finite strings of 0s and 1s. Thus we mean string similarity. Every computer file is of this form, that is, if an object is a file in a computer it is of this form. One can define the information distance between strings and as the length of the shortest program that computes from and vice versa. This shortest program is in a fixed programming language. For technical reasons one uses the theoretical notion of Turing machines. Moreover, to express the length of one uses the notion of Kolmogorov complexity. Then, it has been shown 
up to logarithmic additive terms which can be ignored. This information distance is shown to be a metric (it satisfies the metric inequalities up to a logarithmic additive term), is universal (it minorizes every computable distance as computed for example from features up to a constant additive term).
Normalized information distance (similarity metric)
The information distance is absolute, but if we want to express similarity, then we are more interested in relative ones. For example, if two strings of length 1,000,000 differ by 1000 bits, then we are inclined to think that those strings are relatively more similar than two strings of 1000 bits that have that distance. Hence we need to normalize to obtain a similarity metric. This way one obtains the normalized information distance (NID),
where is algorithmic information of given as input. The NID is alled `the similarity metric.' since the function has been shown to satisfy the basic requirements for a metric distance measure. However, it is not computable or even semicomputable.
Normalized compression distance
While the NID metric is not computable, it has an abundance of applications. Simply approximating by real-world compressors, with is the binary length of the file compressed with compressor Z (for example "gzip", "bzip2", "PPMZ") in order to make NID easy to apply. Vitanyi and Cilibrasi rewrote the NID to obtain the Normalized Compression Distance (NCD)
The NCD is actually a family of distances parametrized with the compressor Z. The better Z is, the closer the NCD approaches the NID, and the better the results are.
The normalized compression distance has been used to fully automatically reconstruct language and phylogenetic trees. It can also be used for new applications of general clustering and classification of natural data in arbitrary domains, for clustering of heterogeneous data, and for anomaly detection across domains. The NID and NCD have been applied to numerous subjects, including music classification, to analyze network traffic and cluster computer worms and viruses, authorship attribution, gene expression dynamics, predicting useful versus useless stem cells, critical networks, image registration, question-answer systems.
Researchers from the datamining community use NCD and variants as "parameter-free, feature-free" data-mining tool. One group have experimentally tested a closely related metric on a large variety of sequence benchmarks. Comparing their compression method with 51 major methods found in 7 major data-mining conferences over the past decade, they established superiority of the compression method for clustering heterogeneous data, and for anomaly detection, and competitiveness in clustering domain data.
NCD has an advantage of being robust to noise. However, although NCD appears "parameter-free", practical questions include which compressor to use in computing the NCD and other possible problems.
Objects can be given literally, like the literal four-letter genome of a mouse, or the literal text of War and Peace by Tolstoy. For simplicity we take it that all meaning of the object is represented by the literal object itself. Objects can also be given by name, like "the four-letter genome of a mouse," or "the text of `War and Peace' by Tolstoy." There are also objects that cannot be given literally, but only by name, and that acquire their meaning from their contexts in background common knowledge in humankind, like "home" or "red." We are interested in semantic similarity. Using code-word lengths obtained from the page-hit counts returned by Google from the web, we obtain a semantic distance using the NCD formula and viewing Google as a compressor useful for data mining, text comprehension, classification, and translation. The associated NCD, called the normalized Google distance (NGD) can be rewritten as
where denotes the number of pages containing the search term , and denotes the number of pages containing both and ,) as returned by Google or any search engine capable of returning an aggregate page count. The number can be set to the number of pages indexed although it is more proper to count each page according to the number of search terms or phrases it contains. As rule of the thumb one can multiply the number of pages by, say, a thousand...
For a publicly available open-source downloadable software tool CompLearn, for both NCD and NGD, see http://www.complearn.org. For an on-line demo of the NGD, see http://clo.complearn.org/: Simply think of 4-25 words (or compound words containing spaces) in a list. Enter the words in the box of that page and then press "run experiment" to see the computer make a tree. The computer will use the Google search engine page counts to compute NGD for each pair of words. Then it will use a new quartet method to find the best tree.
- C.H. Bennett, P. Gacs, M. Li, P.M.B. Vitányi, and W. Zurek, Information Distance, IEEE Trans. Inform. Theory, IT-44:4(1998) 1407–1423
- "M. Li, X. Chen, X. Li, B. Ma, P.M.B. Vitanyi, The similarity metric, IEEE Trans. Inform. Th., 50:12(2004), 3250–3264". Ieeexplore.ieee.org. 2011-09-27. doi:10.1109/TIT.2004.838101. Retrieved 2012-11-03.
- "R. Cilibrasi, P.M.B. Vitanyi, Clustering by compression, IEEE Trans. Inform. Theory, 51:12(2005), 1523–1545. Also http://xxx.lanl.gov/abs/cs.CV/0312044 (2003)". Ieeexplore.ieee.org. 2011-09-27. doi:10.1109/TIT.2005.844059. Retrieved 2012-11-03.
- S.A. Terwijn, L. Torenvliet, and P.M.B. Vitanyi, Nonapproximability of the Normalized Information Distance, J. Comput. System Sciences, 77:4(2011), 738–742
- "E. Keogh, S. Lonardi, and C.A. Ratanamahatana. "Towards parameter-free data mining." In Conference on Knowledge Discovery in Data: Proceedings of the tenth ACM SIGKDD international conference on Knowledge discovery and data mining, vol. 22, no. 25, pp. 206–215. 2004". Dl.acm.org. 2004-08-22. doi:10.1145/1014052.1014077. Retrieved 2012-11-03.
- "S. Wehner,Analyzing worms and network traffic using compression, Journal of Computer Security, 15:3(2007), 303–320". Iospress.metapress.com. Retrieved 2012-11-03.
- "E. Stamatatos, A survey of modern authorship attribution methods,J. American Society for Information Science and Technology,60:3(2009), 538–556, 2009". Onlinelibrary.wiley.com. doi:10.1002/asi.21001. Retrieved 2012-11-03.
- "M. Nykter, N. Price, M. Aldana, S. Ramsey, S. Kauffman, L. Hood, Yli O. Harja, I. Shmulevich, Gene expression dynamics in the macrophage exhibit criticality, Proc. National Academy of Sciences of the United States of America (PNAS February 12, 2008 vol. 105 no. 6 1897-1900008)". Pnas.org. Retrieved 2012-11-03.
- "A.R. Cohen, F.L.A.F. Gomes, B Roysam, M Cayouette, Computational prediction of neural progenitor cell fates, Nature methods, 7(2010) 213–218". Nature.com. Retrieved 2012-11-03.
- "M. Nykter, N.D. Price, A. Larjo, T. Aho, S.A. Kauffman, O. Yli-Harja1, and I. Shmulevich, Critical networks exhibit maximal information diversity in structure-dynamics relationships, Phys. Rev. Lett. 100, 058702 (2008)". Prl.aps.org. Retrieved 2012-11-03.
- "M. Feixas, I. Boada, M. Sbert, Compression-based Image Registration. Proc. IEEE International Symposium on Information Theory, 2006. 436–440". Ieeexplore.ieee.org. doi:10.1109/ISIT.2006.261706. Retrieved 2012-11-03.
- "X Zhang, Y Hao, X Zhu, M Li, Information distance from a question to an answer, Proc. 13th ACM SIGKDD international conference on Knowledge discovery and data mining, 2007, 874–883". Dl.acm.org. doi:10.1145/1281192.1281285. Retrieved 2012-11-03.
- "M. Cebrian, M. Alfonseca, A. Ortega, The normalized compression distance is resistant to noise, IEEE Transactions on Information Theory, 53:5(2007), 1895–1900". Ieeexplore.ieee.org. 2011-09-27. doi:10.1109/TIT.2007.894669. Retrieved 2012-11-03.
- "M. Cebrián, M. Alfonseca, and A. Ortega, Common pitfalls using the normalized compression distance: what to watch out for in a compressor, Commun. Inf. Syst. 5:4(2005), 367–384". Projecteuclid.org. Retrieved 2012-11-03.
- "R.L. Cilibrasi, P.M.B. Vitanyi, The Google Similarity Distance, IEEE Trans. Knowledge and Data Engineering, 19:3(2007), 370-383". Ieeexplore.ieee.org. 2011-09-27. doi:10.1109/TKDE.2007.48. Retrieved 2012-11-03.
- M. Li and P. Vitanyi, An Introduction to Kolmogorov Complexity and Its Applications,Springer-Verlag, New York, 3rd Edition 2008,