数据多重共线性

Multicollinearity is likely far down on a mental list of things to check for, if it is on a list at all. This does, however, appear almost always in real-life datasets, and it’s important to be aware of how to address it.

多重共线性可能根本不在要检查的事物的清单上,即使它根本不在清单上。 但是,这几乎总是出现在现实生活的数据集中,因此,重要的是要知道如何解决它。

As its name suggests, multicollinearity is when two (or more) features are correlated with each other, or ‘collinear’. This occurs often in real datasets, since one measurement (e.g. family income) may be correlated with another (e.g. school performance). You may be unaware that many algorithms and analysis methods rely on the assumption of no multicollinearity.

顾名思义,多重共线性是指两个(或多个)要素相互关联,即“共线性”。 由于一种度量(例如家庭收入)可能与另一种度量(例如学校成绩)相关,因此这经常发生在真实数据集中。 您可能没有意识到许多算法和分析方法都依赖于没有多重共线性的假设。

Let’s take this dataset for example, which attempts to predict a student’s chance of admission given a variety of factors.

让我们以这个数据集为例,该数据集尝试在各种因素的影响下预测学生的入学机会。

We want to achieve a static like “performing research increases your chance of admission by x percent” or “each additional point on the TOEFL increases chance of admission by y percent”. The first thought is to train a linear regression model and interpret the coefficients.

我们希望实现一个静态的状态,例如“进行研究使您被录取的机会增加x %”或“托福每增加一个点,就可以使入学的机会增加y %”。 首先想到的是训练线性回归模型并解释系数。

A multiple regression model achieves a mean absolute error of about 4.5% percentage points, which is fairly accurate. The coefficients are interesting to analyze, and we can make a statement like ‘each point on the GRE increases you chances of admission by 0.2%, whereas each point on your CGPA increases chances by 11.4%.’

多元回归模型的平均绝对误差约为4.5%,这是相当准确的。 系数的分析很有趣,我们可以做出这样的表述:“ GRE的每个点使您被录取的机会增加了0.2%,而CGPA的每个点使您被录取的机会增加了11.4%。”

Let’s take a look at the correlation matrix to identify which features are correlated with each other. In general, this dataset is full of highly correlated features, but CGPA is in general correlated heavily with other features.

让我们看一下相关矩阵,以确定哪些要素相互关联。 总的来说,该数据集充满了高度相关的特征,但是CGPA通常与其他特征高度相关。

Since the TOEFL score is highly correlated by the GRE score, let’s remove this feature and re-train a linear regression model. (Perhaps) Surprisingly, the mean absolute error decreases to 4.3%. The change of coefficients is also interesting — notably, the importance of the University Rating decreases by almost half, the importance of research doubles, etc.

由于TOEFL分数与GRE分数高度相关,因此让我们删除此功能并重新训练线性回归模型。 (也许)令人惊讶的是,平均绝对误差降低到4.3%。 系数的变化也很有趣-值得注意的是,大学评估的重要性降低了近一半,研究的重要性增加了一倍,等等。

We can take the following away from this:

我们可以采取以下措施:

  • The TOEFL score, like any other feature, can be thought of as having two components: information and noise.就像其他任何功能一样,TOEFL分数也可以认为具有两个组成部分:信息和噪音。
  • Its information component was already represented in other variables (perhaps performing well on the GRE requires skills to perform well on the TOEFL, etc.), so it did not provide any new information.它的信息部分已经用其他变量表示(也许在GRE上表现出色需要技能才能在TOEFL上表现出色,等等),因此它没有提供任何新信息。
  • It had enough noise such that keeping the feature for a minimal information gain is not worth the amount of noise it introduces to the model.它具有足够的噪声,以至于为了获得最小的信息增益而保持该功能不值得其引入模型的噪声量。

In other words, the TOEFL score was collinear with many of the other features. At a base level, the performance of the model was damaged, but additionally, more complex analyses on linear models — which can be very insightful — like the interpretation of coefficients need to be adjusted.

换句话说,托福成绩与许多其他特征是共线的。 从根本上来说,模型的性能受到了损害,但此外,对线性模型的更复杂的分析(可能非常有见地)也需要调整,例如系数的解释需要调整。

