【udacity】机器学习-2模型验证
Evernote Export
1、模型的评估与验证简介
机器学习通常是大量传入数据,然后会有一些关于数据的决策、想法和摘要。
2、模型评估
评估模型使用的是各种数据分析的方法,至少需要使用python编程和一些统计学的知识
9、用一个数据描述数据
通常情况下可以使用一个数字来对整个数据集进行描述
10、选择哪个数字
一般情况下,我们使用众数来对整个数据集的大多数来描述
12、众数-负偏斜分布
14、众数的更多信息!
- 众数是否可用于描述任何数据类型,数值型和类别型都可以?
- 数据集中的所有分支都会影响众数,是对还是错?
- 如果有一个总体,我们从中取出了很多样本,找到的每个样本的众数将会相同
- 众数有公式
17、找出均值
与众数不同,平均值将会在全部数值考虑在内,因为我们将其累加起来,然后除以数值的个数
18、找出均值的步骤
求和->找到个数相除
19、迭代过程
20、有用的符号
μ=x=n∑x
21、均值的特性
- 分布中的所有得分都将影响平均值
- 平均值可以用公式来描述,
- 同一个总体中有很多样本会有相似的平均值
- 一个样本的平均值可以用来推论其所在的总体,
- 向数据集中添加一个极值,则平均值会发生改变
22、含异常值的均值
含有异常值的均值将会影响到数据的表达,异常值的数据使得均值不能准确的判断出来
25、中位数的要求
中位数的出现需要将数据进行排序,然后取其中间值
26、含有异常值的中位数
对于含有异常值的数据集, 中位数即使偏离了数据基准也不会受很大的影响
中位数往往更能后反应数据的集中趋势
36、小结-中心测量值
数据类型 | 是否具有简单的等式 | 是否随数据值的变化而改变 | 是否不受组距改变的影响 | 受异常值影响是否巨大 | 在直方图中是否容易体现 |
---|---|---|---|---|---|
Mean | yes | yes | yes | yes | no |
Median | no | no | yes | yes | no |
Mode | no | no | no | yes | yes |
41、量化数据的分布形态
range=max(x)−min(x)
方差(Variance):
σ2=n−11i=1∑n(xi−x)2
标准差(StandardDeviation):
σ=(n−11i=1∑n(xi−x)2)
平均绝对偏差(MeanAbsoluteDeviation):
MAD=n1i=1∑n∣(xi−x)∣
42、值域是否改变
值域有时候会改变,当我们将数值在中间加入大量数据的时候不会发生改变,但是在高于最大值或其他地方的时候,值域就会发生改变。值域在有异常值是增大了差异性。值域不可能准确的代表数据的差异性。
44、砍掉尾巴
一般的处理值域的方式就是砍掉头和尾,然后只考虑中间的数据值
一般习惯上会忽略较低的25%和较高的25%
47、IQR(interquartile range)
四分位差(Q3-Q1)
- 约50%的数据属于IQR
- IQR要受到数据集中每个值的影响
- QR不受异常值的影响
49、什么是异常值
50、定义异常值
异常值定义:小于第一个四分位数-1.5倍的IQR
异常值定义:小于第二个四分位数+1.5倍的IQR
IQR=Q3-Q1
51、箱型图认识
51、均值不一定在IQR中
因为均值受到异常值的影响,但是IQR却不受异常值的影响
52、IQR的不足
IQR和值域无法将所有的数据全部考虑进去
53、衡量差异性的最好的方法
找到数据集的每两个数值的距离和数据集的平均值
55、离均差
Deviation from Mean
xi−x
x=10∑x=52793.60
sample | Deviation from Mean | Absolute Feviations |
---|---|---|
33219 | -19574.6 | 19574.6 |
36259 | -16534.6 | 16534.6 |
38801 | -13992.6 | 13992.6 |
46335 | -6458.6 | 6458.6 |
46840 | -5953.6 | 5953.6 |
47594 | -5199.6 | 5199.6 |
55130 | 2336.4 | 2336.4 |
56863 | 4069.4 | 4069.4 |
78070 | 25276.4 | 25276.4 |
88830 | 36036.4 | 36036.4 |
Average deviation = 0
61、平均绝对偏差的公式
n∑∣(x−xi)∣
62、平方偏差
sample | Deviation from Mean | Squared Deviations |
---|---|---|
33219 | -19574.6 | 383337241 |
36259 | -16534.6 | 273564984 |
38801 | -13992.6 | 195776064 |
46335 | -6458.6 | 41705764 |
46840 | -5953.6 | 35438209 |
47594 | -5199.6 | 27029601 |
55130 | 2336.4 | 5456896 |
56863 | 4069.4 | 16556761 |
78070 | 25276.4 | 638876176 |
88830 | 36036.4 | 1298593296 |
70、标准偏差的求法
- 求平均值
- 求离均差
- 求每个偏差的平方值
- 取平均值后再去平方根值
71、用语言来描述标准偏差
σ=nΣ(xi−x)2
- Square root of average
- (Average squared deviation)Squared
- Sum of squared deviations
- Sum of (absolute deviations squared)
- Square root of ((sum of squared deviations)divided by n)
74、标准差的重要性
标准差可以在统计分析时提供大量的帮助,事实证明,在正态分布中,即数据分布均匀,平均值等于中位数也等于众数,同时这些统计量位于分布的中心
标准差具有重要意义,大约68%的数据与平均值的偏差不超过一个标准差,而95%的数据与平均值的偏差不超过2个标准差
以正态分布举例
65%的数据
x−σ,x+σ
95%的数据
x−2σ,x+2σ
77、贝塞尔校正
通常,抽样会低估了总体中差异性的数量,因为抽样往往是总体居于中间的值,特别是正态分布,多数值居于中间位置,因此我们从正态分布的总体中抽样时,多数值也在此处附近
为了纠正这种现象,我们使用内塞尔校正系数,我们把除以n用除以n-1代替
78、样本标准差
sample standard deviation
s=n−1Σ(xi−x)2≈σ=nΣ(xi−x)2
81、Numpy
Numpy内置了进行数据分析时所要执行的大量的基础任务所需的函数
- 数组的平均差
- 数组的中位数差
- 数组的标准差
82、Pandas
import numpy as np
import pandas as pd
"""
d = {'name':pd.Series(['Braund','Cummings','Heikkinen','Allen'],index=['a','b','c','d']), 'age':pd.Series([22,38,26,35],index=['a','b','c','d']), 'fare':pd.Series([7.25,71.83,8.05],index=['a','b','d']), 'survived':pd.Series([False,True,True,False],index=['a','b','c','d'])}
df = pd.DataFrame(d)
print(df)
"""
d= {
'counties':pd.Series(['Russian Fed.', 'Norway', 'Canada', 'United States', 'Netherlands', 'Germany', 'Switzerland', 'Belarus', 'Austria', 'France', 'Poland', 'China', 'Korea', 'Sweden', 'Czech Republic', 'Slovenia', 'Japan', 'Finland', 'Great Britain', 'Ukraine', 'Slovakia', 'Italy', 'Latvia', 'Australia', 'Croatia', 'Kazakhstan']),
'gold':pd.Series([13, 11, 10, 9, 8, 8, 6, 5, 4, 4, 4, 3, 3, 2, 2, 2, 1, 1, 1, 1, 1, 0, 0, 0, 0,
0]),
'silver':pd.Series([11, 5, 10, 7, 7, 6, 3, 0, 8, 4, 1, 4, 3, 7, 4, 2, 4, 3, 1, 0, 0, 2, 2, 2, 1,
0]),
'bronze':pd.Series([9, 10, 5, 12, 9, 5, 2, 1, 5, 7, 1, 2, 2, 6, 2, 4, 3, 1, 2, 1, 0, 6, 2, 1, 0,
1]),}
df = pd.DataFrame(d)
print(df)
100、选择合适的指标
在构建机器学习模型时,我们首先要选择性能指标,然后测试模型的表现如何。相关的指标有多个,具体取决于我们要尝试解决的问题。
在可以选择性能指标之前,首先务必要认识到,机器学习研究的是如何学习根据数据进行预测。对于本课程和后续的“监督式机器学习”课程,我们将重点关注那些创建分类或创建预测回归类型的已标记数据。
此外,在测试模型时,也务必要将数据集分解为训练数据和测试数据。如果不区分训练数据集和测试数据集,则在评估模型时会遇到问题,因为它已经看到了所有数据。我们需要的是独立的数据集,以确认模型可以很好地泛化,而不只是泛化到训练样本。在下一课中,我们将探讨模型误差的一些常见来源,并介绍如何正确分解本课程的“数据建模和验证”部分中的数据集。
102、分类指标和回归指标
在分类中,我们想了解模型隔多久正确或不正确地识别新样本一次。而在回归中,我们可能更关注模型的预测值与真正值之间差多少。
在本节课的余下部分,我们会探讨几个性能指标。对于分类,我们会探讨准确率、精确率、召回率和 F 分数。对于回归,我们会探讨平均绝对误差和均方误差。
103、分类指标
对于分类,我们处理的是根据离散数据进行预测的模型。这就是说,此类模型确定新实例是否属于给定的一组类别。在这里,我们测量预测是否准确地将所讨论的实例进行分类。
104、准确率
最基本和最常见的分类指标就是准确率。在这里,准确率被描述为在特定类的所有项中正确分类或标记的项的数量。
举例而言,如果教室里有 15 个男孩和 16 个女孩,人脸识别软件能否正确识别所有男孩和所有女孩?如果此软件能识别 10 个男孩和 8 个女孩,则它识别男孩和女孩的准确率分别为 66% 和 50%:
准确率 = 正确识别的实例的数量/所有实例数量
有关准确率和如何在 sklearn 中使用它的更多信息,请查看此链接 此处。分类指标
对于分类,我们处理的是根据离散数据进行预测的模型。这就是说,此类模型确定新实例是否属于给定的一组类别。在这里,我们测量预测是否准确地将所讨论的实例进行分类。
%23%23%23%23%201%E3%80%81%E6%A8%A1%E5%9E%8B%E7%9A%84%E8%AF%84%E4%BC%B0%E4%B8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E5%87%BA%E4%BA%86%E5%BE%88%E5%A4%9A%E6%A0%B7%E6%9C%AC%EF%BC%8C%E6%89%BE%E5%88%B0%E7%9A%84%E6%AF%8F%E4%B8%AA%E6%A0%B7%E6%9C%AC%E7%9A%84%E4%BC%97%E6%95%B0%E5%B0%86%E4%BC%9A%E7%9B%B8%E5%90%8C%0A*%20%5B%20%5D%20%E4%BC%97%E6%95%B0%E6%9C%89%E5%85%AC%E5%BC%8F%0A%0A%23%23%23%23%2017%E3%80%81%E6%89%BE%E5%87%BA%E5%9D%87%E5%80%BC%0A%3E%E4%B8%8E%E4%BC%97%E6%95%B0%E4%B8%8D%E5%90%8C%EF%BC%8C%E5%B9%B3%E5%9D%87%E5%80%BC%E5%B0%86%E4%BC%9A%E5%9C%A8%E5%85%A8%E9%83%A8%E6%95%B0%E5%80%BC%E8%80%83%E8%99%91%E5%9C%A8%E5%86%85%EF%BC%8C%E5%9B%A0%E4%B8%BA%E6%88%91%E4%BB%AC%E5%B0%86%E5%85%B6%E7%B4%AF%E5%8A%A0%E8%B5%B7%E6%9D%A5%EF%BC%8C%E7%84%B6%E5%90%8E%E9%99%A4%E4%BB%A5%E6%95%B0%E5%80%BC%E7%9A%84%E4%B8%AA%E6%95%B0%0A%3E%0A%23%23%23%23%2018%E3%80%81%E6%89%BE%E5%87%BA%E5%9D%87%E5%80%BC%E7%9A%84%E6%AD%A5%E9%AA%A4%0A%3E%E6%B1%82%E5%92%8C-%3E%E6%89%BE%E5%88%B0%E4%B8%AA%E6%95%B0%E7%9B%B8%E9%99%A4%0A%0A%23%23%23%23%2019%E3%80%81%E8%BF%AD%E4%BB%A3%E8%BF%87%E7%A8%8B%0A%0A%0A%23%23%23%23%2020%E3%80%81%E6%9C%89%E7%94%A8%E7%9A%84%E7%AC%A6%E5%8F%B7%0A%24%24%5Cmu%3D%5Coverline%7Bx%7D%3D%5Cfrac%7B%5Csum%7Bx%7D%7D%7Bn%7D%24%24%0A%0A%23%23%23%23%2021%E3%80%81%E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6%8B%E5%8A%BF**%0A%60%60%60mermaid%0Agraph%20TD%0AA%5Bmeasures%20of%20center%5D%20--%3EB(Mean)%0AA%5Bmeasures%20of%20center%5D%20--%3EC(Median)%0AA%5Bmeasures%20of%20center%5D%20--%3ED(Mode)%0A%60%60%60%0A%0A%23%23%23%23%2036%E3%80%81%E5%B0%8F%E7%BB%93-%E4%B8%AD%E5%BF%83%E6%B5%8B%E9%87%8F%E5%80%BC%0A%E6%95%B0%E6%8D%AE%E7%B1%BB%E5%9E%8B%7C%E6%98%AF%E5%90%A6%E5%85%B7%E6%9C%89%E7%AE%80%E5%8D%95%E7%9A%84%E7%AD%89%E5%BC%8F%7C%E6%98%AF%E5%90%A6%E9%9A%8F%E6%95%B0%E6%8D%AE%E5%80%BC%E7%9A%84%E5%8F%98%E5%8C%96%E8%80%8C%E6%94%B9%E5%8F%98%7C%E6%98%AF%E5%90%A6%E4%B8%8D%E5%8F%97%E7%BB%84%E8%B7%9D%E6%94%B9%E5%8F%98%E7%9A%84%E5%BD%B1%E5%93%8D%7C%E5%8F%97%E5%BC%82%E5%B8%B8%E5%80%BC%E5%BD%B1%E5%93%8D%E6%98%AF%E5%90%A6%E5%B7%A8%E5%A4%A7%7C%E5%9C%A8%E7%9B%B4%E6%96%B9%E5%9B%BE%E4%B8%AD%E6%98%AF%E5%90%A6%E5%AE%B9%E6%98%93%E4%BD%93%E7%8E%B0%7C%0A------%7C------%7C------%7C----------%7C----%7C----%7C%0AMean%7Cyes%7Cyes%7Cyes%7Cyes%7Cno%7C%0AMedian%7Cno%7Cno%7Cyes%7Cyes%7Cno%7C%0AMode%7Cno%7Cno%7Cno%7Cyes%7Cyes%7C%0A%0A%23%23%23%23%2041%E3%80%81%E9%87%8F%E5%8C%96%E6%95%B0%E6%8D%AE%E7%9A%84%E5%88%86%E5%B8%83%E5%BD%A2%E6%80%81%0A%24%24range%20%3D%20max(x)-min(x)%24%24%0A%E6%96%B9%E5%B7%AE(Variance)%3A%0A%24%24%5Csigma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C%82%E5%B8%B8%E5%80%BC%E6%98%AF%E5%A2%9E%E5%A4%A7%E4%BA%86%E5%B7%AE%E5%BC%82%E6%80%A7%E3%80%82%E5%80%BC%E5%9F%9F%E4%B8%8D%E5%8F%AF%E8%83%BD%E5%87%86%E7%A1%AE%E7%9A%84%E4%BB%A3%E8%A1%A8%E6%95%B0%E6%8D%AE%E7%9A%84%E5%B7%AE%E5%BC%82%E6%80%A7%E3%80%82%0A%0A%23%23%23%23%2044%E3%80%81%E7%A0%8D%E6%8E%89%E5%B0%BE%E5%B7%B4%0A%3E%E4%B8%80%E8%88%AC%E7%9A%84%E5%A4%84%E7%90%86%E5%80%BC%E5%9F%9F%E7%9A%84%E6%96%B9%E5%BC%8F%E5%B0%B1%E6%98%AF%E7%A0%8D%E6%8E%89%E5%A4%B4%E5%92%8C%E5%B0%BE%EF%BC%8C%E7%84%B6%E5%90%8E%E5%8F%AA%E8%80%83%E8%99%91%E4%B8%AD%E9%97%B4%E7%9A%84%E6%95%B0%E6%8D%AE%E5%80%BC%0A%E4%B8%80%E8%88%AC%E4%B9%A0%E6%83%AF%E4%B8%8A%E4%BC%9A%E5%BF%BD%E7%95%A5%E8%BE%83%E4%BD%8E%E7%9A%8425%25%E5%92%8C%E8%BE%83%E9%AB%98%E7%9A%8425%25%0A%3E%0A%23%23%23%23%2047%E3%80%81IQR(interquartile%20range)%0A%3E%E5%9B%9B%E5%88%86%E4%BD%8D%E5%B7%AE(Q3-Q1)%0A*%20%5BX%5D**%E7%BA%A650%25%E7%9A%84%E6%95%B0%E6%8D%AE%E5%B1%9E%E4%BA%8EIQR**%0A*%20%5B%20%5D%20**IQR%E8%A6%81%E5%8F%97%E5%88%B0%E6%95%B0%E6%8D%AE%E9%9B%86%E4%B8%AD%E6%AF%8F%E4%B8%AA%E5%80%BC%E7%9A%84%E5%BD%B1%E5%93%8D**%0A*%20%5BX%5D%20**QR%E4%B8%8D%E5%8F%97%E5%BC%82%E5%B8%B8%E5%80%BC%E7%9A%84%E5%BD%B1%E5%93%8D**%0A%0A%23%23%23%23%2049%E3%80%81%E4%BB%80%E4%B9%88%E6%98%AF%E5%BC%82%E5%B8%B8%E5%80%BC%0A%0A%23%23%23%23%2050%E3%80%81%E5%AE%9A%E4%B9%89%E5%BC%82%E5%B8%B8%E5%80%BC%0A%3E%E5%BC%82%E5%B8%B8%E5%80%BC%E5%AE%9A%E4%B9%89%EF%BC%9A%E5%B0%8F%E4%BA%8E%E7%AC%AC%E4%B8%80%E4%B8%AA%E5%9B%9B%E5%88%86%E4%BD%8D%E6%95%B0-1.5%E5%80%8D%E7%9A%84IQR%0A%E5%BC%82%E5%B8%B8%E5%80%BC%E5%AE%9A%E4%B9%89%EF%BC%9A%E5%B0%8F%E4%BA%8E%E7%AC%AC%E4%BA%8C%E4%B8%AA%E5%9B%9B%E5%88%86%E4%BD%8D%E6%95%B0%2B1.5%E5%80%8D%E7%9A%84IQR%0AIQR%3DQ3-Q1%0A%0A%23%23%23%23%2051%E3%80%81%E7%AE%B1%E5%9E%8B%E5%9B%BE%E8%AE%A4%E8%AF%86%0A!%5B5886e2e1786cd3a08583a4365d5ae13b.png%5D(en-resource%3A%2F%2Fdatabase%2F1216%3A1)%0A%0A%23%23%23%23%2051%E3%80%81%E5%9D%87%E5%80%BC%E4%B8%8D%E4%B8%80%E5%AE%9A%E5%9C%A8IQR%E4%B8%AD%0A%3E%E5%9B%A0%E4%B8%BA%E5%9D%87%E5%80%BC%E5%8F%97%E5%88%B0%E5%BC%82%E5%B8%B8%E5%80%BC%E7%9A%84%E5%BD%B1%E5%93%8D%EF%BC%8C%E4%BD%86%E6%98%AFIQR%E5%8D%B4%E4%B8%8D%E5%8F%97%E5%BC%82%E5%B8%B8%E5%80%BC%E7%9A%84%E5%BD%B1%E5%93%8D%0A%0A%23%23%23%23%2052%E3%80%81IQR%E7%9A%84%E4%B8%8D%E8%B6%B3%0A%3EIQR%E5%92%8C%E5%80%BC%E5%9F%9F%E6%97%A0%E6%B3%95%E5%B0%86%E6%89%80%E6%9C%89%E7%9A%84%E6%95%B0%E6%8D%AE%E5%85%A8%E9%83%A8%E8%80%83%E8%99%91%E8%BF%9B%E5%8E%BB%0A%0A%23%23%23%23%2053%E3%80%81%E8%A1%A1%E9%87%8F%E5%B7%AE%E5%BC%82%E6%80%A7%E7%9A%84%E6%9C%80%E5%A5%BD%E7%9A%84%E6%96%B9%E6%B3%95%0A%3E%E6%89%BE%E5%88%B0%E6%95%B0%E6%8D%AE%E9%9B%86%E7%9A%84%E6%AF%8F%E4%B8%A4%E4%B8%AA%E6%95%B0%E5%80%BC%E7%9A%84%E8%B7%9D%E7%A6%BB%E5%92%8C%E6%95%B0%E6%8D%AE%E9%9B%86%E7%9A%84%E5%B9%B3%E5%9D%87%E5%80%BC%0A%0A%23%23%23%23%2055%E3%80%81%E7%A6%BB%E5%9D%87%E5%B7%AE%0A**Deviation%20from%20Mean**%0A%24%24x_i-%5Coverline%7Bx%7D%24%24%0A%24%24%5Coverline%7Bx%7D%3D%5Cfrac%7B%5Csum%7Bx%7D%7D%7B10%7D%3D52793.60%24%24%0A%7C%20sample%20%7CDeviation%20from%20Mean%20%7CAbsolute%20Feviations%7C%0A%7C%20---%20%7C%20---%20%7C%20---%20%7C%0A%7C%2033219%20%7C%20-19574.6%20%7C19574.6%20%7C%0A%7C36259%7C-16534.6%7C16534.6%7C%0A%7C%2038801%20%7C%20-13992.6%20%7C13992.6%20%7C%0A%7C%2046335%20%7C%20-6458.6%20%7C6458.6%20%7C%0A%7C%2046840%20%7C%20-5953.6%20%7C5953.6%20%7C%0A%7C%2047594%20%7C%20-5199.6%20%7C5199.6%20%7C%0A%7C%2055130%20%7C%202336.4%20%7C%202336.4%20%7C%0A%7C%2056863%20%7C%204069.4%20%7C4069.4%20%7C%0A%7C%2078070%20%7C%2025276.4%20%7C25276.4%20%7C%0A%7C%2088830%20%7C%2036036.4%20%7C36036.4%20%7C%0A%3EAverage%20deviation%20%3D%200%0A%0A%23%23%23%23%2061%E3%80%81%E5%B9%B3%E5%9D%87%E7%BB%9D%E5%AF%B9%E5%81%8F%E5%B7%AE%E7%9A%84%E5%85%AC%E5%BC%8F%0A%24%24%5Cfrac%7B%5Csum%5Cmid(%5Coverline%7Bx%7D-x_i)%5Cmid%7D%7Bn%7D%24%24%0A%0A%23%23%23%23%2062%E3%80%81%E5%B9%B3%E6%96%B9%E5%81%8F%E5%B7%AE%0A%7C%20sample%20%7CDeviation%20from%20Mean%20%7CSquared%20Deviations%7C%0A%7C%20---%20%7C%20---%20%7C%20---%20%7C%0A%7C%2033219%20%7C%20-19574.6%20%7C383337241%7C%0A%7C36259%7C-16534.6%7C273564984%7C%0A%7C%2038801%20%7C%20-13992.6%20%7C195776064%20%7C%0A%7C%2046335%20%7C%20-6458.6%20%7C41705764%20%7C%0A%7C%2046840%20%7C%20-5953.6%20%7C35438209%7C%0A%7C%2047594%20%7C%20-5199.6%20%7C27029601%7C%0A%7C%2055130%20%7C%202336.4%20%7C5456896%7C%0A%7C%2056863%20%7C%204069.4%20%7C16556761%7C%0A%7C%2078070%20%7C%2025276.4%20%7C638876176%7C%0A%7C%2088830%20%7C%2036036.4%20%7C1298593296%20%7C%0A%0A%23%23%23%23%2070%E3%80%81%E6%A0%87%E5%87%86%E5%81%8F%E5%B7%AE%E7%9A%84%E6%B1%82%E6%B3%95%0A*%20%E6%B1%82%E5%B9%B3%E5%9D%87%E5%80%BC%0A*%20%E6%B1%82%E7%A6%BB%E5%9D%87%E5%B7%AE%0A*%20%E6%B1%82%E6%AF%8F%E4%B8%AA%E5%81%8F%E5%B7%AE%E7%9A%84%E5%B9%B3%E6%96%B9%E5%80%BC%0A*%20%E5%8F%96%E5%B9%B3%E5%9D%87%E5%80%BC%E5%90%8E%E5%86%8D%E5%8E%BB%E5%B9%B3%E6%96%B9%E6%A0%B9%E5%80%BC%0A%0A%23%23%23%23%2071%E3%80%81%E7%94%A8%E8%AF%AD%E8%A8%80%E6%9D%A5%E6%8F%8F%E8%BF%B0%E6%A0%87%E5%87%86%E5%81%8F%E5%B7%AE%0A%24%24%5Csigma%3D%5Csqrt%7B%5Cfrac%7B%5CSigma(x_i-%5Coverline%7Bx%7D)%5E2%7D%7Bn%7D%7D%24%24%0A*%20%5BX%5D%20Square%20root%20of%20average%0A*%20%5B%20%5D%20(Average%20squared%20deviation)Squared%0A*%20%5B%20%5D%20Sum%20of%20squared%20deviations%0A*%20%5B%20%5D%20Sum%20of%20(absolute%20deviations%20squared)%0A*%20%5BX%5D%20Square%20root%20of%20((sum%20of%20squared%20deviations)divided%20by%20n)%0A%0A%23%23%23%23%2074%E3%80%81%E6%A0%87%E5%87%86%E5%B7%AE%E7%9A%84%E9%87%8D%E8%A6%81%E6%80%A7%0A%3E%E6%A0%87%E5%87%86%E5%B7%AE%E5%8F%AF%E4%BB%A5%E5%9C%A8%E7%BB%9F%E8%AE%A1%E5%88%86%E6%9E%90%E6%97%B6%E6%8F%90%E4%BE%9B%E5%A4%A7%E9%87%8F%E7%9A%84%E5%B8%AE%E5%8A%A9%EF%BC%8C%E4%BA%8B%E5%AE%9E%E8%AF%81%E6%98%8E%EF%BC%8C%E5%9C%A8%E6%AD%A3%E6%80%81%E5%88%86%E5%B8%83%E4%B8%AD%EF%BC%8C%E5%8D%B3%E6%95%B0%E6%8D%AE%E5%88%86%E5%B8%83%E5%9D%87%E5%8C%80%EF%BC%8C%E5%B9%B3%E5%9D%87%E5%80%BC%E7%AD%89%E4%BA%8E%E4%B8%AD%E4%BD%8D%E6%95%B0%E4%B9%9F%E7%AD%89%E4%BA%8E%E4%BC%97%E6%95%B0%EF%BC%8C%E5%90%8C%E6%97%B6%E8%BF%99%E4%BA%9B%E7%BB%9F%E8%AE%A1%E9%87%8F%E4%BD%8D%E4%BA%8E%E5%88%86%E5%B8%83%E7%9A%84%E4%B8%AD%E5%BF%83%0A%E6%A0%87%E5%87%86%E5%B7%AE%E5%85%B7%E6%9C%89%E9%87%8D%E8%A6%81%E6%84%8F%E4%B9%89%EF%BC%8C%E5%A4%A7%E7%BA%A668%25%E7%9A%84%E6%95%B0%E6%8D%AE%E4%B8%8E%E5%B9%B3%E5%9D%87%E5%80%BC%E7%9A%84%E5%81%8F%E5%B7%AE%E4%B8%8D%E8%B6%85%E8%BF%87%E4%B8%80%E4%B8%AA%E6%A0%87%E5%87%86%E5%B7%AE%EF%BC%8C%E8%80%8C95%25%E7%9A%84%E6%95%B0%E6%8D%AE%E4%B8%8E%E5%B9%B3%E5%9D%87%E5%80%BC%E7%9A%84%E5%81%8F%E5%B7%AE%E4%B8%8D%E8%B6%85%E8%BF%872%E4%B8%AA%E6%A0%87%E5%87%86%E5%B7%AE%0A%3E%0A%E4%BB%A5%E6%AD%A3%E6%80%81%E5%88%86%E5%B8%83%E4%B8%BE%E4%BE%8B%0A**65%25%E7%9A%84%E6%95%B0%E6%8D%AE**%0A%24%24%5Coverline%7Bx%7D-%5Csigma%2C%5Coverline%7Bx%7D%2B%5Csigma%24%24%0A**95%25%E7%9A%84%E6%95%B0%E6%8D%AE**%0A%24%24%5Coverline%7Bx%7D-2%5Csigma%2C%5Coverline%7Bx%7D%2B2%5Csigma%24%24%0A%0A!%5B2a3cce753d123d2a87d2476df59a95d7.png%5D(en-resource%3A%2F%2Fdatabase%2F1218%3A1)%0A%0A%23%23%23%23%2077%E3%80%81%E8%B4%9D%E5%A1%9E%E5%B0%94%E6%A0%A1%E6%AD%A3%0A%3E%E9%80%9A%E5%B8%B8%EF%BC%8C%E6%8A%BD%E6%A0%B7%E4%BC%9A%E4%BD%8E%E4%BC%B0%E4%BA%86%E6%80%BB%E4%BD%93%E4%B8%AD%E5%B7%AE%E5%BC%82%E6%80%A7%E7%9A%84%E6%95%B0%E9%87%8F%EF%BC%8C%E5%9B%A0%E4%B8%BA%E6%8A%BD%E6%A0%B7%E5%BE%80%E5%BE%80%E6%98%AF%E6%80%BB%E4%BD%93%E5%B1%85%E4%BA%8E%E4%B8%AD%E9%97%B4%E7%9A%84%E5%80%BC%EF%BC%8C%E7%89%B9%E5%88%AB%E6%98%AF%E6%AD%A3%E6%80%81%E5%88%86%E5%B8%83%EF%BC%8C%E5%A4%9A%E6%95%B0%E5%80%BC%E5%B1%85%E4%BA%8E%E4%B8%AD%E9%97%B4%E4%BD%8D%E7%BD%AE%EF%BC%8C%E5%9B%A0%E6%AD%A4%E6%88%91%E4%BB%AC%E4%BB%8E%E6%AD%A3%E6%80%81%E5%88%86%E5%B8%83%E7%9A%84%E6%80%BB%E4%BD%93%E4%B8%AD%E6%8A%BD%E6%A0%B7%E6%97%B6%EF%BC%8C%E5%A4%9A%E6%95%B0%E5%80%BC%E4%B9%9F%E5%9C%A8%E6%AD%A4%E5%A4%84%E9%99%84%E8%BF%91%0A**%E4%B8%BA%E4%BA%86%E7%BA%A0%E6%AD%A3%E8%BF%99%E7%A7%8D%E7%8E%B0%E8%B1%A1%EF%BC%8C%E6%88%91%E4%BB%AC%E4%BD%BF%E7%94%A8%E5%86%85%E5%A1%9E%E5%B0%94%E6%A0%A1%E6%AD%A3%E7%B3%BB%E6%95%B0%EF%BC%8C%E6%88%91%E4%BB%AC%E6%8A%8A%E9%99%A4%E4%BB%A5n%E7%94%A8%E9%99%A4%E4%BB%A5n-1%E4%BB%A3%E6%9B%BF**%0A%0A%0A%23%23%23%23%2078%E3%80%81%E6%A0%B7%E6%9C%AC%E6%A0%87%E5%87%86%E5%B7%AE%0A**sample%20standard%20deviation**%0A%24%24s%3D%5Csqrt%7B%5Cfrac%7B%5CSigma(x_i-%5Coverline%7Bx%7D)%5E2%7D%7Bn-1%7D%7D%5Capprox%5Csigma%3D%5Csqrt%7B%5Cfrac%7B%5CSigma(x_i-%5Coverline%7Bx%7D)%5E2%7D%7Bn%7D%7D%24%24%0A%0A%23%23%23%23%2081%E3%80%81Numpy%0ANumpy%E5%86%85%E7%BD%AE%E4%BA%86%E8%BF%9B%E8%A1%8C%E6%95%B0%E6%8D%AE%E5%88%86%E6%9E%90%E6%97%B6%E6%89%80%E8%A6%81%E6%89%A7%E8%A1%8C%E7%9A%84%E5%A4%A7%E9%87%8F%E7%9A%84%E5%9F%BA%E7%A1%80%E4%BB%BB%E5%8A%A1%E6%89%80%E9%9C%80%E7%9A%84%E5%87%BD%E6%95%B0%0A*%20%E6%95%B0%E7%BB%84%E7%9A%84%E5%B9%B3%E5%9D%87%E5%B7%AE%0A*%20%E6%95%B0%E7%BB%84%E7%9A%84%E4%B8%AD%E4%BD%8D%E6%95%B0%E5%B7%AE%0A*%20%E6%95%B0%E7%BB%84%E7%9A%84%E6%A0%87%E5%87%86%E5%B7%AE%0A!%5B05dddfe27f681704d051995013c3ea4c.png%5D(en-resource%3A%2F%2Fdatabase%2F1220%3A1)%0A%0A%23%23%23%23%2082%E3%80%81Pandas%0A%60%60%60python%0A%0Aimport%20numpy%20as%20np%0Aimport%20pandas%20as%20pd%0A%22%22%22%0A%20d%20%3D%20%7B'name'%3Apd.Series(%5B'Braund'%2C'Cummings'%2C'Heikkinen'%2C'Allen'%5D%2Cindex%3D%5B'a'%2C'b'%2C'c'%2C'd'%5D)%2C%C2%A0%C2%A0%C2%A0%C2%A0%20'age'%3Apd.Series(%5B22%2C38%2C26%2C35%5D%2Cindex%3D%5B'a'%2C'b'%2C'c'%2C'd'%5D)%2C%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%20'fare'%3Apd.Series(%5B7.25%2C71.83%2C8.05%5D%2Cindex%3D%5B'a'%2C'b'%2C'd'%5D)%2C%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%20'survived'%3Apd.Series(%5BFalse%2CTrue%2CTrue%2CFalse%5D%2Cindex%3D%5B'a'%2C'b'%2C'c'%2C'd'%5D)%7D%0A%20df%20%3D%20pd.DataFrame(d)%0A%20print(df)%0A%20%22%22%22%0A%20d%3D%20%7B%C2%A0%C2%A0%C2%A0%0A%20'counties'%3Apd.Series(%5B'Russian%20Fed.'%2C%20'Norway'%2C%20'Canada'%2C%20'United%20States'%2C%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%20'Netherlands'%2C%20'Germany'%2C%20'Switzerland'%2C%20'Belarus'%2C%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%20'Austria'%2C%20'France'%2C%20'Poland'%2C%20'China'%2C%20'Korea'%2C%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%20'Sweden'%2C%20'Czech%20Republic'%2C%20'Slovenia'%2C%20'Japan'%2C%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%20'Finland'%2C%20'Great%20Britain'%2C%20'Ukraine'%2C%20'Slovakia'%2C%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%20'Italy'%2C%20'Latvia'%2C%20'Australia'%2C%20'Croatia'%2C%20'Kazakhstan'%5D)%2C%C2%A0%C2%A0%C2%A0%20%0A%20'gold'%3Apd.Series(%5B13%2C%2011%2C%2010%2C%209%2C%208%2C%208%2C%206%2C%205%2C%204%2C%204%2C%204%2C%203%2C%203%2C%202%2C%202%2C%202%2C%201%2C%201%2C%201%2C%201%2C%201%2C%200%2C%200%2C%200%2C%200%2C%20%0A0%5D)%2C%C2%A0%C2%A0%C2%A0%20%0A'silver'%3Apd.Series(%5B11%2C%205%2C%2010%2C%207%2C%207%2C%206%2C%203%2C%200%2C%208%2C%204%2C%201%2C%204%2C%203%2C%207%2C%204%2C%202%2C%204%2C%203%2C%201%2C%200%2C%200%2C%202%2C%202%2C%202%2C%201%2C%20%0A0%5D)%2C%C2%A0%C2%A0%C2%A0%0A'bronze'%3Apd.Series(%5B9%2C%2010%2C%205%2C%2012%2C%209%2C%205%2C%202%2C%201%2C%205%2C%207%2C%201%2C%202%2C%202%2C%206%2C%202%2C%204%2C%203%2C%201%2C%202%2C%201%2C%200%2C%206%2C%202%2C%201%2C%200%2C%20%0A1%5D)%2C%7D%0Adf%20%3D%20pd.DataFrame(d)%0Aprint(df)%0A%0A%60%60%60%0A%0A%23%23%23%23%20100%E3%80%81%E9%80%89%E6%8B%A9%E5%90%88%E9%80%82%E7%9A%84%E6%8C%87%E6%A0%87%0A%3E%E5%9C%A8%E6%9E%84%E5%BB%BA%E6%9C%BA%E5%99%A8%E5%AD%A6%E4%B9%A0%E6%A8%A1%E5%9E%8B%E6%97%B6%EF%BC%8C%E6%88%91%E4%BB%AC%E9%A6%96%E5%85%88%E8%A6%81%E9%80%89%E6%8B%A9%E6%80%A7%E8%83%BD%E6%8C%87%E6%A0%87%EF%BC%8C%E7%84%B6%E5%90%8E%E6%B5%8B%E8%AF%95%E6%A8%A1%E5%9E%8B%E7%9A%84%E8%A1%A8%E7%8E%B0%E5%A6%82%E4%BD%95%E3%80%82%E7%9B%B8%E5%85%B3%E7%9A%84%E6%8C%87%E6%A0%87%E6%9C%89%E5%A4%9A%E4%B8%AA%EF%BC%8C%E5%85%B7%E4%BD%93%E5%8F%96%E5%86%B3%E4%BA%8E%E6%88%91%E4%BB%AC%E8%A6%81%E5%B0%9D%E8%AF%95%E8%A7%A3%E5%86%B3%E7%9A%84%E9%97%AE%E9%A2%98%E3%80%82%0A%0A%3E%E5%9C%A8%E5%8F%AF%E4%BB%A5%E9%80%89%E6%8B%A9%E6%80%A7%E8%83%BD%E6%8C%87%E6%A0%87%E4%B9%8B%E5%89%8D%EF%BC%8C%E9%A6%96%E5%85%88%E5%8A%A1%E5%BF%85%E8%A6%81%E8%AE%A4%E8%AF%86%E5%88%B0%EF%BC%8C%E6%9C%BA%E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8%BF%9B%E8%A1%8C%E5%88%86%E7%B1%BB%E3%80%82
【udacity】机器学习-2模型验证的更多相关文章
- Python数据科学手册-机器学习之模型验证
模型验证 model validation 就是在选择 模型 和 超参数 之后.通过对训练数据进行学习.对比模型对 已知 数据的预测值和实际值 的差异. 错误的模型验证方法. 用同一套数据训练 和 评 ...
- python进行机器学习(四)之模型验证与参数选择
一.模型验证 进行模型验证的一个重要目的是要选出一个最合适的模型,对于监督学习而言,我们希望模型对于未知数据的泛化能力强,所以就需要模型验证这一过程来体现不同的模型对于未知数据的表现效果. 这里我们将 ...
- 机器学习中模型泛化能力和过拟合现象(overfitting)的矛盾、以及其主要缓解方法正则化技术原理初探
1. 偏差与方差 - 机器学习算法泛化性能分析 在一个项目中,我们通过设计和训练得到了一个model,该model的泛化可能很好,也可能不尽如人意,其背后的决定因素是什么呢?或者说我们可以从哪些方面去 ...
- 谷歌大规模机器学习:模型训练、特征工程和算法选择 (32PPT下载)
本文转自:http://mp.weixin.qq.com/s/Xe3g2OSkE3BpIC2wdt5J-A 谷歌大规模机器学习:模型训练.特征工程和算法选择 (32PPT下载) 2017-01-26 ...
- MindSpore模型验证
技术背景 在前面一篇博客中,我们介绍了MindSpore在机器学习过程中保存和加载模型的方法.这种将模型存储为静态文件的做法,使得我们可以更灵活的使用训练出来的模型,比如用于各种数据集的验证,或者是迁 ...
- webapi - 模型验证
本次要和大家分享的是webapi的模型验证,讲解的内容可能不单单是做验证,但都是围绕模型来说明的:首先来吐槽下,今天下午老板为自己买了套新办公家具,看起来挺好说明老板有钱,不好的是我们干技术的又成了搬 ...
- ASP.NET Core 中文文档 第四章 MVC(2.2)模型验证
原文:Model Validation 作者:Rachel Appel 翻译:娄宇(Lyrics) 校对:孟帅洋(书缘) 在这篇文章中: 章节: 介绍模型验证 验证 Attribute 模型状态 处理 ...
- MVC遇上bootstrap后的ajax表单模型验证
MVC遇上bootstrap后的ajax表单验证 使用bootstrap后他由他自带的样式has-error,想要使用它就会比较麻烦,往常使用jqueyr.validate的话只有使用他自己的样式了, ...
- EMF学习,为了实现可扩展可自定义的模型验证 - 各种实现方法学习
自: http://blog.csdn.net/javaman_chen/article/details/6057033 http://www.ibm.com/developerworks/cn/op ...
随机推荐
- Python SQLAlchemy ORM示例
SQLAlchemy的是Python的SQL工具包和对象关系映射,给应用程序开发者提供SQL的强大功能和灵活性. 安装 pip install mysql-python pip install sql ...
- 一维数组快速转集合(List)
String[] arr={"qwe","asd","zxc","asddf","hghgf"}; ...
- 如鹏网JAVA培训笔记2(晓伟整理)
输入输出: 我们使用System.out.println(“abc”);作用:向控制台输入东西. Scaner sc=new Scanner(System.in)://从输入流中去读取 int age ...
- 如鹏网JAVA培训笔记1(晓伟整理)
JDK(Java Developmet Kit) JRE(Java RunTime Environment)的区别: JRE只有运行JAVA程序的环境,没有开发相关的工具;JDK=JRE+开发相关的工 ...
- HDU 1569 方格取数(2)
方格取数(2) Time Limit: 5000ms Memory Limit: 32768KB This problem will be judged on HDU. Original ID: 15 ...
- mac Gitblit安装
jdk下载传送门 gitBlit是java编写的的 第一步 需要安装java jdk 传送门 JDK6的下载地址: http://www.oracle.com/technetwork/java/jav ...
- 关于使用sudo命令后找不到JAVA_HOME的问题
今天在虚拟机搭建zookeeper环境,结果死活运行不起来,唯一的信息只有out文件里“没有java命令”这一个提示,找来找去发现是找不到java运行环境.可是很奇怪,明明我已经配置了,而且在终端执行 ...
- Spring boot 前后台分离项目 怎么处理spring security 抛出的异常
最近在开发一个项目 前后台分离的 使用 spring boot + spring security + jwt 实现用户登录权限控制等操作.但是 在用户登录的时候,怎么处理spring securi ...
- (hdu step 7.2.2)GCD Again(欧拉函数的简单应用——求[1,n)中与n不互质的元素的个数)
题目: GCD Again Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total ...
- POJ 2373
原本一道挺简单的DP题,思路有了,运用单调队列,但在写单调队列时写挫了... 这道题只需要计算偶数位置的即可,这是显而易见的,我有注意过这情况,写的时候却没在意...--! 加入队列的元素应该当前no ...