def ridge_penalty_gradient(beta, alpha):
 return ([0] + [((2 * alpha) * beta_j) for beta_j in beta[1:]])

def ridge_penalty_gradient ( beta , alpha ) : return ( [ 0 ] + [ ( ( 2 * alpha ) * beta_j ) for beta_j in beta [ 1 : ] ] )
gradient of just the ridge penalty .