MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: error message in FindClusters[] of text using

  • To: mathgroup at smc.vnet.net
  • Subject: [mg105452] Re: [mg105391] error message in FindClusters[] of text using
  • From: Patrick Scheibe <pscheibe at trm.uni-leipzig.de>
  • Date: Thu, 3 Dec 2009 06:14:43 -0500 (EST)
  • References: <200912010912.EAA18716@smc.vnet.net>

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
> 



  • Prev by Date: Re: piecewice pdf, problems with cdf
  • Next by Date: Re: Re: Simple Spreadsheet within Mathematica?
  • Previous by thread: error message in FindClusters[] of text using HammingDistance
  • Next by thread: Experimental`$EqualTolerance