Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
X = [4 3 1 0 1; 5 2 1 0 1; 4 2 1 1 1; 3 1 0 1 1; 1 1 0 1 1]
y = [4, 6, 6, 3, 1]
theta = pinv(X' * X) * X' * y'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment