C3-W1-Anomaly Detection Assignment - Where are Files X_train, X_val, y_val located?

When performing the Assignment Anomaly Detection (C3-W1) we load the data as:

Load the dataset

X_train, X_val, y_val = load_data()
and also display the first elements of X_train, Xval and y_val as for example:

Display the first five elements of X_train

print(“The first 5 elements of X_train are:\n”, X_train[:5])

However, when I download the Files of the assignment for my personal use I don’t see the “X_train, X_val and y_val” data. Instead I see only 6 .npy files: X_part1, X_part2, X_val_part1, etc.
Can someone help me to understand this difference? How these .npy files are really used during the assignment? Are the X_train, X_val and y_val contained in those .npy files, if so why the course would contain the X_train, X_val and y_val in such format?
Thank you very much
Daniel

The way to figure this out would be to read the source code for the load_data function. It will be in a utility python file parallel to the notebook. You can figure out the name of the file to open by reading the “import” commands in the notebook. Then click “File → Open” and find and open that file.

3 Likes

‘npy’ files are the native format for pre-loaded Numpy data files.

https://numpy.org/devdocs/reference/generated/numpy.lib.format.html

1 Like

In addition to the link Tom gives there, you probably will also want to google “numpy store” and “numpy load” and read up on the functionality provided by those functions.

1 Like

Thank you yes, I found the utils.py File contained more information and the reference to the .npy Files.