Week 1 Regularization assignment : Unable to load the data

I’m unable to load the football field dataset. Attached is the screenshot. I think the problem is with the matlab module of the scipy library (i have scipy version 1.13.1 installed in my local).

@nishantbabel do you have the file (data.mat) and is it stored relatively to where the main Python program is ? I.E. subdirectory ‘datasets’ ?

If you are running this locally, you need to copy over all the files, not just the notebook. Here’s a thread about how to get all the files.

But there is no guarantee that things will “just work” if you are using the latest versions of all the packages. There are no official instructions for how to run locally, because there are just too many different possible environments. But here’s a thread which will get you started down that long and winding road.

I’m running the notebook on the cloud

I’m not running it locally.

@nishantbabel are you running the notebook via this course ? Or externally via your own instance of Colab? I guess I think we are also confused why you are telling us the version of SciPi you have on your local host ?

I’m running it via the course (my bad I mentioned the scipy version of my local, somehow thought that might be important), also attaching the screenshot with the notebook URL and the error

As @Nevermnd and @paulinpaloalto mentioned, from the error message and your explanation, it seems that the issue is not related to the version of scipy or its MATLAB module but rather to the .mat file (datasets/data.mat) required for this programming assignment being missing or not properly loaded in your cloud environment. Make sure the dataset is available in the environment where you’re running the code.

Verify that the datasets folder exists in the file system. You can check this by running:

!ls datasets

If the folder or file is missing, try navigating through the directories to find where the dataset might be located.

Let us know if you find the dataset elsewhere, or if you’d like further help checking or downloading the necessary files!

Didn’t find the datasets for week 5 or 6 in the directories. This also explains missing images in the lab notebooks for Week 6.

Is there a way I can download the datasets externally and put them in the respective directories ?

This course is only 3 weeks: no week 5 or 6.

2 Likes

As @paulinpaloalto points out in his thread

you can easily download entire files (not just a Jupyter Notebook) by clicking on “Lab Files” and then on “Download all files”.

1 Like

Yes, that is what confused us about where you are running. When you use the course website, the only local software on your computer that matters is the browser: everything else is in the cloud.

But please be aware that there are 3 separate assignments in Week 1 of DLS C2, but the top level directory is called Week5, because they must have originally structured DLS C1 & C2 as one 7 week course.

You show the optimization assignment, which is the only assignment in Week 2 (labeled Week6).

Please click “File → Open” from your Regularization assignment notebook on the course website. You should see this:


Then click the datasets subfolder and you should see this:

If you don’t see the data.mat file in that subfolder, then try the “Get Latest Version” procedure described in detail on this thread.

Thanks a lot @paulinpaloalto , the “Get Latest Version” trick helped

1 Like