History

change rocloc to return list and abs list of differences change rocloc to return list and abs list of differences

Paul Brossier committed 20 years ago

Commit 0cd995a1 parent 4045ba41 file · +3 −1Browse files

Showing the changes to python (1 of 1 file). Show all

Unified · Split

python/aubio/onsetcompare.py+3−1
@@ -79,6 +79,7 @@ def onset_rocloc(ltru, lexp, eps): · 78 unmodified lines
7979 """
8080 orig, expc = len(ltru), len(lexp)
8181 l = []
82+ labs = []
8283 mean = 0
8384 # if lexp is empty
8485 if expc == 0 : return orig,orig,0,0,0,0,l,mean
@@ -97,11 +98,12 @@ def onset_rocloc(ltru, lexp, eps): · 12 unmodified lines
9798 if abs(x-y) <= eps:
9899 correspond += 1
99100 l.append(y-x)
101+ labs.append(abs(y-x))
100102 if correspond == 0: bad += 1
101103 elif correspond > 1: merged += correspond - 1
102104 # check consistancy of the results
103105 assert ( orig - missed - merged == expc - bad - doubled)
104− return orig, missed, merged, expc, bad, doubled, l, sum(l)/float(max(len(l),1))
106+ return orig, missed, merged, expc, bad, doubled, l, labs
105107
106108 def notes_roc (la, lb, eps):
107109 from numarray import transpose, add, resize

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t