You can blog here?

@apoorvalal.com

Who likes least squares

# automatig lapack
betahat = np.linalg.lstsq(X, y)
# brittle manual
betahat2 = np.linalg.inv(X.T @ X) @ X.T @ y
# QR decompostion
Q, R = np.linalg.qr(X)
betahat3 = np.linalg.inv(R) @ Q.T @ y
apoorvalal.com
apoorva lal

@apoorvalal.com

causal inference, econometrics, ML, arsenal, loud music, unix, FOSS for scientific computing. Research Scientist.


apoorvalal.github.io

(passively) maintains @paperposterbot.bsky.social

Post reaction in Bluesky

*To be shown as a reaction, include article link in the post or add link card

Reactions from everyone (0)