Question about compute_model_output

In this function, we have:

def compute_model_output(x, w, b):
    """
    Computes the prediction of a linear model
    Args:
      x (ndarray (m,)): Data, m examples 
      w,b (scalar)    : model parameters  
    Returns
      y (ndarray (m,)): target values
    """
    m = x.shape[0]
    f_wb = np.zeros(m)
    for i in range(m):
        f_wb[i] = w * x[i] + b
        
    return f_wb

So when he asks about this


are we trying to manipulate w and b to get f(x) as close to the known y targets? when I printed the tm-_fwb variable they are the same outputs(targets) as y_train. So is this how we do the math portion of it?

The goal of linear regression is to find such w, b that fit our data the best.

The math of how to find them programmatically will be described further.

For now, we are just playing around with w, b, and trying to see how they influence our line. If we set w=200, b=100 then the line fits our data perfectly.