All problems
Quantile Regression ADMM Step
Problem
Perform one ADMM iteration for 1D quantile regression with quantile q.
The x update is (a_val + rho * (z - u)) / (1 + rho). The z update applies an asymmetric soft threshold to v = x + u with thresholds lam * q / rho above and lam * (1 - q) / rho below. Then u = u + x - z. Return [x, z, u].
Hint
The pinball loss prox shrinks positive and negative sides by different amounts.
Test cases
case 1
in: [0,0,0,3,0.5,0.6,1]
expected: [1.5,1.2,0.30000000000000004]
case 2
in: [1,0,0,2,0.9,0.2,2]
expected: [0.6666666666666666,0.5766666666666667,0.08999999999999997]
case 3
in: [0,0.5,0.2,-1,0.5,1,0.5]
expected: [-0.5666666666666667,0,-0.36666666666666664]
Starter codePython
def quantile_admm_step(x, z, u, a_val, q, lam, rho):
# Returns [x, z, u]
# Your code here
pass3 test cases · run your code against them in the editor