什么是Condition Number(条件数)?
In the field of numerical analysis, the condition number of a function with respect to an argument measures how much the output value of the function can change for a small change in the input argument. This is used to measure how sensitive a function is to changes or errors in the input, and how much error in the output results from an error in the input. Very frequently, one is solving the inverse problem – given one is solving for x, and thus the condition number of the (local) inverse must be used. In linear regression the condition number can be used as a diagnostic for multicollinearity.
在数值分析领域,一个函数关于一个参数的条件数(Condition Number)测量了函数的输出值相对于输入参数的变化强度。这用来测量一个函数相对于输入变化或误差有多敏感,以及输出结果相对于输入中的误差的误差变化。非常频繁地,一个是解决逆问题f(x)=y,一个是解决x,因此必须使用逆的条件数。在线性拟合中,条件数可以用来做多重共线性的诊断。
The condition number is an application of the derivative, and is formally defined as the value of the asymptotic worst-case relative change in output for a relative change in input. The "function" is the solution of a problem and the "arguments" are the data in the problem. The condition number is frequently applied to questions in linear algebra, in which case the derivative is straightforward but the error could be in many different directions, and is thus computed from the geometry of the matrix. More generally, condition numbers can be defined for non-linear functions in several variables.
条件数是导数的一个应用,而且定义为相对于输入值的改变而输出值相对渐进最坏的改变。“函数”是一个问题的解决方法,而“参数”是问题的数据。条件数频繁地被应用于线性代数问题,其中导数是前向的,但是误差可以是多种不同方向的,因此通过矩阵的几何而计算。更一般地,条件数可以定义在带有多个变量的非线性函数中。
A problem with a low condition number is said to be well-conditioned, while a problem with a high condition number is said to be ill-conditioned. The condition number is a property of the problem. Paired with the problem are any number of algorithms that can be used to solve the problem, that is, to calculate the solution. Some algorithms have a property called backward stability. In general, a backward stable algorithm can be expected to accurately solve well-conditioned problems. Numerical analysis textbooks give formulas for the condition numbers of problems and identify known backward stable algorithms.
带有低条件数的问题被称为良好-条件的,而带有高的条件数的问题则被称为病态-条件的。条件数是一个问题的属性。跟一个问题匹配的是任何可以用来解决该问题的算法数量,那就是,计算该解决方案。一些算法有一个属性称为反向稳定。一般来说,反向稳定的算法可以用来精确地解决良好-条件的问题。数值分析书给出了问题的条件数公式,并且命名为反向稳定算法。
As a rule of thumb, if the condition number , then you may lose up to
digits of accuracy on top of what would be lost to the numerical method due to loss of precision from arithmetic methods.[3] However, the condition number does not give the exact value of the maximum inaccuracy that may occur in the algorithm. It generally just bounds it with an estimate (whose computed value depends on the choice of the norm to measure the inaccuracy).
凭经验法估计,如果条件数,那么由于数学算法的精度缺失你可能失去在数值方法上k点的精度。但是,条件数并不给出算法中可能出现的精确的最大失真值。它通常只是给出一个估计值(它的计算值取决于测量失真的norm(范数)的选择)。
Matrices矩阵
For example, the condition number associated with the linear equation Ax = b gives a bound on how inaccurate the solution x will be after approximation. Note that this is before the effects of round-off error are taken into account; conditioning is a property of the matrix, not the algorithm or floating point accuracy of the computer used to solve the corresponding system. In particular, one should think of the condition number as being (very roughly) the rate at which the solution, x, will change with respect to a change in b. Thus, if the condition number is large, even a small error in b may cause a large error in x. On the other hand, if the condition number is small then the error in x will not be much bigger than the error in b.
例如,与线性等式Ax=b相关的条件数给出解决方案x在近似之后的不精确的边界。注意这在考虑四舍五入取整化零的影响之前;条件是该矩阵的属性,不是算法或浮点数准确性。尤其是,应该把条件数想象成解决方案x将跟随b的变化的变化率。因此,如果条件数大,那么哪怕是b中很小的误差也可能会引起x中特别大的误差。另一方面,如果条件数小,那么x重的误差将不会比b中的误差大多少。
The condition number is defined more precisely to be the maximum ratio of the relative error in x to the relative error in b.
条件数更精确地定义为x中的相对误差与b中的相对误差的最大比值。
Let e be the error in b. Assuming that A is a nonsingular matrix, the error in the solution A−1b is A−1e. The ratio of the relative error in the solution to the relative error in b is
当e表示b中的误差。假设A是一个非奇异矩阵,解决方案A−1b中的误差为A−1e。解决方案中的相对误差相对于b中的相对误差的比率为

