An issue in Programming Assignment: Week 2 practice lab: Linear regression. Please help

My code is running ok, and it is showing the similar results of the assignment. However, I got 0/100 and the error was “Cell #2. Can’t compile the student’s code. Error: OSError(‘/home/jovyan/work/data/ex1data1.txt not found.’)”. I am using this function to load data:
def load_data():
data=np.loadtxt(‘/home/jovyan/work/data/ex1data1.txt’, delimiter =‘,’, dtype=np.float32)
return x_train, y_train
x_train, y_train=load_data()
The dataset name is ex1data1.txt’ and it is loaded from the path “/home/jovyan/work/data/”.
How can address this issue, please?

You do not need to write any code that loads a data file.
You should delete those lines of code.

Your functions should use the parameters that are passed to them when you run all of the notebook cells.

1 Like