Solved

Consider the Following Code: Import Numpy as Np

Question 26

Multiple Choice

Consider the following code: import numpy as np
Index = np.random.choice(np.arange(len(X_train) ) , 24, replace=False)
Figure, axes = plt.subplots(nrows=4, ncols=6, figsize=(16, 9) )
For item in zip(axes.ravel() , X_train[index], y_train[index]) :
Axes, image, target = item
Axes.imshow(image, cmap=plt.cm.gray_r)
Axes.set_xticks([]) # remove x-axis tick marks
Axes.set_yticks([]) # remove y-axis tick marks
Axes.set_title(target)
Plt) tight_layout()
Which of the following statements a) , b) or c) is false?


A) NumPy's choice function (from the numpy.random module) selects the number of elements specified in its second argument from the front of the array of values in its first.
B) The choice function returns an array containing the selected values, which we store in index.
C) The expressions X_train[index] and y_train[index] use index to get the corresponding elements from both arrays.
D) All of the above statements are true.

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents