白白手拉手-手拉手白癜风论坛

 找回密码
 注册新成员
搜索

查看: 3625|回复: 17

[生活闲谈] 开始学习

[复制链接]

284

主题

1735

帖子

3万

积分

博士生

发表于 2017-4-13 14:28:44 | 显示全部楼层 |阅读模式

30秒注册登陆,可查看更多信息,结交更多好友,享用更多功能,轻松玩转论坛,白白手拉手欢迎您的加入!

您需要 登录 才可以下载或查看,没有账号?注册新成员

x
书封面:见图1
目录:见图2
第1章 机器学习简介
第2章 管理和理解数据
第3章 使用近邻算法分类
第4章 使用贝叶斯分类
第5章 使用决策树分类
第6章 回归方法
第7章 神经网络和支持向量机
第8章 使用关联规
第9章 k-means聚类
第10章 模型评估
第11章 模型改进
第12章 机器学习相关的论

图1

图1

图2

图2


过去事已过去了,未来不必预思量。只今只道只今句,梅子熟时栀子香
如果您认可本论坛,欢迎告诉身边的病友,让更多的朋友来到这里,你+我=手拉手!

2473

主题

43万

帖子

175万

积分

超级版主

发表于 2017-4-13 14:45:49 | 显示全部楼层
我老了  一看到英文就晕了

65

主题

1万

帖子

7万

积分

区长

发表于 2017-4-13 14:52:45 | 显示全部楼层
这也太高难了

284

主题

1735

帖子

3万

积分

博士生

 楼主| 发表于 2017-4-13 14:56:02 | 显示全部楼层
过去事已过去了,未来不必预思量。只今只道只今句,梅子熟时栀子香

284

主题

1735

帖子

3万

积分

博士生

 楼主| 发表于 2017-4-13 14:57:20 | 显示全部楼层

立个贴,自我表下决心

                               
登录/注册后可看大图

过去事已过去了,未来不必预思量。只今只道只今句,梅子熟时栀子香

2473

主题

43万

帖子

175万

积分

超级版主

发表于 2017-4-13 15:04:39 | 显示全部楼层
cloudtone 发表于 2017-4-13 14:56
都是为了工作,混口饭吃不容易

看你英文学的超好,这些都能看懂啊!

193

主题

1万

帖子

36万

积分

总理

发表于 2017-4-13 15:41:08 | 显示全部楼层
我看不懂,等孩子初中我就辅导不了 了

                               
登录/注册后可看大图

175

主题

9万

帖子

37万

积分

总理

发表于 2017-4-13 17:14:02 | 显示全部楼层
头晕眼花

284

主题

1735

帖子

3万

积分

博士生

 楼主| 发表于 2017-4-13 19:07:07 | 显示全部楼层

Exploring and understanding data(考察和理解数据)

Exploring the structure of data(考察数据结构)
If you are fortunate, your source will provide a datadictionary, which is a document that describes the dataset's features. In our case, theused car data does not come with this documentation, so we'll need to create one onour own.(如果运气好的话,数据源会自带一个文档描述数据集的特性,如果没有的话,就需要我们自己去创建)
The str() function provides a method to display the structure of R data structuressuch as data frames, vectors, or lists. It can be used to create the basic outline for ourdata dictionarystr函数能帮助我们显示出数据结构,如图1) Exploring numeric variables(考察数字变量)
To investigate the numeric variables in the used car data, we will employ a comm**et of measurements to describe values known as summary statistics. The summary()function displays several common summary statistics. Let's take a look at a singlefeature, year使用summary函数取得一组统计量,如图2 图3)
Measuring the central tendency – mean and median(测量中心趋势---平均数和中位数)
mean函数和median函数(图4)
Measuring spread – quartiles and the  ve-numbersummary(四分位数和五数概括法)
五数:Minimum(最小值) First quartile or Q1(第一四分位数) Median(中位数) Third quartile or Q3(第三四分位数)  Maximum(最大值)The span between the minimum and maximum value is known as the range. In R,the range() function returns both the minimum and maximum value. Combiningrange() with the diff() difference function allows you to examine the range ofdata with a single line of coderange函数返回最大值和最小值 diff函数返回两个数之间的差值)
Quartiles are a special case of a type of statistics called quantiles, which are numbersthat divide data into equally sized quantities. In addition to quartiles, commonlyused quantiles include tertiles (three parts), quintiles ( ve parts), deciles (10 parts),and percentiles (100 parts).(分位数就是将数据集划分为等大小的 不同部分,如将数据集分为5份、10份、100份)
The middle 50 percent of data between the  rst and third quartiles is of particularinterest because it in itself is a simple measure of spread. The difference between Q1and Q3 is known as the Interquartile Range (IQR), and it can be calculated with theIQR() functionIQR函数返回Q3和Q1之间的差值)
The quantile() function provides a robust tool to identify quantiles for a set ofvalues. By default, the quantile() function returns the  ve-number summary.(quantile函数返回指定位数的分数集,默认是5分位数)               
Visualizing numeric variables – boxplots(数字变量的可视化) (图5 6 7)
图中从下到上依次为Q1, Q2 (the median), and Q3
Visualizing numeric variables – histograms [size=21.3333px](数字变量的可视化--柱状图) (图8 9 10)
Measuring spread – variance and standarddeviation(测量分布趋势方差和标准差) (图11)


图1

图1

图2

图2

图3

图3

图4

图4

图5

图5

图6

图6

图7

图7

图10

图10

图8

图8

图9

图9

图11

