This is an important problem since, in some approaches, patterns will be stored 
as lists.

There are three issues/limitations to your solution below:
- it uses one of the many possible distance metrics
- items in a list may have different weights or relative importance (e.g. 
activation levels) - you assume equal weights in your formula.
- it is really for sets rather than lists.
If one uses a list instead of a set, then there is an explicit ordering element 
(the list index). This order may be very important or just a minor issue. 
Swopping two characters in a word is less important than swopping two notes in 
a tune, which is in turn far less of an issue than swopping cause and effect in 
a chain-reaction list. So a good similarity index will be dependent on context. 
Similar arguments for deleting or adding an element.

Jean-Paul Van Belle

________________________________
From: Piaget Modeler [[email protected]]
Sent: 20 February 2014 20:20
To: AGI
Subject: RE: [agi] List Similarity

(correction)

The problem is much easier  given two lists

; Premise code (c) 2014 Michael S P Miller


function list-similarity {?A ?B}

  (put (length (intersection ?A ?B)) ?LenAnB)

  (put (length (difference ?A ?B))   ?LenA-B)

  (put (length (difference ?B ?A))   ?LenB-A)

  (put (length ?A)                   ?LenA)

  (put (length ?B)                   ?LenB)



  (return

    (if (or (= ?LenA 0)(= ?LenB 0))

       0

     else

       (* 0.5 (- (+ (/ ?LenAnB ?LenA) (/ ?LenAnB ?LenB))

              (+ (/ ?LenA-B ?LenA) (/ ?LenB-A ?LenB))))))

end



For numbers, it's a little more difficult.


Your thoughts?


AGI | Archives<https://www.listbox.com/member/archive/303/=now> 
[https://www.listbox.com/images/feed-icon-10x10.jpg] 
<https://www.listbox.com/member/archive/rss/303/19999924-4a978ccc>  | 
Modify<https://www.listbox.com/member/?&;> Your Subscription  
[https://www.listbox.com/images/listbox-logo-small.png] <http://www.listbox.com>
AGI | Archives<https://www.listbox.com/member/archive/303/=now> 
[https://www.listbox.com/images/feed-icon-10x10.jpg] 
<https://www.listbox.com/member/archive/rss/303/5404257-22a42d7f>  | 
Modify<https://www.listbox.com/member/?&;> Your Subscription        
[https://www.listbox.com/images/listbox-logo-small.png] <http://www.listbox.com>
________________________________
UNIVERSITY OF CAPE TOWN

This e-mail is subject to the UCT ICT policies and e-mail disclaimer published 
on our website at http://www.uct.ac.za/about/policies/emaildisclaimer/ or 
obtainable from +27 21 650 9111. This e-mail is intended only for the person(s) 
to whom it is addressed. If the e-mail has reached you in error, please notify 
the author. If you are not the intended recipient of the e-mail you may not 
use, disclose, copy, redirect or print the content. If this e-mail is not 
related to the business of UCT it is sent by the sender in the sender's 
individual capacity.





-------------------------------------------
AGI
Archives: https://www.listbox.com/member/archive/303/=now
RSS Feed: https://www.listbox.com/member/archive/rss/303/21088071-f452e424
Modify Your Subscription: 
https://www.listbox.com/member/?member_id=21088071&id_secret=21088071-58d57657
Powered by Listbox: http://www.listbox.com

Reply via email to