Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .translate/state/qr_decomp.md.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
source-sha: ffc4eaf681b12e70faaf3b9b935802b5a7efe41e
synced-at: "2026-07-18"
source-sha: 6fcc2eb8a83a285ca8b0212412bb9930c492e446
synced-at: "2026-07-31"
model: claude-sonnet-5
mode: RESYNC
mode: UPDATE
section-count: 7
tool-version: 0.17.0
tool-version: 0.24.0
10 changes: 6 additions & 4 deletions lectures/qr_decomp.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,8 @@ a_m & = (a_m\cdot e_1) e_1 + (a_m\cdot e_2) e_2 + \cdots + (a_m \cdot e_n) e_n
```{code-cell} ipython3
import numpy as np
from scipy.linalg import qr

rng = np.random.default_rng()
```

```{code-cell} ipython3
Expand Down Expand Up @@ -355,7 +357,7 @@ def QR_eigvals(A, tol=1e-12, maxiter=1000):

```{code-cell} ipython3
# 用一个随机矩阵A做实验
A = np.random.random((3, 3))
A = rng.random((3, 3))
```

```{code-cell} ipython3
Expand Down Expand Up @@ -393,14 +395,14 @@ k = 5
n = 1000

# 生成一些随机矩
𝜇 = np.random.random(size=k)
C = np.random.random((k, k))
𝜇 = rng.random(size=k)
Comment on lines 397 to +398
C = rng.random((k, k))
Σ = C.T @ C
```

```{code-cell} ipython3
# X 是一个随机矩阵,其中每一列都遵循多元正态分布
X = np.random.multivariate_normal(𝜇, Σ, size=n)
X = rng.multivariate_normal(𝜇, Σ, size=n)
```

```{code-cell} ipython3
Expand Down
Loading