Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2009

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

Search the Archive

Re: Definition of the similarity in a set of integers

  • To: mathgroup at smc.vnet.net
  • Subject: [mg96449] Re: [mg96380] Definition of the similarity in a set of integers
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Fri, 13 Feb 2009 03:48:44 -0500 (EST)
  • Reply-to: hanlonr at cox.net

One of the infinite options:

similarity[s1_List, s2_List] := 
 Variance[Abs[s1 - s2]] /; Length[s1] == Length[s2]


Bob Hanlon

---- Ryan Markley <overgeo at gmail.com> wrote: 

=============
Hello I have two sets of integers eg

S1 = (25,14,32,45) and S2 = (26,12,31,48)

I want to define an operation similar to the variance that give me how
similar both sets are, for example in the above example for both sets
the results I have to get need to be similar because both sets are
similar.

The problem with the variance is this

S1 = (25,1,1,1) and S2 = (1,1,25,1) these two sets have the same
variance but they are completly different. What mathematical operation
can I use to do what I am looking for.

Thanks a lot in advance.


--

Bob Hanlon



  • Prev by Date: Re: Scalar plot in 3D
  • Next by Date: Re: switching axes in Plot?
  • Previous by thread: Re: Definition of the similarity in a set of integers
  • Next by thread: Re: Definition of the similarity in a set of integers