DataSet in Machine Learning
一、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个下载文件:训练数据图片,训练数据答案,测试数据图片,测试数据答案。
DataSet in Machine Learning的更多相关文章
- (转)8 Tactics to Combat Imbalanced Classes in Your Machine Learning Dataset
8 Tactics to Combat Imbalanced Classes in Your Machine Learning Dataset by Jason Brownlee on August ...
- 【Machine Learning】KNN算法虹膜图片识别
K-近邻算法虹膜图片识别实战 作者:白宁超 2017年1月3日18:26:33 摘要:随着机器学习和深度学习的热潮,各种图书层出不穷.然而多数是基础理论知识介绍,缺乏实现的深入理解.本系列文章是作者结 ...
- [Python & Machine Learning] 学习笔记之scikit-learn机器学习库
1. scikit-learn介绍 scikit-learn是Python的一个开源机器学习模块,它建立在NumPy,SciPy和matplotlib模块之上.值得一提的是,scikit-learn最 ...
- Machine Learning Algorithms Study Notes(2)--Supervised Learning
Machine Learning Algorithms Study Notes 高雪松 @雪松Cedro Microsoft MVP 本系列文章是Andrew Ng 在斯坦福的机器学习课程 CS 22 ...
- Machine Learning : Pre-processing features
from:http://analyticsbot.ml/2016/10/machine-learning-pre-processing-features/ Machine Learning : Pre ...
- Why The Golden Age Of Machine Learning is Just Beginning
Why The Golden Age Of Machine Learning is Just Beginning Even though the buzz around neural networks ...
- Advice for applying Machine Learning
https://jmetzen.github.io/2015-01-29/ml_advice.html Advice for applying Machine Learning This post i ...
- Machine Learning Methods: Decision trees and forests
Machine Learning Methods: Decision trees and forests This post contains our crib notes on the basics ...
- SOME USEFUL MACHINE LEARNING LIBRARIES.
from: http://www.erogol.com/broad-view-machine-learning-libraries/ http://www.slideshare.net/Vincenz ...
随机推荐
- 四则运算法则在Java中的实现
软件工程的课程已经上过有一段时间了,前段时间由于比较忙着考试,所以关于四则运算的代码一直没有实现.同时由于近来一段时间一直在自学java,因为C++虽然也是面向对象,而且可以开发很多软件或者程序,但是 ...
- 第一个Sprint
项目名字:四则运算APP 开发环境:java 团队名称:会飞的小鸟 团队成员:陈志棚 李炫宗 刘芮熔 徐侃 罗伟业 一.经过宿舍世纪讨论后我们剔除了一些不合理的设计,比如网站管理员这一部分在 ...
- 【转】使用screw plus对PHP源码加密
运行环境 ubuntu 14.04 php 5.6 源码地址 https://github.com/del-xiong/screw-plus http://git.oschina.net/splot/ ...
- 软件工程(GZSD2015) 第三次作业提交进度
第三次作业题目请查看这里:软件工程(GZSD2015)第三次作业 开始进入第三次作业提交进度记录中,童鞋们,虚位以待哈... 2015年4月19号 徐镇.尚清丽,C语言 2015年4月21号 毛涛.徐 ...
- jeecg 主-附表生成代码例子
jeecg 主-附表生成代码例子 - CSDN博客https://blog.csdn.net/u010411264/article/details/51243277 JEECG Online Codi ...
- ModSecurity is an open source, cross-platform web application firewall (WAF) module.
http://www.modsecurity.org/ ModSecurity is an open source, cross-platform web application firewall ( ...
- realm vs. domain
从wiki的角度:https://wikidiff.com/domain/realm domain是物理的,realm是抽象的,都是领域. domain是一个人或组织拥有或控制的地理区域,而realm ...
- hive数据导入load导入命令
LOCAL 指的是操作系统的文件路径,否则默认为HDFS的文件路径 1.向t2和t3的数据表中导入数据 2.导入操作系统的一下三个文件 执行导入命令 3.将HDFS文件中的数据导入到t3中 4.导入 ...
- codeforces706C
Hard problem CodeForces - 706C 现在有 n 个由小写字母组成的字符串.他想要让这些字符串按字典序排列,但是他不能交换任意两个字符串.他唯一能做的事是翻转字符串. 翻转第 ...
- 牛客网练习赛7-D-无向图(bfs,链式前向星)
题意:中文题: 思路:就是找某个点距离其他点的距离,他给你很多点也无所谓.用一个dist[]数组,这个数组保存的是他给你的点到其他点的最短距离且标记的作用,然后bfs搜索就行了. 代码: #inclu ...