This is easily transformed to
这很容易转换成

The maximum value (for nonzero b and e) is then seen to be the product of the two operator norms as follows:
最大值(对于非零b和e)因此可以看作是这两个操作范数的积如下所示:

The same definition is used for any consistent norm, i.e. one that satisfies

When the condition number is exactly one (which can only happen if A is a scalar multiple of a linear isometry), then a solution algorithm can find (in principle, meaning if the algorithm introduces no errors of its own) an approximation of the solution whose precision is no worse than that of the data.
However, it does not mean that the algorithm will converge rapidly to this solution, just that it won't diverge arbitrarily because of inaccuracy on the source data (backward error), provided that the forward error introduced by the algorithm does not diverge as well because of accumulating intermediate rounding errors.[clarification needed]
The condition number may also be infinite, but this implies that the problem is ill-posed (does not possess a unique, well-defined solution for each choice of data -- that is, the matrix is not invertible), and no algorithm can be expected to reliably find a solution.
The definition of the condition number depends on the choice of norm, as can be illustrated by two examples.
If is the norm (usually noted as
) defined in the square-summable sequence space ℓ2 (which matches the usual distance in a standard Euclidean space), then

where and
are maximal and minimal singular values of
respectively. Hence
- If
is normal then

where and
are maximal and minimal (by moduli) eigenvalues of
respectively.
- If
is unitary then
The condition number with respect to L2 arises so often in numerical linear algebra that it is given a name, the condition number of a matrix.
If is the norm (usually denoted by
) defined in the sequence space ℓ∞ of all bounded sequences (which matches the maximum of distances measured on projections into the base subspaces), and
is lower triangular non-singular (i.e.,
) then

The condition number computed with this norm is generally larger than the condition number computed with square-summable sequences, but it can be evaluated more easily (and this is often the only practicably computable condition number, when the problem to solve involves a non-linear algebra[clarification needed], for example when approximating irrational and transcendental functions or numbers with numerical methods).
If the condition number is not too much larger than one (but it can still be a multiple of one), the matrix is well conditioned which means its inverse can be computed with good accuracy. If the condition number is very large, then the matrix is said to be ill-conditioned. Practically, such a matrix is almost singular, and the computation of its inverse, or solution of a linear system of equations is prone to large numerical errors. A matrix that is not invertible has condition number equal to infinity.
>>补充知识:
矩阵 A 的条件数等于 A 的范数与 A 的逆的范数的乘积,即 cond(A)=‖A‖·‖A^(-1)‖,对应矩阵
的 3 种范数,相应地可以定义 3 种条件数。(矩阵的范数有哪几种?)
函数 cond(A,1)、cond(A)戒 cond(A inf) 是判断矩阵病态与否的一种度量,条件数越大矩阵越病态。条件数事实上表示了矩阵计算对于误差的敏感性。对于线性方程组 Ax=b,如果 A 的条件数大,b 的微小改变就能引起解 x 较大的改变,数值稳定性差。如果 A 的条件数小,b 有微小的改变,x 的改变也很微小,数值稳定性好。它也可以表示 b 不变,而 A 有微小改变时,x 的变化情况。比如线性方程组。

的解是(x,y)=(0.0,0.1),
而

