本文为《Linear algebra and its applications》的读书笔记

目录

  • Least-Squares problems
  • Solution of the General Least-Squares Problem
    • ATAx=ATbA^TA\boldsymbol x=A^T\boldsymbol bATAx=ATb
    • 当 AAA 的列正交时,快速找到最小二乘解
    • 利用 QR 分解

Least-Squares problems

  • Inconsistent systems arise often in applications. When a solution is demanded and none exists, the best one can do is to find an x\boldsymbol xx that makes AxA\boldsymbol xAx as close as possible to b\boldsymbol bb. Think of AxA\boldsymbol xAx as an approximationapproximationapproximation to b\boldsymbol bb. The smaller the distance between b\boldsymbol bb and AxA\boldsymbol xAx, given by ∥b−Ax∥\left\|\boldsymbol b - A\boldsymbol x\right\|∥b−Ax∥, the better the approximation.

  • The general least-squares problem is to find an x\boldsymbol xx that makes ∥b−Ax∥\left\|\boldsymbol b - A\boldsymbol x\right\|∥b−Ax∥ as small as possible. ∥b−Ax∥\left\|\boldsymbol b - A\boldsymbol x\right\|∥b−Ax∥ is called the least-squares error of this approximation.

The adjective “least-squares” arises from the fact that ∥b−Ax∥\left\|\boldsymbol b - A\boldsymbol x\right\|∥b−Ax∥ is the square root of a sum of squares.


  • Notice that AxA\boldsymbol xAx will necessarily be in ColAColAColA. So we seek an x\boldsymbol xx that makes AxA\boldsymbol xAx the closest point in ColAColAColA to b\boldsymbol bb. See Figure 1.

Solution of the General Least-Squares Problem

ATAx=ATbA^TA\boldsymbol x=A^T\boldsymbol bATAx=ATb

  • Apply the Best Approximation Theorem in Section 6.3 to the subspace ColAColAColA. Let
    b^=projColAb\hat \boldsymbol b=proj_{ColA}\boldsymbol bb^=projColA​bBecause b^\hat\boldsymbol bb^ is in ColAColAColA, the equation Ax=b^A\boldsymbol x =\hat\boldsymbol bAx=b^ is consistent, and there is an x^\hat\boldsymbol xx^ in Rn\mathbb R^nRn such that
    Ax^=b^(1)A\hat\boldsymbol x =\hat\boldsymbol b\ \ \ \ \ \ \ \ \ \ (1)Ax^=b^          (1)Since b^\hat\boldsymbol bb^ is the closest point in ColAColAColA to b\boldsymbol bb, a vector x^\hat\boldsymbol xx^ is a least-squares solution of Ax=bA\boldsymbol x =\boldsymbol bAx=b if and only if x^\hat\boldsymbol xx^ satisfies (1). See Figure 2. [There are many solutions of (1) if the equation has free variables.]
  • Suppose x^\hat\boldsymbol xx^ satisfies Ax^=b^A\hat\boldsymbol x =\hat\boldsymbol bAx^=b^. By the Orthogonal Decomposition Theorem in Section 6.3, b−b^\boldsymbol b -\hat\boldsymbol bb−b^ is orthogonal to ColAColAColA, so b−Ax^\boldsymbol b - A\hat\boldsymbol xb−Ax^ is orthogonal to each column of AAA. If aj\boldsymbol a_jaj​ is any column of AAA, then aj⋅(b−Ax^)=0\boldsymbol a_j \cdot (\boldsymbol b- A\hat\boldsymbol x)=0aj​⋅(b−Ax^)=0, and ajT(b−Ax^)=0\boldsymbol a^T_j(\boldsymbol b - A\hat\boldsymbol x)= 0ajT​(b−Ax^)=0. Since each ajT\boldsymbol a^T_jajT​ is a row of ATA^TAT ,
    AT(b−Ax^)=0(2)A^T (\boldsymbol b - A\hat\boldsymbol x)=\boldsymbol 0\ \ \ \ \ \ \ (2)AT(b−Ax^)=0       (2)(This equation also follows from (ColA)⊥=NulAT(Col\ A)^\perp=Nul\ A^T(Col A)⊥=Nul AT.) Thus
    ATb−ATAx^=0ATAx^=ATb\begin{aligned}A^T \boldsymbol b - A^TA\hat\boldsymbol x&=\boldsymbol 0\\ A^TA\hat\boldsymbol x&=A^T \boldsymbol b\end{aligned}ATb−ATAx^ATAx^​=0=ATb​These calculations show that each least-squares solution of Ax=bA\boldsymbol x =\boldsymbol bAx=b satisfies the equation
    The equation represents a system of equations called the normal equations (法方程) for Ax=bA\boldsymbol x =\boldsymbol bAx=b. A solution of (3) is often denoted by x^\hat\boldsymbol xx^.


  • The next theorem gives useful criteria for determining when there is only one least-squares solution of Ax=bA\boldsymbol x =\boldsymbol bAx=b. (Of course, the orthogonal projection b^\hat\boldsymbol bb^ is always unique.)

