You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bottom-up algorithm contains a bug that causes it to underperform severely unless max error is very low. Bug was caused by some kind of offset error with mergesegments array. I changed the function as follows to solve it:
while min(mergecosts) < max_error:
idx = mergecosts.index(min(mergecosts))
new_seg = create_segment(sequence, (segments[idx][0], segments[idx+1][2]))
segments[idx] = new_seg
del segments[idx+1]
if idx > 0:
merge_seg = create_segment(sequence,(segments[idx-1][0],segments[idx][2]))
mergecosts[idx-1] = compute_error(sequence,merge_seg)
if idx+1 < len(mergecosts):
merge_seg = create_segment(sequence,(segments[idx][0],segments[idx+1][2]))
mergecosts[idx] = compute_error(sequence,merge_seg)
del mergecosts[idx]
return segments
The text was updated successfully, but these errors were encountered:
Bottom-up algorithm contains a bug that causes it to underperform severely unless max error is very low. Bug was caused by some kind of offset error with mergesegments array. I changed the function as follows to solve it:
The text was updated successfully, but these errors were encountered: