Week 2 practice lab

I am getting this error,Please help me…
NameError Traceback (most recent call last)
in
3 initial_b = 1
4
----> 5 cost = compute_cost(x_train, y_train, initial_w, initial_b)
6 print(type(cost))
7 print(f’Cost at initial w: {cost:.3f}')

NameError: name ‘x_train’ is not defined

Hello @Raj_Kumar4,

Please run from the top-most code cell and not to skip any intermediate cells. If you do so, you will come across the following cell which defines x_train.

Screenshot from 2022-07-28 15-38-42

Cheers,
Raymond