It’s worth exploring what the coefficients of regression models mean. For instance, if the coefficient for GRE score is 0.2%, this means that holding all other variables fixed, a one-unit increase in GRE score translates to a 0.2% increase in admission. If we include the TOEFL score (and additional highly correlated features), however, we can’t assume that these variables will remain fixed.

值得探索回归模型系数的含义。 例如,如果GRE分数的系数为0.2%,则意味着将所有其他变量固定为 ,GRE分数每增加1单位,入学率就会增加0.2%。 但是,如果我们包括TOEFL分数(以及其他高度相关的功能),则不能假定这些变量将保持不变。

Hence, the coefficients go haywire, and completely uninterpretable, since there is massive information overlap. When such scenarios arise, the modelling capability is limited as well. Because there is so much overlap, everything is amplified — if there is an error in one part, it is likely to spread via overlapping to several other sections.

因此,由于存在大量的信息重叠,因此这些系数非常困难,并且完全无法解释。 当出现这种情况时,建模能力也会受到限制。 由于存在太多的重叠,因此一切都会被放大-如果一个部分中存在错误,则很可能会通过重叠到其他几个部分而扩展。

In general, it’s impractical to memorize whether algorithms or techniques work well with multicollinearity, but it is usually true that any model that treats features the ‘same’ (makes assumptions about feature relationships) or doesn’t measure information content is vulnerable to multicollinearity.

总的来说,记住算法或技术在多重共线性中是否能很好地工作是不切实际的,但是通常确实的是,任何对待特征“相同”(对特征关系做出假设)或不测量信息内容的模型都容易受到多重共线性的影响。

What does this mean?

这是什么意思?

Take, for instance, the decision tree, which is not vulnerable to multicollinearity because it explicitly measures information content (opposite of entropy) and makes no other assumptions or measurements of relationships between features. If columns A and B are correlated with each other, the decision tree will simply choose one and discard the other (or place it very low). In this case, features are considered by their information content.

以决策树为例,该决策树不易受到多重共线性的影响,因为它显式地测量信息内容(与熵相反),并且不进行其他假设或度量要素之间的关系。 如果A列和B列相互关联,则决策树将只选择其中一个并丢弃另一个(或将其放置得很低)。 在这种情况下,要素将通过其信息内容来考虑。

On the other hand, K-Nearest Neighbors is affected by multicollinearity because it assumes every point can be represented in multidimensional space as some coordinate (e.g. (3, 2.5, 6.7, 9.8) on an x training set with four dimensions). It doesn’t measure information content, and treats features as the same. Hence, one can imagine that data points between two highly correlated features would cluster together along a line, and how that would interfere with cross-dimensional distances.

在另一方面,K最近邻由多重共线性,因为它假设每个点都可以在多维空间被表示为一些坐标的影响(例如(3, 2.5, 6.7, 9.8)上的x训练集具有四个尺寸)。 它不度量信息内容,并且将特征视为相同。 因此,可以想象两个高度相关的要素之间的数据点将沿着一条线聚在一起,以及如何干扰跨维距离。

Principal Component Analysis is an unsupervised method, but we can still evaluate it along these criteria! The goal of PCA is to explicitly retain the variance, or structure (information) of a reduced dataset, which is why it is not only generally immune to multicollinearity but is often used to reduce multicollinearity in datasets.

主成分分析是一种无监督的方法,但是我们仍然可以按照这些标准对其进行评估! PCA的目标是明确保留简化数据集的方差或结构(信息),这就是为什么它不仅通常不受多重共线性影响,而且经常用于减少数据集中的多重共线性。

Most efficient solving methods for algorithms rely on matrix mathematics and linear algebra systems — essentially representations of high-dimensional spaces, which are easily screwed with by multicollinearity.

用于算法的最有效的求解方法依赖于矩阵数学和线性代数系统-本质上是高维空间的表示,这些空间很容易被多重共线性所迷惑。

Common techniques like heavy one-hot encoding (dummy variables) in which categorical variables are represented as 0s and 1s can also be damaging because they form a perfectly linear relationship. Say that we have three binary columns A, B, and C, indicating if a row is part of one of the categories. The sum of these columns must add to 1, and hence a perfectly linear relationship A+B+C=1 is established.

诸如重一键编码(虚拟变量)之类的常用技术(其中分类变量以0和1表示)也可能是有害的,因为它们形成了完美的线性关系。 假设我们有三个二进制列A,B和C,它们指示一行是否属于类别之一。 这些列的总和必须加1,因此建立了完美的线性关系A+B+C=1

How can we identify multicollinearity?

我们如何识别多重共线性?

  • Use a VIF (Variance Inflation Factor) score on a regression model to identify is multicollinearity is present in your dataset.在回归模型上使用VIF(方差通货膨胀因子)得分来确定数据集中是否存在多重共线性。
  • If standard errors are too high, it may be an indicator that one error is being repeatedly propagated because of information overlap.如果标准错误过高,则可能表明由于信息重叠,一个错误正在重复传播。
  • Large changes in parameters when adding or removing new features indicate heavily duplicated information.添加或删除新功能时,参数的较大变化表示信息重复很多。
  • Create a correlation matrix. Features with values consistently above 0.4 are indicators of multicollinearity.创建一个相关矩阵。 值始终高于0.4的要素表示多重共线性。

There are many solutions to multicollinearity:

多重共线性有多种解决方案:

  • Use an algorithm that is immune to multicollinearity if it is an inherent aspect of the data and other transformations are not feasible. Ridge regression, principal component regression, or partial least squares regression are all good regression alternatives.如果它是数据的固有方面并且其他转换不可行,则使用不受多重共线性影响的算法。 岭回归,主成分回归或偏最小二乘回归都是很好的回归选择。
  • Use PCA to reduce the dimensionality of the dataset and only retain variables that are important towards preserving the data’s structure. This is beneficial if the dataset is overall very multicollinear.使用PCA可以减少数据集的维数,并且仅保留对于保留数据结构很重要的变量。 如果数据集总体上非常多共线性,这将是有益的。
  • Use a feature selection method to remove highly correlated features.使用特征选择方法删除高度相关的特征。
  • Obtain more data — this is the preferred method. More data can allow the model to retain the current amount of information while giving context and perspective to noise.获取更多数据-这是首选方法。 更多数据可以使模型保留当前的信息量,同时为噪声提供上下文和透视图。

翻译自: https://medium.com/@andre_ye/multicollinearity-impacts-your-data-science-project-more-than-you-know-8504efd706f

数据多重共线性


http://www.taodudu.cc/news/show-995280.html

相关文章:

  • 充分利用昂贵的分析
  • 如何识别媒体偏见_描述性语言理解,以识别文本中的潜在偏见
  • 数据不平衡处理_如何处理多类不平衡数据说不可以
  • 糖药病数据集分类_使用optuna和mlflow进行心脏病分类器调整
  • mongdb 群集_群集文档的文本摘要
  • gdal进行遥感影像读写_如何使用遥感影像进行矿物勘探
  • 推荐算法的先验算法的连接_数据挖掘专注于先验算法
  • 时间序列模式识别_空气质量传感器数据的时间序列模式识别
  • 数据科学学习心得_学习数据科学
  • 数据科学生命周期_数据科学项目生命周期第1部分
  • 条件概率分布_条件概率
  • 成为一名真正的数据科学家有多困难
  • 数据驱动开发_开发数据驱动的股票市场投资方法
  • 算法偏见是什么_算法可能会使任何人(包括您)有偏见
  • 线性回归非线性回归_了解线性回归
  • 数据图表可视化_数据可视化如何选择正确的图表第1部分
  • 使用python和javascript进行数据可视化
  • github gists 101使代码共享漂亮
  • 大熊猫卸妆后_您不应错过的6大熊猫行动
  • jdk重启后步行_向后介绍步行以一种新颖的方式来预测未来
  • scrapy模拟模拟点击_模拟大流行
  • plsql中导入csvs_在命令行中使用sql分析csvs
  • 交替最小二乘矩阵分解_使用交替最小二乘矩阵分解与pyspark建立推荐系统
  • 火种 ctf_分析我的火种数据
  • 分析citibike数据eda
  • 带有postgres和jupyter笔记本的Titanic数据集
  • 机器学习模型 非线性模型_机器学习模型说明
  • 算命数据_未来的数据科学家或算命精神向导
  • 熊猫数据集_熊猫迈向数据科学的第三部分
  • 充分利用UC berkeleys数据科学专业

