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: [mg96425] Re: [mg96380] Definition of the similarity in a set of integers
  • From: Curtis Osterhoudt <cfo at lanl.gov>
  • Date: Fri, 13 Feb 2009 03:44:18 -0500 (EST)
  • Organization: LANL
  • References: <200902121140.GAA08584@smc.vnet.net>
  • Reply-to: cfo at lanl.gov

Perhaps something like this: 

(* if no very small numbers appear in the sets, and if they're of the same length *)

s1 = {25, 14, 32, 45}; s2 = {26, 12, 31, 48}; 

In[12]:= (N[1]/Length[s1])*Total[s1/s2]

Out[12]= 1.0244907981803144

In[14]:= s3 = {25, 1, 1, 1}; s4 = {1, 1, 25, 1}; 

In[15]:= (N[1]/Length[s3])*Total[s3/s4]

Out[15]= 6.76

   Otherwise, a cross-correlation might have to be done. 

             Hope that helps, 
                        C.O.


On Thursday 12 February 2009 04:40:42 am Ryan Markley 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.
> 
> 



-- 
==========================================================
Curtis Osterhoudt
cfo at remove_this.lanl.and_this.gov
PGP Key ID: 0x4DCA2A10
Please avoid sending me Word or PowerPoint attachments
See http://www.gnu.org/philosophy/no-word-attachments.html
==========================================================


  • Prev by Date: Re: Scalar plot in 3D
  • Next by Date: Re: Re: testing if a point is inside a polygon
  • Previous by thread: Definition of the similarity in a set of integers
  • Next by thread: Re: Definition of the similarity in a set of integers