🌐 [translation-sync] [likelihood_bayes] Update lecture according to the style guide (recovery of #240) - #255
Conversation
✅ Deploy Preview for astonishing-narwhal-a8fc64 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull request overview
This PR reintroduces the translation-sync updates from #240, aligning the zh-cn lecture content and translation state files with the upstream style-guide changes for the likelihood/Bayes lectures.
Changes:
- Update
lectures/likelihood_bayes.mdformatting and MyST conventions (heading keys, references, math notation, figure metadata). - Apply small consistency/format tweaks in
lectures/likelihood_ratio_process.mdandlectures/likelihood_ratio_process_2.md. - Refresh
.translate/state/*.ymlmetadata to reflect the new source SHA, sync date, mode, and tool version.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| lectures/likelihood_ratio_process.md | Minor formatting/indent alignment in prose. |
| lectures/likelihood_ratio_process_2.md | Small prose cleanup; updates a code-cell helper signature and RNG usage. |
| lectures/likelihood_bayes.md | Main style-guide alignment: headings, refs, math notation, plotting metadata/formatting. |
| .translate/state/likelihood_ratio_process.md.yml | Update translation-sync state metadata (sha/date/tool-version). |
| .translate/state/likelihood_ratio_process_2.md.yml | Update translation-sync state metadata and mode. |
| .translate/state/likelihood_bayes.md.yml | Update translation-sync state metadata and mode. |
Suppressed comments (1)
lectures/likelihood_ratio_process_2.md:166
- 在
simulate中使用rng.beta(...)依赖调用者传入rng,但本讲座未展示rng的创建/传递,且其余随机数生成仍使用np.random。为保持一致性并避免读者按当前代码调用时失败,建议继续使用np.random.beta(...)(或在全讲座统一引入并传递 rng)。
for i in range(N):
for j in range(T):
w = rng.beta(a, b)
l_arr[i, j] = f(w) / g(w)
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| ```{code-cell} ipython3 | ||
| @jit | ||
| def simulate(a, b, T=50, N=500): | ||
| def simulate(a, b, rng, T=50, N=500): |
…in likelihood_ratio_process_2 and the branch's newer sync state (2026-08-18 v0.26.0 regeneration)
✅ Translation Quality ReviewVerdict: PASS | Model: claude-sonnet-5 | Date: 2026-08-19 📝 Translation Quality
Summary: This is a high-quality, technically rigorous translation of three closely related and lengthy lectures on likelihood ratio processes and Bayesian learning. Mathematical content, MyST formatting, and code blocks are faithfully preserved, and terminology is largely consistent with the provided glossary and standard Chinese econometrics/probability usage. Minor issues include a small terminology inconsistency ('本质' vs '自然' for 'Nature' in one Markov chain plot title), a divergence in the random-seeding code pattern in likelihood_bayes.md relative to the English source, and a slightly awkward sentence structure in the Bayesian updating section. No blocking or major issues were found, and no markdown/MyST syntax errors were detected. Mathematical notation, LaTeX equations, and equation labels are preserved accurately across all three files, including complex derivations of Bayes' law recursions and KL divergence formulas. Technical terminology such as '似然比过程', '贝叶斯定律', '后验概率', 'KL散度', '鞅收敛定理' is used consistently and matches standard Chinese academic usage. Code blocks, MyST directives ({doc}, {ref}, {eq}, {cite}), and cross-references are correctly preserved and functional throughout the long, complex documents. The translation of dense conceptual passages (e.g., martingale convergence discussion, likelihood ratio recursion derivations) maintains logical flow and mathematical rigor in fluent Chinese. Suggestions:
🔍 Diff Quality
Summary: The translation sync correctly updated all three files with matching content changes, preserved document structure and anchor renames, and appropriately updated translation heading-maps to reflect the revised English headings. Issues:
This review was generated automatically by action-translation review mode. |
d4bfe8c to
252c21c
Compare
|
♻️ Automatically rebased after #248 was merged. Overlapping files: The translation content is preserved; only unchanged sections were updated to match the current |
Reconciles the style-guide regeneration of likelihood_bayes with the RNG refactor that landed via #248: - code cells take main's Generator API and match the English source (rng threading, range not prange, single-line np.unique) - the Monte Carlo comment keeps its Chinese translation rather than reverting to the source's English - likelihood_bayes state takes main's source-sha 06c784f: it is a descendant of the branch's 07975d5, so it is the newest source commit now reflected in the content - likelihood_ratio_process_2 state keeps the branch's 07975d5, which is the descendant of main's acc5fa2 - likelihood_ratio_process_2 keeps main's CJK-spaced eq reference The branch's four review-flagged fixes are preserved: the three mystnb figure caption blocks, KL rather than Jensen-Shannon in the docstring, the {eq} cross-reference in place of a hardcoded number, and \ell notation in eq_recur1. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The rebase automation force-pushed this branch mid-reconcile and its resolution of the likelihood_bayes conflict partially reverted the RNG refactor that landed via #248. This merge keeps the hand resolution and adopts the automation's prose improvements. Kept from the hand resolution: - create_table is called with rng; the automation's call omitted the now-required positional argument and would raise TypeError at build - rng = np.random.default_rng(142857) rather than the old @jit set_seed - prange dropped from the numba import, matching the source - the Monte Carlo comment stays translated - CJK spacing before {doc} and {eq} roles Adopted from the automation: - the mixture caption reads 混合模型下的后验, closer to the source - a stray 在 dropped from the mixture-timing paragraph - full-width parentheses in likelihood_ratio_process_2 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Automated Translation Sync
This PR contains automated translations from QuantEcon/lecture-python.myst.
Source PR
#651 - [likelihood_bayes] Update lecture according to the style guide
Files Updated
lectures/likelihood_bayes.md.translate/state/likelihood_bayes.md.ymllectures/likelihood_ratio_process.md.translate/state/likelihood_ratio_process.md.ymllectures/likelihood_ratio_process_2.md.translate/state/likelihood_ratio_process_2.md.ymlDetails
This PR was created automatically by the translation action.
Recovery note: this PR recovers #240, auto-closed by the rebase force-push race on 2026-08-18 23:22:43Z (see the correction comment there). Same branch; body restored verbatim from #240 so review mode can locate the Source PR reference.