数据多重共线性_多重共线性对您的数据科学项目的影响比您所知道的要多相关推荐

  1. 模型 标签数据 神经网络_大型神经网络和小数据的模型选择

    模型 标签数据 神经网络 The title statement is certainly a bold claim, and I suspect many of you are shaking yo ...

  2. keras时间序列数据预测_使用Keras的时间序列数据中的异常检测

    keras时间序列数据预测 Anomaly Detection in time series data provides e-commerce companies, finances the insi ...

  3. 基于plotly数据可视化_如何使用Plotly进行数据可视化

    基于plotly数据可视化 The amount of data in the world is growing every second. From sending a text to clicki ...

  4. python怎么用大数据分析师_如何七周成为数据分析师18:Python的新手教程

    本文是<怎样 七周成为数据剖析 师>的第十八篇教程,假定 想要了解 写作初衷,能够 先行阅读七周指南.温馨提示:假定 您曾经 熟习 Python,大可不用 再看这篇文章,或只选择 部分 . ...

  5. python大数据免费_用python做大数据

    不学Python迟早会被淘汰?Python真有这么好的前景? 最近几年Python编程语言在国内引起不小的轰动,有超越Java之势,本来在美国这个编程语言就是最火的,应用的非常非常的广泛,而Pytho ...

  6. 数据结构设计_撮合引擎开发:数据结构设计

    价值超5万的撮合引擎:开篇 价值超5万的撮合引擎:MVP版本 交易委托账本 交易委托账本(OrderBook)是整个撮合引擎里最核心也是最复杂的数据结构,每个交易对都需要维护一份交易委托账本,账本里保 ...

  7. python收集数据程序_用Python挖掘Twitter数据:数据采集

    原标题:用Python挖掘Twitter数据:数据采集 作者:Marco Bonzanini 翻译:数盟 这是7部系列中的第1部分,注重挖掘Twitter数据以用于各种案例.这是第一篇文章,专注于数据 ...

  8. 商业方向的大数据专业_好程序员大数据培训分享大数据就业方向有哪些

    好程序员大数据培训分享大数据就业方向有哪些?看到了大数据的就业前景及就业薪资,相信很多人都对大数据技术跃跃欲试,想要学习大数据技术.小编认为在学习大数据之前,你还需要了解一下大数据的就业方向有哪些?毕 ...

  9. list vue 添加数据方法_一篇文章教会你创建vue项目和使用vue.js实现数据增删改查...

    简介:一篇文章教会你创建vue项目和使用vue.js实现数据增删改查 [一.项目背景] 在管理员的一些后台页面里,数据列表中都会对这些数据进行增删改查的操作,例如管理员添加商品.修改商品价格.删除商品 ...

最新文章

  1. CSS扩展“less和”sass“
  2. 网狐棋牌(一) ServerKernel中的IQueueService接口分析
  3. JAVA流程控制学习总结
  4. 远程服务器电脑的设置
  5. Vjudge 2016-5-10 math test
  6. 关于sprintf的问题
  7. MAYA中average normal
  8. 命名实体识别研究综述
  9. C语言中用二进制输出一个数字
  10. Linux事件驱动网络编程,Linux系统编程之事件驱动
  11. 六类网线和超六类网线的区别
  12. 【量子机器学习】HHL算法: Quantum algorithm for solving linear systems of equations
  13. Python实现分解质因数
  14. MySQL高级2-优化分析
  15. 校园欺凌——四位学生的乱伦之战!!!
  16. EXCEL2010数据挖掘插件 下载地址
  17. Android指纹解锁源码分析
  18. 报税系统代理服务器地址6,报税系统服务器地址怎么填
  19. VS2017中自用部分插件的设置的翻译或功能介绍—— Viasfora设置(一)
  20. 了解Unix的历史与现状

热门文章

  1. 关于cp命令中拷贝所有的写法
  2. Bellman-Ford算法和SPFA算法
  3. 1002. 写出这个数 (20)
  4. Gdb 调试core文件详解
  5. 编写Shell脚本(批处理,一次执行多条命令)
  6. Python内置数据类型之Tuple
  7. 程序员35岁真的是分水岭吗?小白也能看明白
  8. 牛客网笔记之JAVA运算符
  9. C# 篇基础知识10——多线程
  10. 使用canvas绘制时钟