All problems
Durbin-Levinson One Step
Problem
Advance the Durbin-Levinson recursion by one order. Given the previous order coefficients and the autocorrelation list rho = [rho(0), ..., rho(k)] with k = len(coeffs) + 1, compute the reflection coefficient kappa = (rho(k) - sum a_j * rho(k-j)) / (1 - sum a_j * rho(j)), where sums run over j = 1..k-1. Then return the updated coefficients with kappa appended, using a_j - kappa * a_{k-j} for the existing entries.
If the denominator is zero, use kappa = 0.0.
Hint
The appended value is the new reflection coefficient; rho[0] is assumed to be 1.
Test cases
case 1
in: [[],[1,0.5]]
expected: [0.5]
case 2
in: [[0.5],[1,0.5,0.25]]
expected: [0.5,0]
case 3
in: [[0.5],[1,0.5,0.3]]
expected: [0.4666666666666667,0.06666666666666665]
case 4
in: [[0.6],[1,0.6,0.3]]
expected: [0.65625,-0.09375]
Starter codePython
def durbin_levinson_step(coeffs, rho):
# Your code here
pass4 test cases · run your code against them in the editor