摘要:
代码: print(classification_report(y_test, pca_y_predict, target_names=np.arange[10].astype(str))) 原因: 将np.arange(10)写成了np.arange[10] 阅读全文
posted @ 2020-09-08 16:51
大咖妈妈
阅读(2429)
评论(0)
推荐(0)
摘要:
代码: px = X_pca[:, 0][y_train.as_matrix() == i] # python3.X报错 原因: python3.X中as_matrix()不可用 修改: px = X_pca[:, 0][y_train.values == i] 阅读全文
posted @ 2020-09-08 16:27
大咖妈妈
阅读(1409)
评论(0)
推荐(0)
摘要:
代码: for i in xrange(len(colors)): # python3.X 报错 pass 原因: python3.X,range()与xrange()合并为range() 阅读全文
posted @ 2020-09-08 16:22
大咖妈妈
阅读(398)
评论(0)
推荐(0)
摘要:
代码: print np.sort(zip(etr.feature_importances_, boston.feature_names), axis=0) # Python2.X 不报错 print(np.sort(zip(etr.feature_importances_, boston.feat 阅读全文
posted @ 2020-09-08 14:40
大咖妈妈
阅读(3201)
评论(0)
推荐(0)

浙公网安备 33010602011771号