Created
May 13, 2019 19:20
-
-
Save olooney/e5915bedda33ae0e78cee3b89204fd06 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
X = np.hstack([np.ones(shape=(23, 1)), np.random.normal(size=(23, 2))]) | |
Theta = np.array([0.5, +0.1, -0.2]).reshape( (3, 1) ) | |
Y = X @ Theta + np.random.normal(0, 0.1, size=(23, 1)) | |
Theta_hat = np.linalg.inv(X.T @ X) @ X.T @ Y | |
Theta_hat |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment