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
>
> 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
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