code_1.py 241 字节
Newer Older
ToTensor's avatar
ToTensor 已提交
1 2 3 4 5 6
X = np.array(df_ads) # 构建特征集, 包含全部特征
X = np.delete(X, [3], axis = 1) # 删除标签
y = np.array(df_ads.sales) #构建标签集, 销售额
print ("张量X的阶:", X.ndim)
print ("张量X的维度:", X.shape)
print (X)