🌐 [translation-sync] New lecture: Fitting Distributions to Data - #279
Conversation
✅ Deploy Preview for playful-platypus-17d3bb ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Translation Quality ReviewVerdict: PASS | Model: claude-sonnet-5 | Date: 2026-08-10 📝 Translation Quality
Summary: 译文整体质量很高,准确传达了原文的统计学和概率论概念,术语使用规范一致,格式和代码块保留完整,未发现语法错误。仅有少量措辞可进一步优化,但均为风格性建议,不影响理解或专业准确性。 术语翻译准确一致,如'矩方法'、'科尔莫戈罗夫-斯米尔诺夫统计量'、'Q-Q 图'等均符合术语表规范 数学公式、代码块与 MyST 指令格式完整保留,未出现语法错误 长句拆分处理得当,专业内容(如矩方法推导、Q-Q 图原理、学生 t 分布拟合等)表达清晰准确 中英文之间、行内指令之间均正确使用了全角标点与空格,符合语言规范要求 Suggestions:
🔍 Diff Quality
Summary: Scope, position, and structure are correctly preserved, but the heading-map keys do not follow the expected slugified-ID convention. Issues:
This review was generated automatically by action-translation review mode. |
There was a problem hiding this comment.
Pull request overview
This PR syncs in a newly translated zh-cn lecture on fitting probability distributions to data, and wires it into the book structure via the TOC and translation state tracking.
Changes:
- Added new lecture:
lectures/fitting_distributions.md - Updated the book TOC to include the new lecture (and other chapter entries)
- Added translation sync state metadata for the new lecture
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
lectures/fitting_distributions.md |
New translated lecture content + code/figures for distribution fitting (currently contains unresolved cross-doc references and several non-localized figure labels/captions). |
lectures/_toc.yml |
Updates navigation; currently adds several non-existent chapters and switches multiple captions to English, which is inconsistent with zh-cn and may break the build. |
.translate/state/fitting_distributions.md.yml |
Records translation sync metadata for the new lecture. |
Suppressed comments (15)
lectures/fitting_distributions.md:165
- 该图的 figure caption 仍为英文(本仓库中文讲义的图题通常使用中文),建议翻译以保持本地化一致性。
caption: Three fitted densities for house prices
lectures/fitting_distributions.md:170
- 图例标签目前是英文分布名(normal/lognormal/gamma)。中文讲义中图例通常也做本地化(例如 prob_dist.md 使用“男性/女性”等),建议将这些 label 翻译为中文以提升可读性。
fits = {'normal': fit_normal(price),
'lognormal': fit_lognormal(price),
'gamma': fit_gamma(price)}
lectures/fitting_distributions.md:179
- 坐标轴标签仍为英文(sale price / density)。考虑到该仓库为 zh-cn 译本且其它讲义普遍使用中文轴标签,建议翻译为中文以保持一致。
ax.set_xlabel('sale price (US$)')
ax.set_ylabel('density')
lectures/fitting_distributions.md:242
- Q-Q 图函数的坐标轴标签仍为英文(fitted/sample quantiles)。为了与中文讲义整体风格一致,建议将标签翻译为中文。
ax.set_xlabel('fitted quantiles')
ax.set_ylabel('sample quantiles')
lectures/fitting_distributions.md:253
- 该图的 figure caption 仍为英文,建议翻译为中文以保持本地化一致性。
caption: Female heights against a fitted normal
lectures/fitting_distributions.md:274
- 该图的 figure caption 仍为英文,建议翻译为中文以保持本地化一致性。
caption: House prices against a fitted normal
lectures/fitting_distributions.md:297
- 该图的 figure caption 仍为英文,建议翻译为中文以保持本地化一致性。
caption: Log house prices against a normal
lectures/fitting_distributions.md:348
- 该图的 figure caption 仍为英文,建议翻译为中文以保持本地化一致性。
caption: Largest gap between ECDF and CDF
lectures/fitting_distributions.md:364
- 该图中的图例标签仍为英文(fitted normal CDF / largest gap)。为中文译本读者,建议翻译这些标签;必要时可保留缩写 ECDF。
ax.step(x_sorted, np.arange(1, n+1) / n, where='post', lw=2, label='ECDF')
x_grid = np.linspace(x_sorted[0], x_sorted[-1], 200)
ax.plot(x_grid, u.cdf(x_grid), 'k--', lw=2, alpha=0.7, label='fitted normal CDF')
ax.vlines(x_sorted[i], F[i], (i+1) / n, color='C3', lw=3, label='largest gap')
lectures/fitting_distributions.md:366
- 该图坐标轴标签仍为英文(log of sale price / probability),建议翻译为中文以保持与其它讲义一致。
ax.set_xlabel('log of sale price')
ax.set_ylabel('probability')
lectures/_toc.yml:41
- _toc.yml 新增了 observed_distributions 章节,但仓库中不存在对应文件(lectures/observed_distributions.md)。这会导致构建失败;同时 fitting_distributions.md 也多处引用该页面。建议本 PR 同步补齐该讲义文件,或先移除该条目并统一修正引用。
- file: observed_distributions
lectures/_toc.yml:52
- _toc.yml 新增了 msy_fishery 章节,但仓库中不存在对应文件(lectures/msy_fishery.md)。这会导致 Jupyter Book 构建失败。建议在同步加入该讲义文件前先移除该条目,或在本 PR 一并补充文件。
- file: msy_fishery
lectures/_toc.yml:92
- _toc.yml 新增了 bayes_intro 章节,但仓库中不存在对应文件(lectures/bayes_intro.md)。这会导致 Jupyter Book 构建失败。建议在同步加入该讲义文件前先移除该条目,或在本 PR 一并补充文件。
- file: bayes_intro
lectures/fitting_distributions.md:423
- 该图坐标轴标签仍为英文(sale price / probability)。为保持中文译本一致性,建议翻译为中文。
ax.set_xlabel('sale price (US$)')
ax.set_ylabel('probability')
lectures/fitting_distributions.md:508
- 该图的图例与坐标轴标签仍为英文(observed frequency / fitted Poisson / goals per match / probability)。建议翻译为中文以保持讲义本地化一致。
ax.bar(counts.index, frequencies, alpha=0.4, label='observed frequency')
ax.plot(S, u.pmf(S), linestyle='', marker='o', color='C1', label='fitted Poisson')
ax.vlines(S, 0, u.pmf(S), lw=0.5, color='C1')
ax.set_xlabel('goals per match')
ax.set_ylabel('probability')
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| 在 {doc}`prob_dist` 中,我们研究了一系列常见的概率分布。 | ||
|
|
||
| 在 {doc}`observed_distributions` 中,我们研究了观测数据。 |
| - caption: Introduction | ||
| numbered: true | ||
| chapters: | ||
| - file: about | ||
| - caption: 经济数据 | ||
| - caption: Economic Data |
|
This PR's Restore the Chinese captions on this branch before merging. Note also that #279 sits behind #278 in the dependency chain — its build fails with 8× |
d215b93 to
a6ce8c6
Compare
|
♻️ Automatically rebased after #278 was merged. Overlapping files: The translation content is preserved; only unchanged sections were updated to match the current |
The sync for QuantEcon/lecture-python-intro#814 overwrote lectures/_toc.yml with upstream's English version, reverting every part caption to English and adding entries for tax_smooth, msy_fishery and bayes_intro, none of which are translated here. Restored the translated toc and added just the one new entry, in the same position upstream uses. The translation itself matches its source: same two anchors, 11 headings and 31 code cells as upstream at dc63dac. The (qq_plots)= anchor belongs to QuantEcon/lecture-python-intro#815 and is handled in #280. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
a62600a to
9f30af5
Compare
Automated Translation Sync
This PR contains automated translations from QuantEcon/lecture-python-intro.
Source PR
#814 - New lecture: Fitting Distributions to Data
Files Added
lectures/fitting_distributions.md.translate/state/fitting_distributions.md.ymlFiles Updated
lectures/_toc.ymlDetails
This PR was created automatically by the translation action.