In Exercise 1, how is the formula below able to run if “b” is not defined? Seems the computer would ask for more details? Or was “b” defined earlier? I don’t recall. I’m specifically referring to the “+ b” part of the equation.
EXAMPLE:
Loop over training examples
for i in range(m):
# Your code here to get the prediction f_wb for the ith example
f_wb = w * x[i] + b
If the code tries to use ‘b’ and it isn’t defined, you’ll get a runtime error.
So, if you run the notebook and don’t get an error for that, it means that ‘b’ was defined somewhere. You can read the notebook code and trace back to where that happens.
yes, in context of the Exercise, f_wb is the estimated output y-hat (profits) for a given value “x” (population). It’s just a variable.
The reason I bring this up is because…the code in the Exercise works. But I’m confused because it doesn’t appear “b” was ever assigned a value, so how is Python computing “f_wb = w * x[i] + b”