题目内容

下面程序段的执行结果为______。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. 红色

关于figure()函数,错误的描述是______。‎figure( num,figsize,dpi,facecolor,edgecolor,frameon )

A. figsize表示绘图对象的尺寸
B. dpi表示绘图对象的分辨率
C. frameon表示是否显示边框
D. num表示子图的个数

‎ 对于以下程序段的输出结果,描述错误的是______。‎import matplotlib.pyplot as plt‎fig = plt.figure(facecolor="g")‎plt.subplot(252)‎plt.subplot(257)‎plt.subplot(2,5,10)‎plt.show()

A. 该画布中一共可以绘制10个子图
B. 一共绘制了3个子图
C. 生成的3个子图位于不同的列上
D. 该画布的背景颜色为绿色

答案查题题库