"""Ridge coefficient starter."""
import numpy as np
X=np.array([[1.,0.],[0.,1.],[1.,1.]])
y=np.array([1.,2.,3.])
P=len(y); I=np.eye(X.shape[1])
for lam in [0.,1/3,1.]:
    A=X.T@X+P*lam*I
    b=X.T@y
    # TODO: solve the system without forming an inverse.
    w=np.linalg.solve(A,b)
    print(lam,w)
