def hessian_vector_product_lr(label,ypred,x,v,C=0.03,has_l2=True,scale_factor=1.0):
    """Get implicit hessian-vector-products without explicitly building the hessian.
    H*v = v + C *X^T*(D*(X*v))
    """
    xv = x.dot(v)
    D = ypred * (1 - ypred)
    dxv = xv * D
    if has_l2:
        hvp = C * x.T.dot(dxv) +  v
    else:
        hvp = C * x.T.dot(dxv)

    return scale_factor * hvp