I got a name-error
I double-checked the formulas and my implementation, however, I can’t find where my code is going wrong.
Thank You.
I got a name-error
I double-checked the formulas and my implementation, however, I can’t find where my code is going wrong.
Thank You.
Hi!
it seems you’re using a lowercase “x” on the line
z_wb_ij = w[j] * x[i][j]
and an uppercase “X” on the line
z_wb = w[n-1]*X[i][n-1] + b
uppercase “X” is the parameter passed into the function
did you define a variable with the name “x” somewhere?
so I just fixed the uppercase X to a lower case (didn’t notice it), however, it still has the same error.
Oh no I didn’t define the variable for X in my code
Oh,
I was thinking that you could use the X variable instead of the x variable.
From the lab we have the function definition and the explanation of what X is.
def compute_cost(X, y, w, b, lambda_= 1)
Args:
X : (ndarray Shape (m,n)) data, m examples by n features
Hello @SamReiswig, so I went ahead to change X variable to an upper case but still got the same error.
Can you send me your lab in a direct message?
yea sure, thank you i will.