如果使用tight_layout(rect=[])函数将子图向上压缩(即将子图下方空出),可以考虑修改rect中的参数为______。
A. rect[0 , 0.1 , 1 , 1]
B. rect[0.1 , 0 , 1 , 1]
C. rect[0 , 0 , 1 , 0.9]
D. rect[0 , 0 , 0.9 , 1]
下面程序段的执行结果为______。import tensorflow as tfboston_housing= tf.keras.datasets.boston_housing(train_x,train_y),(test_x,test_y)= boston_housing.load_data(test_split=0.1)print("Training set:", len(train_x))print("Testing set:", len(test_x))
A. Training set: 455Testing set: 51
B. Training set: 102Testing set: 404
C. Training set: 404Testing set: 102
D. Training set: 51Testing set: 455
在波士顿数据集中,访问测试集test_x中,所有样本的的ZN和INDUS属性(第2、3列元素),可以通过______语句实现。
A. test_x[1:3]
B. test_x[2:3]
C. test_x[:, 1:3]
D. test_x[0:, 2:3]
执行下列程序段后,x=4处的数据点是______。import numpy as npimport matplotlib.pyplot as pltx = np.arange(8)y = np.arange(8)dot_color = [1, 2, 0, 2, 1, 0, 0, 2]plt.scatter(x,y, c = dot_color,cmap = 'brg')plt.show()
A. 绿色
B. 黑色
C. 蓝色
D. 红色