Formula (4) for x^\hat \boldsymbol xx^ is useful mainly for theoretical purposes and for hand calculations when ATAA^TAATA is a 2×22\times 22×2 invertible matrix.

PROOF

  • If Ax=0A\boldsymbol x =\boldsymbol 0Ax=0, then ATAx=0A^TA\boldsymbol x =\boldsymbol 0ATAx=0 ∴NulA⊆NulATA\therefore NulA\subseteq NulA^TA∴NulA⊆NulATA.
  • If ATAx=0A^TA\boldsymbol x =\boldsymbol 0ATAx=0, then xTATAx=(Ax)TAx=0\boldsymbol x^TA^TA\boldsymbol x =(A\boldsymbol x)^TA\boldsymbol x=\boldsymbol 0xTATAx=(Ax)TAx=0 ∴Ax=0\therefore A\boldsymbol x=\boldsymbol 0∴Ax=0 ∴NulATA⊆NulA\therefore NulA^TA\subseteq NulA∴NulATA⊆NulA. ∴NulA=NulATA∴rankATA=n−dimNulATA=n−dimNulA=rankA\therefore NulA= NulA^TA\\\therefore rankA^TA=n-dimNulA^TA=n-dimNulA=rankA∴NulA=NulATA∴rankATA=n−dimNulATA=n−dimNulA=rankASo when AAA has nnn linearly independent columns, rankATA=rankA=nrankA^TA=rankA=nrankATA=rankA=n, which means ATAA^TAATA is an invertible matrix.

当 AAA 的列正交时,快速找到最小二乘解

  • The next example shows how to find a least-squares solution of Ax=bA\boldsymbol x =\boldsymbol bAx=b when the columns of AAA are orthogonal. Such matrices often appear in linear regression problems.

EXAMPLE 4

  • Find a least-squares solution of Ax=bA\boldsymbol x =\boldsymbol bAx=b for

SOLUTION

  • Because the columns a1\boldsymbol a_1a1​ and a2\boldsymbol a_2a2​ of AAA are orthogonal, the orthogonal projection of b\boldsymbol bb onto ColAColAColA is given by
    Now that b^\hat \boldsymbol bb^ is known, we can solve Ax^=b^A\hat\boldsymbol x=\hat\boldsymbol bAx^=b^. But this is trivial, since we already know what weights to place on the columns of AAA to produce b^\hat\boldsymbol bb^. It is clear from (5) that

  • In some cases, the normal equations for a least-squares problem can be illillill-conditioned(病态的)conditioned(病态的)conditioned(病态的); that is, small errors in the calculations of the entries of ATAA^TAATA can sometimes cause relatively large errors in the solution x^\hat \boldsymbol xx^.

利用 QR 分解

  • If the columns of AAA are linearly independent, the least-squares solution can often be computed more reliably through a QRQRQR factorization of AAA (described in Section 6.4).


