一、UCI

 Wine dataset:https://archive.ics.uci.edu/ml/datasets/Wine,包含178个样本,每个样本包含13个与酒的化学特性的特征,标签有1,2,3,代表意大利不同地区生长的三种类型的葡萄

 Breast Cancer Wisconsin dataset:https://archive.ics.uci.edu/ml/datasets/Breast+Cancer+Wisconsin+(Diagnostic)包含569个样本,每个样本是良性或者恶性癌细胞,M代表恶性,B代表良性,并且每个样本还有30个特征,可以用来构建模型预测样本是恶性还是良性。

import pandas as pd
df = pd.read_csv('https://archive.ics.uci.edu/ml/machine-learning-databases/breast-cancer-wisconsin/wdbc.data', header=None) from sklearn.preprocessing import LabelEncoder
X = df.loc[:, 2:].values
y = df.loc[:, 1].values
le = LabelEncoder()
y = le.fit_transform(y) le.transform(['M', 'B'])
'''
array([1, 0])
''' from sklearn.model_selection import train_test_split
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.20, random_state=1) from sklearn.preprocessing import StandardScaler
from sklearn.decomposition import PCA
from sklearn.linear_model import LogisticRegression
from sklearn.pipeline import Pipeline pipe_lr = Pipeline([ ('scl', StandardScaler()), ('pca', PCA(n_components=2)) , ('clf', LogisticRegression(random_state=1))])
pipe_lr.fit(X_train, y_train)
print('Test Accuracy: %.3f' % pipe_lr.score(X_test, y_test))
#Test Accuracy: 0.947

二、MNIST数据集

 MNIST是NIST数据集的一个子集,包含60000张图片作为训练数据,10000张作为测试数据,其中每张图片代表0~9中的一个数字,图片大小为28*28。并且数字会出现在图片正中间。为了清楚的表示,用下面的14*14矩阵表示了。

 http://yann.lecun.com/exdb/mnist有详细的介绍,共提供了4个下载文件:训练数据图片,训练数据答案,测试数据图片,测试数据答案。

最新文章

  1. 用Kotlin语言重新编写Plaid APP:经验教训(II)
  2. ps教程连接
  3. linux下发布的执行文件崩溃的问题定位 心得一则
  4. 常州培训 day5 解题报告
  5. css 之优先策略
  6. Rotate Matrix by One
  7. 定制个性化的FlashPaper生成的文件
  8. div+css遮罩层
  9. hdu 2940
  10. ThinkPHP URL模式和URL重写
  11. Linux企业级项目实践之网络爬虫(25)——管理源代码之SVN
  12. PowerShell远程连接主机进行会话
  13. SharpDevelop with Silverlight
  14. google base之LockImpl
  15. Xshell学习--菜鸟篇
  16. SQLServer之PRIMARY KEY约束
  17. 转:select2 使用教程(简)
  18. ubuntu常见问题解决方法
  19. 一些最常见的SNMP的OID自动翻译成zabbix数字进行表示(华为9306)
  20. pyppeteer 报错-无法连接到浏览器

热门文章

  1. Python学习笔记 ---第三章
  2. JAVA面对对象(三)——Super、static、final关键字
  3. ThreadPoolExecutor参数
  4. Laravel之路由 Route::get/post/any、路由参数、过滤器、命名、子域名、前缀、与模型绑定、抛出 404 错误、控制器
  5. laravel 多个项目共享SESSION
  6. hive 远程管理
  7. Maven- 自动导入包的方法-很多没有导入的类,如何处理
  8. BZOJ5251 八省联考2018劈配(网络流)
  9. js md5 中文
  10. 概率dp总结 正在更新