Prev: Super KISS by Marsaglia
Next: NDSolve with momentum
From: Patrick Scheibe on 3 Dec 2009 06:14 Hi, Quoting Wiki: "In information theory, the Hamming distance between two strings of *equal* length is the..." so what about FindClusters[Select[DictionaryLookup["a*"], StringLength[#] == 5 &], DistanceFunction -> HammingDistance] ? Cheers Patrick On Tue, 2009-12-01 at 04:12 -0500, divisor wrote: > Hello MathGroup: > > A simple example from the Help system for FindClusters[] looks like > this: > > FindClusters[DictionaryLookup["aw" ~~ __] > ,20 > ] > > This finds 20 clusters in the text dictionary of words starting with > "aw" (54 words). > > When I use this same command using the DistanceFunction- > >HammingDistance, I get a error message I cannot decipher: > > FindClusters::xnum: A non-numeric, negative, or complex dissimilarity > value was computed; dissimilarities must be non-negative and real > valued. >> > > This is curious since this simple example from the Help system also > works: > > FindClusters[{"abc", "xyz", "bca", "xyw"}, DistanceFunction -> > HammingDistance] > > The failing command is: > > FindClusters[DictionaryLookup["aw" ~~ __] > , DistanceFunction -> HammingDistance > ] > > Thanks in advance for any help on this. > > Roger Williams > Franklin Laboratory >
|
Pages: 1 Prev: Super KISS by Marsaglia Next: NDSolve with momentum |