Chapter 6 (Orthogonality and Least Squares): Least-Squares problems (最小二乘问题)相关推荐

  1. Chapter 6 (Orthogonality and Least Squares): Applications to linear models

    目录 Least-Squares Lines (最小二乘直线) The General Linear Model Least-Squares Fitting of Other Curves Multi ...

  2. Chapter 4, FAQ about Master Theorm, exercises and problems

    FAQ about the Master theorem Q1: Why in case 1, f(n) must be polynomially smaller than n^log(b,a)? R ...

  3. Coursera自动驾驶课程第13讲:Least Squares

    在上一讲<Coursera自动驾驶课程第12讲:Semantic Segmentation>我们学习了深度学习的另一个重要应用:语义分割.至此,本课程的视觉感知模块就介绍完了. 从本讲开始 ...

  4. 【Moving Least Squares】【移动最小二乘法】

    基于移动最小二乘的图像变形 一.背景意义 写这篇博文是应为目前为止我看到了好多领域里的经典paper算法都有涉及到移动最小二乘(MLS).可见这个算法非常重要,先来看一下它的相关经典应用: 1.图像变 ...

  5. perfect squares java,Perfect Squares

    题目来源 一道DP题,求一个数最少由几个平方数组成.我一开始用二维DP, 因为是个完全背包问题,所以需要注意每个数都是可以取多次的. 代码如下: class Solution { public: in ...

  6. 最小二乘估计(Least squares estimation)

    最小二乘估计(Least squares estimation) 最小二乘估计面向的问题 最小二乘估计(Least squares estimation) 加权最小二乘估计(Weighted leas ...

  7. Python Tutorial中英双语对照文档1

    本文根据官方文档 http://www.pythondoc.com/pythontutorial3/ 和 中文文档 http://www.pythondoc.com/pythontutorial3/ ...

  8. matlab中没有linearmodel,MATLAB线性代数简明教程(Linear Algebra Using MATLAB)

    MATLAB线性代数简明教程(Linear Algebra Using MATLAB) 编辑 锁定 讨论 上传视频 <MATLAB线性代数简明教程(Linear Algebra Using MA ...

  9. 005_Data Structures_数据结构

    Data Structures 数据结构 This chapter describes some things you've learned about already in more detail, ...

  10. INEQUALITY BOOKS

    来源:这里 Bất Đẳng Thức Luôn Có Một Sức Cuốn Hút Kinh Khủng, Một Số tài Liệu và Sách Bổ ích Cho Việc Học ...

最新文章

  1. RT-thread内核之进程间通信
  2. 输入3个数a,b,c,要求按由小到大的顺序输出
  3. python基础知识思维导图-总结 Python 知识点思维导图
  4. Volatile 关键字 内存可见性
  5. sql语句查询商品的一二三级分类都是一个字段怎么办_畅购商城(三):商品管理...
  6. Javascript 面向对象编程初探(一)--- 封装
  7. 【送书】联邦学习在视觉领域的应用,揭秘2020年AAAI人工智能创新应用奖获奖案例!...
  8. javaweb学习总结(三十六)——使用JDBC进行批处理
  9. 每日一小练——按字典顺序列出全部子集
  10. 双层玻璃窗的功效模型matlab,数学建模实例双层玻璃的功效
  11. Linux 容器 vs 虚拟机 —— 谁更胜一筹
  12. express不是内部或外部命令的解决方法
  13. dosbox运行C语言,DOSBox-DOS模拟器-DOSBox下载 v0.74官方版-完美下载
  14. unity资源商店出现“抱歉,此链接不再有效”怎么办
  15. 关于萨蒂亚·纳德拉安全演讲你所要知道的
  16. 小程序获取当前日期和时间
  17. Mac上显示实时网速小工具
  18. Spearman 相关性分析法,以及python的完整代码应用
  19. 手握千亿美金的孙正义,这次真的不能如愿了
  20. react-native-art path代码解析

热门文章

  1. c语言中的字符数组和字符串之间的关系
  2. 小爱同学app安卓版_小爱同学app下载安卓版|语音助手下载_最火软件站
  3. 设计模式之抽象工厂模式(Abstract Factory)
  4. 电商后台管理系统项目实例
  5. 通过资源监视器排查网络高占用异常
  6. 语音识别算法有哪些_语音识别特征提取方法
  7. vyos as a firewall
  8. WGS84地球坐标系,GCJ02火星坐标系,BD09百度坐标系简介与转换
  9. 全年营业额怎么计算_个人所得税能不能按全年总收入计算
  10. error pulling image configuration: read tcp xxx.xxx.x.xxx:xx->xxx.xx.xxx.xx:xxx: read: connection