图11
过去事已过去了,未来不必预思量。只今只道只今句,梅子熟时栀子香

284

主题

1735

帖子

3万

积分

博士生

 楼主| 发表于 2017-4-13 19:30:34 | 显示全部楼层

Exploring categorical variables(考察分类变量)

In contrast to numeric data, categorical data is typically examined using tables ratherthan summary statistics. A table that presents a single categorical variable is knownas a one-way table. The table() function can be used to generate one-way tables forour used car data: (与数字数据使用summary函数不同,分类数据使用table函数,见图1)
The table() output lists the categories of the nominal variable and a count of thenumber of values falling into this category. Since we know that there are 150 usedcars in the dataset, we can determine that roughly one-third of all the cars weremanufactured in the year 2010, given that 49/150 = 0.327. (table函数输出分类列表和每个分类变量对应的值。数据集中包含150个样本的车子。其中49辆产于2010年,使用49除以150就等于0.327)

R can also perform the calculation of table proporti** directly, by using theprop.table() command on a table produced by the table() function: (在R中我们也可以使用prop.table函数直接计算表格属性 图2)

The results of prop.table() can be combined with other R functi** to transformthe output. Suppose that we would like to display the results in percentages witha single decimal place. We can do this by multiplying the proporti** by 100,
then using the round() function while specifying digits = 1, (将输出结果转换成我们想要的格式 图3)




图1

图1

图2

图2

图3

图3
过去事已过去了,未来不必预思量。只今只道只今句,梅子熟时栀子香

284

主题

1735

帖子

3万

积分

博士生

 楼主| 发表于 2017-4-13 19:52:42 | 显示全部楼层

Measuring the central tendency – the mode(使用众数测量中心趋势)

                                                                                                                                                In statistics terms, the mode of a feature is the value occurring most often. Like themean and median, the mode is another measure of central tendency. It is often usedfor categorical data, since the mean and median are not de ned for nominal variables. (在统计学中,众数(mode)指一组数据中出现次数最多的数据值。在分类数据中经常使用,数字数据使用比较多的是平均数和中位数)a variable with a single mode is unimodal, while avariable with two modes is bimodal. Data having multiple modes is more generallycalled multimodal.

(单峰、双峰、多峰)

Exploring relati**hips between variables (考察变量之间的关系)
Visualizing relati**hips – scatterplots (变量关系的可视化 图1 2)


图1

图1

图2

图2
过去事已过去了,未来不必预思量。只今只道只今句,梅子熟时栀子香

65

主题

1万

帖子

7万

积分

区长

发表于 2017-4-13 20:14:08 | 显示全部楼层
大赞

65

主题

1万

帖子

7万

积分

区长

发表于 2017-4-13 20:14:39 | 显示全部楼层
实在是看不懂啊

284

主题

1735

帖子

3万

积分

博士生

 楼主| 发表于 2017-4-13 23:56:04 | 显示全部楼层
The k-NN  algorithm(k-NN算法)
尽管k-NN是最简单的机器学习算法,但是仍然被广泛使用
图1是k-NN算的的优缺点
例子:
现在我们根据脆度和甜度将一些样本分为水果、蔬菜、和蛋白质三类 并将它们爱坐标系中表示出了 如图2、3
从图4中我们可以看出相同种类的 在坐标系中距离是靠近的
现在我们的任务是确定 西红柿属于哪一类如图5

图1

图1

图3

图3

图2

图2

图4

图4

图5

图5
过去事已过去了,未来不必预思量。只今只道只今句,梅子熟时栀子香

284

主题

1735

帖子

3万

积分

博士生

 楼主| 发表于 2017-4-14 10:37:36 | 显示全部楼层
计算距离的方式有很多种,传统的k-NN算法使用的是欧几里得距离。使用k-NN算法时,关键是k的选择。需要在拟合和过度拟合之间平衡也就是所谓的方差均衡。如果k的取值过大,可以减少噪音数据产生的影响或者偏差,但是可能使学习者偏离从而忽略小的但是特别重要的模式。
现在我们假定两个极端情况:
1)假定选择一个最大数值的k,即所有的训练集的数量。那么这个模型预测的总是多数类而不是最近邻类
2)假定选择一个最小数值的k,即k=1,如果某些样本被错误的标记了。那么任何未被标记的样本将预测为不正确的类。
现在可以看出最佳k的取值就是在这两个极端情况之间。
在实际应用中,k值的选择取决于不同的学习模型和训练样本的数量。一个普遍的做法是首先选择k的值为训练集样本总数的平方根.例如 如果训练集有15个,我们就将k的值设定为4.
但是这种做法也不是总是最好的。另外一个做法就k取不同的值 去测试测试集,并选择分类结果最好的
过去事已过去了,未来不必预思量。只今只道只今句,梅子熟时栀子香
您需要登录后才可以回帖 登录 | 注册新成员

本版积分规则

声明:本站是白癜风患者交流平台,旨在为广大白癜风患者创造良好的交流环境,欢迎更多白癜风患者朋友们加入,本站不对任何网友评论负责!

本站所有信息仅供参考,未经许可严禁拷贝转载,否则我们将追究相关法律责任!

拒绝任何人以任何形式在本论坛发表与中华人民共和国法律相抵触的言论!

白白手拉手法律顾问:河北高俊霞律师事务所 潘双喜律师

信息产业部备案号:苏ICP备20000142号-3

管理员QQ:1013342662 ;E-mail : vbbsls@126.com !

Archiver|手机版|小黑屋|白白手拉手

GMT+8, 2025-5-7 03:47

快速回复 返回顶部 返回列表