Skip to content

Commit 65b6347

Browse files
mmckyclaude
andauthored
[action-translation] resync: qr_decomp.md (#148)
* 🔄 resync qr_decomp.md * Restore trailing newline (engine issue tracked in QuantEcon/action-translation#116) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
1 parent 98a5254 commit 65b6347

2 files changed

Lines changed: 27 additions & 3 deletions

File tree

.translate/state/qr_decomp.md.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
source-sha: ffc4eaf681b12e70faaf3b9b935802b5a7efe41e
2+
synced-at: "2026-07-18"
3+
model: claude-sonnet-5
4+
mode: RESYNC
5+
section-count: 7
6+
tool-version: 0.17.0

lectures/qr_decomp.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,18 @@ kernelspec:
99
display_name: Python 3
1010
language: python
1111
name: python3
12+
translation:
13+
title: QR分解
14+
headings:
15+
Overview: 概述
16+
Matrix Factorization: 矩阵分解
17+
Gram-Schmidt process: 格拉姆-施密特正交化
18+
Gram-Schmidt process::Gram-Schmidt process for square $A$: 方阵$A$的格拉姆-施密特正交化
19+
Gram-Schmidt process::$A$ not square: $A$ 非方阵
20+
Some Code: 一些代码
21+
Example: 示例
22+
Using QR Decomposition to Compute Eigenvalues: 使用QR分解计算特征值
23+
$QR$ and PCA: $QR$ 分解与主成分分析(PCA)
1224
---
1325

1426
# QR分解
@@ -51,10 +63,10 @@ $$
5163

5264
如果方阵$A$是非奇异的,那么$QR$分解是唯一的。
5365

54-
实际上,我们的算法也适用于非方阵的矩形矩阵$A$。
55-
5666
我们稍后会处理矩形矩阵$A$。
5767

68+
实际上,我们的算法也适用于非方阵的矩形矩阵$A$。
69+
5870
### 方阵$A$的格拉姆-施密特正交化
5971

6072
这里我们对矩阵$A$的****运用格拉姆-施密特正交化。
@@ -232,6 +244,9 @@ def adjust_sign(Q, R):
232244

233245
```{code-cell} ipython3
234246
A = np.array([[1.0, 1.0, 0.0], [1.0, 0.0, 1.0], [0.0, 1.0, 1.0]])
247+
# A = np.array([[1.0, 0.5, 0.2], [0.5, 0.5, 1.0], [0.0, 1.0, 1.0]])
248+
# A = np.array([[1.0, 0.5, 0.2], [0.5, 0.5, 1.0]])
249+
235250
A
236251
```
237252

@@ -303,6 +318,10 @@ Q_scipy, R_scipy
303318

304319
6. 计算 $A$ 的特征值,并将其与从该过程得到的极限 $A_n$ 的对角线值进行比较。
305320

321+
```{todo}
322+
@mmcky 将此迁移为使用 [sphinx-proof](https://sphinx-proof.readthedocs.io/en/latest/syntax.html#algorithms)
323+
```
324+
306325
**注意:** 这个算法实际上非常接近计算特征值最高效的方法!
307326

308327
让我们编写一些Python代码来尝试这个算法
@@ -444,4 +463,3 @@ QPΛPQ = Q @ P_tilde @ Λ @ P_tilde.T @ Q.T
444463
```{code-cell} ipython3
445464
np.abs(QPΛPQ - XX).max()
446465
```
447-

0 commit comments

Comments
 (0)