Normal Equation with a Bias Column
~12 mincode completion
Implement normal_equation(X, y) returning the array [b,w1,…,wd], bias first.
Where this shows up
~12 min
••••••••••••••••
8 employers weight this skill
2 health and bio companies, 2 quant funds, 2 enterprise vendors, 1 AI product company, 1 frontier lab. Top match scores 87.
Python
import numpy as np
def normal_equation(X, y):
"""
Closed-form least squares with a bias column.
Args:
X: array of shape (n, d), one row per example
y: array of shape (n,), targets
Returns:
array of shape (d + 1,): [b, w_1, ..., w_d]
"""
# YOUR CODE HERE
pass