Skip to content

[action-translation] resync: kalman_2.md#119

Merged
mmcky merged 4 commits into
mainfrom
resync/kalman_2
Jul 19, 2026
Merged

[action-translation] resync: kalman_2.md#119
mmcky merged 4 commits into
mainfrom
resync/kalman_2

Conversation

@mmcky

@mmcky mmcky commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Forward Resync: kalman_2.md

Source: QuantEcon/lecture-python.mystlectures/kalman_2.md
Source commit: 7c6396a
This PR resyncs the translation to match the current source document.

Reason: The Chinese translation is based on an older/different version of this lecture and is missing large amounts of content present in the English source: the innovations representation math (Kalman gain formulas, K_t, L_t derivations), the state-space equations' updated notation (multivariate_normal, epsilon vs w), figures/captions using MyST figure directives, several code cells (e.g. G=[g,0] vs G=[g,1], different sigma parameterization as variances vs std devs), the T=100 vs T=50 experiments, random_state usage, and multiple explanatory paragraphs about learning speed, beta/alpha effects, observability conditions (g≠0, β≠0), and the final experiments comparing hard-working vs normal workers with different plots/captions. The target also has some content not aligned (e.g., different simulate_workers signature, some paragraphs paraphrased differently, missing detailed math like Sigma_t formulas). Overall substantial source content is missing/altered in translation, requiring re-translation to fully match updated source.

Changes

Whole-file resync applied. The entire document was resynced in a single pass.


Created by action-translation forward resync

Copilot AI review requested due to automatic review settings July 18, 2026 07:44
@mmcky mmcky added action-translation-sync CLI resync PR (translate forward --github) resync Forward resync labels Jul 18, 2026
@netlify

netlify Bot commented Jul 18, 2026

Copy link
Copy Markdown

Deploy Preview for astonishing-narwhal-a8fc64 ready!

Name Link
🔨 Latest commit c437362
🔍 Latest deploy log https://app.netlify.com/projects/astonishing-narwhal-a8fc64/deploys/6a5c1ff8ceda660008e9b0ae
😎 Deploy Preview https://deploy-preview-119--astonishing-narwhal-a8fc64.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR forward-resyncs the Chinese MyST/Jupytext lecture kalman_2.md to align with the latest upstream English source, including updated notation, additional derivations, figures/captions, and expanded computational experiments.

Changes:

  • Added translation metadata (title + heading mapping) and updated section anchor to (kalman_2)=.
  • Resynced/expanded the lecture content: revised state-space notation, innovations representation derivations, and multiple new/updated simulation experiments and figures.
  • Added translation sync state file recording the upstream source SHA and resync metadata.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
lectures/kalman_2.md Whole-lecture resync to match upstream content, including updated math, code cells, and MyST figure metadata.
.translate/state/kalman_2.md.yml Adds resync provenance metadata (source commit, date, model, tool version).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lectures/kalman_2.md Outdated
Comment on lines +75 to +76
mpl.rcParams['text.usetex'] = True
mpl.rcParams['text.latex.preamble'] = r'\usepackage{amsmath,amsfonts}'
@mmcky mmcky added the action-translation PRs created by QuantEcon/action-translation label Jul 18, 2026
@github-actions

github-actions Bot commented Jul 18, 2026

Copy link
Copy Markdown

@github-actions
github-actions Bot temporarily deployed to pull request July 18, 2026 10:32 Inactive
These {doc} targets exist only in lecture-python.myst until Phase 2
translates them; qualifying with the intermediate: intersphinx prefix
gives working links now, and a future resync restores local refs once
the targets exist. Program decision recorded 2026-07-18 (Matt).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 18, 2026

Copy link
Copy Markdown

✅ Translation Quality Review

Verdict: PASS | Model: claude-sonnet-5 | Date: 2026-07-19


📝 Translation Quality

Criterion Score
Accuracy 8/10
Fluency 9/10
Terminology 8/10
Formatting 7/10
Overall 8.1/10

Summary: This is a strong, accurate translation that faithfully conveys the technical content, equations, and narrative flow of the English source. The main concerns are non-textual additions (extra CJK font-rendering code, a duplicate import, and a possibly incorrect cross-reference prefix) introduced in the code cells and frontmatter, which should be verified against the intended build pipeline rather than being translation errors per se. Overall terminology and fluency are excellent. Mathematical notation and LaTeX equations are fully preserved and correctly rendered throughout the translation. Technical terminology (e.g., 状态空间表示, 创新表示, 卡尔曼增益矩阵, 工作伦理) is applied consistently and aligns well with domain conventions. Code comments are accurately and naturally translated, maintaining clarity for readers following the code cells. Sentence structure and academic register read fluently in Chinese, closely mirroring the logical flow of the English original.

Suggestions:

  • Reference to intermediate lecture: The translation adds a cross-reference prefix '{doc}intermediate:kalman_filter_var' where the English source has simply '{doc}kalman_filter_var' — verify this prefix is intentional/correct for the doc structure, otherwise revert to match source to avoid broken links.
  • Jupytext version mismatch: The English source specifies 'jupytext_version: 1.16.7' but the Chinese translation frontmatter shows 'jupytext_version: 1.16.1' — this metadata should match the source unless intentionally pinned to a different version for the translation build.
  • Added CJK LaTeX rendering code: The translation introduces extra font-loading and CJK-wrapping code (FONTPATH, cjk() function, mpl.rcParams CJK preamble) not present in the English source's import cell. While this is likely necessary for rendering Chinese text in matplotlib figures, it constitutes an addition beyond straightforward translation and should be flagged/confirmed as an intentional infrastructure choice rather than a translation artifact.
  • Redundant mpl import: 'import matplotlib as mpl' appears twice in the code cell (once before the numpy import block and once after) — this duplicate import, though harmless in Python, is an unnecessary artifact introduced during translation that could be cleaned up.

🔍 Diff Quality

Check Status
Scope Correct
Position Correct
Structure Preserved
Heading-map Correct
Overall 10/10

Summary: The resync correctly re-aligns the target document to the current source, with matching structure, section order, and an accurate translation heading map.


This review was generated automatically by action-translation review mode.

@github-actions
github-actions Bot temporarily deployed to pull request July 18, 2026 11:35 Inactive
mmcky and others added 2 commits July 19, 2026 10:25
The resync kept upstream's text.usetex=True config but dropped the
zh-specific LaTeX adaptation (CJKutf8 package + the cjk() wrapper that
renders Chinese under usetex), while retaining the 13 cjk() call sites
in the plotting cells. Every figure cell raised NameError: name 'cjk'
is not defined. Restored the setup block from the current translation
(same i18n-adaptation class as the dropped font blocks in #107). Also
adds the missing trailing newline (QuantEcon/action-translation#116).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The upstream rewrite introduced \mathbb{E}[...] notation in plot titles
and labels; the CJK-adapted preamble carried only CJKutf8+amsmath, so
under text.usetex=True the \mathbb control sequence was undefined and
fig.tight_layout() raised RuntimeError (latex failed). Upstream's own
preamble is amsmath,amsfonts; this restores amsfonts alongside the
zh-specific CJKutf8 adaptation.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions
github-actions Bot temporarily deployed to pull request July 19, 2026 01:17 Inactive
@mmcky
mmcky merged commit 3afb1d7 into main Jul 19, 2026
7 checks passed
@mmcky
mmcky deleted the resync/kalman_2 branch July 19, 2026 01:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action-translation PRs created by QuantEcon/action-translation action-translation-sync CLI resync PR (translate forward --github) resync Forward resync

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants