Re: [Tutor] Counting the consistent rankings

2012-07-23 Thread Emile van Sebille
On 7/23/2012 2:11 PM Ali Torkamani said... Hi All, I want to count how many (what percentage) of partial orders are identical in two lists. You may find SequenceMatcher from module difflib helpful. See http://docs.python.org/library/difflib.html for info. Emile (For example let L1 b

Re: [Tutor] Counting the consistent rankings

2012-07-23 Thread Ali Torkamani
> > S=0; > A=0; > n=len(L1) > for i in range(n): > for j in range(i+1,n,1): > A+=1; > if (L1[i]>L1[j] and L2[i]>L2[j]) or (L1[i] L2[i] S+=1 > > print(100*float(S)/A) > In this code, A is equal to (len(L1)*( len(L1)-1)/2), but I ha

[Tutor] Counting the consistent rankings

2012-07-23 Thread Ali Torkamani
Hi All, I want to count how many (what percentage) of partial orders are identical in two lists. (For example let L1 be the list of ground truth scores and L2 be the estimated scores for a list of students, I want to check how many (what percentage) of pairwise orderings (rankings) are preserve