的解是(x,y)=(-0.17,0.22),可见 b 很小的扰动就引起了 x 很大的变化,这就是 A 矩阵条件数大的表现。
一个极端的例子,当 A 奇异时,条件数为无穷,这时即使不改变 b,x 也可以改变。奇异的本质原因在于矩阵有 0 特征值,x 在对应特征向量的方向上运动不改变 Ax 的值。如果一个特征值比其它特征值在数量级上小很多,x 在对应特征向量方向上很大的移动才能产生 b 微小的变化,这就解释了为什么这个矩阵为什么会有大的条件数,事实上,正则阵在二范数下的条件数就可以表示成 abs(最大特征值/最小特征值)。
参考:https://en.wikipedia.org/wiki/Condition_number
https://www.cnblogs.com/hxsyl/p/5071434.html
https://blog.csdn.net/lanchunhui/article/details/51372831
什么是Condition Number(条件数)?的更多相关文章
- 条件数(condition number)
首先引入维基上的解释 In the field of numerical analysis, the condition number of a function with respect to an ...
- 【原创】开源Math.NET基础数学类库使用(17)C#计算矩阵条件数
本博客所有文章分类的总目录:[总目录]本博客博文总目录-实时更新 开源Math.NET基础数学类库使用总目录:[目录]开源Math.NET基础数学类库使用总目录 上个月 ...
- 开源Math.NET基础数学类库使用(17)C#计算矩阵条件数
原文:[原创]开源Math.NET基础数学类库使用(17)C#计算矩阵条件数 本博客所有文章分类的总目录:http://www.cnblogs.com/asxinyu/p ...
- Maths | 病态问题和条件数
目录 1. 概念定义 1.1. 病态/ 良态问题 1.2. 适定/ 非适定问题 1.3. 良态/ 病态矩阵和条件数 2. 病态的根源 3. 计算条件数的方法 3.1. 与特征值的关系 3.2. 与奇异 ...
- <<Numerical Analysis>>笔记
2ed, by Timothy Sauer DEFINITION 1.3A solution is correct within p decimal places if the error is l ...
- 最优化方法:范数和规则化regularization
http://blog.csdn.net/pipisorry/article/details/52108040 范数规则化 机器学习中出现的非常频繁的问题有:过拟合与规则化.先简单的来理解下常用的L0 ...
- <Numerical Analysis>(by Timothy Sauer) Notes
2ed, by Timothy Sauer DEFINITION 1.3A solution is correct within p decimal places if the error is l ...
- Eigen使用矩阵作为函数参数
1 使用矩阵作为函数参数介绍 文章来源Writing Functions Taking %Eigen Types as Parameters Eigen为了在函数中传递不同的类型使用了表达式模板技术. ...
- zzL1和L2正则化regularization
最优化方法:L1和L2正则化regularization http://blog.csdn.net/pipisorry/article/details/52108040 机器学习和深度学习常用的规则化 ...
随机推荐
- 深入浅出MFC学习笔记 消息
本章将会对MFC的消息映射和 命令传递机制做深入探讨. MFC规定了消息传递的路线,消息会按照这个路线传递下去,找不到归宿的话就交给DefWindowProc. 在产生窗口之前,如果我们在创建窗口时指 ...
- PL/Sql developer安装,设置
安装PL/Sql developer,和安装出现错误(oracle client not properly installed),pl/sql中文乱码 下载安装plsql_dev(文末有64位的百度云 ...
- 【转】 Pro Android学习笔记(九五):AsyncTask(4):执行情况
目录(?)[-] 两个AsyncTask对象的运行情况 多次执行的异常 文章转载只能用于非商业性质,且不能带有虚拟货币.积分.注册等附加条件.转载须注明出处:http://blog.csdn.net/ ...
- Docker - Upgrade from 1.12 to 1.13
引言 历经半年,docker的更新终于来了,看着新版本中各种诱人的新特性,我们也第一时间来尝试一下. 升级 之前一直使用的是1.12,所以这次尝试的是从原来的版本升级到新版本. 1. 更新 yum p ...
- C# 异常内存信息导出Dump文件
背景:很多情况下程序崩溃我们只能看到程序抛出来的异常信息,但是有时候异常信息不清不楚我们处理异常还是一头雾水,这种情况下我们就很希望能有种办法获取程序运行时的内存进行调试,查看其中的变量.参数.方法执 ...
- window下配置Solr6.5以及IK Analyzer分词配置
一.安装准备及各软件使用版本说明: 1.下载jdk,我下载的版本是jdk-8u121-windows-x64.exe,下载地址: http://www.oracle.com/technetwork/j ...
- IDA Pro 权威指南学习笔记(四) - IDA 用户界面的基本规则
基本规则: IDA 不提供撤销功能 如果由于不小心按下某个键,导致数据库文件发生意外,这时需要将显示窗口恢复到以前的状态 几乎所有的操作都有其对应的菜单项.热键和工具栏按钮 IDA 的工具栏高度可配置 ...
- 浅析bootstrap原理及优缺点
网格系统的实现原理,是通过定义容器大小,平分12份(也有平分成24份或32份,但12份是最常见的),再调整内外边距,最后结合媒体查询,就制作出了强大的响应式网格系统 网格系统的实现原理,是通过定义 ...
- Jsp页面中的中文乱码问题解决
Jsp页面中的中文乱码问题解决 在编写Jsp页面的时候,发现写入其中的中文在浏览器浏览的时候会出现乱码的情况. 出现乱码的原因分析: 因为页面中对自己的编码格式的声明和页面的实际编码格式不相同,而浏览 ...
- POJ1657
1.题目链接地址 http://poj.org/problem?id=1657 2.源代码 #include<iostream> using namespace std; int main ...