Hello, is there any way to see/download the dataset? My question is so elementary, but I don’t know how to count the size of the training example without any additional information.
Yes, you can download all the associated files of a particular assignment. Check this guide.
Best,
Saif.
sorry, but I cannot find the dataset from the lab files… can you help me? can you help me with this question? how can I count the size of the training example?
Go to the 1st cell of the Planar_data_classification_with_one_hidden_layer
. You can see that load_planer_dataset
is imported from planar_utils
. When you download all the files, this file also downloads. Go to it and open it. Check the implementation of load_planer_dataset
which will give you a sense of data and how data is generated.
They also lead you through the examination of the data in the notebook. You just need to use the “shape” attribute of the training data after you call the load_planar_dataset
function that Saif pointed out. They already gave you the logic that calls the function. If you have a numpy array, then the “shape” attribute is a “tuple” that gives the number of dimensions of the array and the size of each dimension.
Here’s an example of how to use it:
A = np.random.randn(1,4)
print(f"type(A) {type(A)}")
print(f"A.shape = {A.shape}")
print(f"A = {A}")
Running that code gives this output:
type(A) <class 'numpy.ndarray'>
A.shape = (1, 4)
A = [[ 0.24016688 -0.92565357 -0.43283935 0.28682346]]
They also gave you pretty detailed instructions in the notebook that included mentioning the “shape” and giving you a link to the documentation.