Skip to content

🌐 [translation-sync] Caption the figures in prob_dist and observed_distributions - #281

Closed
mmcky wants to merge 0 commit into
mainfrom
translation-sync-2026-08-03T19-35-34-pr-816
Closed

mmcky wants to merge 0 commit into
mainfrom
translation-sync-2026-08-03T19-35-34-pr-816

Conversation

@mmcky

@mmcky mmcky commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Automated Translation Sync

This PR contains automated translations from QuantEcon/lecture-python-intro.

Source PR

#816 - Caption the figures in prob_dist and observed_distributions

Files Added

  • lectures/observed_distributions.md
  • .translate/state/observed_distributions.md.yml

Details

  • Source Language: en
  • Target Language: zh-cn
  • Model: claude-sonnet-5

This PR was created automatically by the translation action.

Copilot AI review requested due to automatic review settings August 3, 2026 19:35
@mmcky mmcky added action-translation PRs created by QuantEcon/action-translation automated Automated sync PR opened by action-translation labels Aug 3, 2026
@netlify

netlify Bot commented Aug 3, 2026

Copy link
Copy Markdown

Deploy Preview for playful-platypus-17d3bb ready!

Name Link
🔨 Latest commit a6ce8c6
🔍 Latest deploy log https://app.netlify.com/projects/playful-platypus-17d3bb/deploys/6a7956446978100008d719f5
😎 Deploy Preview https://deploy-preview-281--playful-platypus-17d3bb.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.

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

✅ Translation Quality Review

Verdict: PASS | Model: claude-sonnet-5 | Date: 2026-08-03
Routing: editor — 1 minor finding(s) in gating categories (accuracy/terminology/syntax/diff-check/other)


📝 Translation Quality

Criterion Score
Accuracy 9/10
Fluency 9/10
Terminology 9/10
Formatting 10/10
Overall 9.2/10

Summary: 翻译整体质量很高,准确传达了原文关于观测分布可视化与描述统计的技术内容,术语使用规范,格式保留完整。仅存在个别措辞可进一步打磨之处(如'箱须图'的引入可能造成与'箱线图'的术语不一致,以及个别口语化表达),但不影响理解和整体质量。 统计术语(样本矩、样本分位数、核密度估计、经验累积分布函数等)翻译准确且与术语表高度一致 长句拆分处理得当,保持了学术文本的严谨性和可读性 数学公式、代码块和MyST指令格式完整保留,无语法错误

Suggestions:

  • [minor · fluency] lectures/observed_distributions.md — ### Box-and-whisker plots: 'A box-and-whisker plot (or box plot)' 被译为 '箱线图(或称箱须图)',其中'箱须图'不是常见对应译名,可能造成术语混乱,因为后文继续使用'箱线图'。 → 可统一译为 '箱线图(或称箱形图)' 以避免引入不常见的'箱须图'一词
  • [minor · terminology] lectures/observed_distributions.md — ## Connection to probability distributions: 'we might look at the returns from Amazon above and imagine' 被译为 '我们可能会看着上面亚马逊的回报率,并想象','看着'略显口语化,与原文平实的学术语气略有差异。 → 改为 '我们可能会查看上面亚马逊的回报率数据,并设想'
  • [nit · fluency] lectures/observed_distributions.md — ### The role of independence: '它依赖于样本的一个容易被忽视的性质,因为 rvs 在默默地提供这个性质' 中 '默默地' 略显拟人化,虽然可以接受,但可考虑更简洁的表达。 → 改为 '它依赖于样本的一个容易被忽视的性质,而 rvs 会不动声色地提供这一性质'(此项为风格建议,非必须修改)

🔍 Diff Quality

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

Summary: The translation correctly adds the myst figure directives with English captions/names at the same code-cell positions as the source, and the frontmatter heading map matches the document's translated headings.


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

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 adds a new Chinese MyST/Jupytext lecture on observed (empirical) distributions, including a set of captioned figures, and records its translation-sync state for future automated updates.

Changes:

  • Added lectures/observed_distributions.md (new lecture content + figure caption metadata).
  • Added .translate/state/observed_distributions.md.yml to track translation sync provenance.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
lectures/observed_distributions.md New lecture (observed distributions) with many code-generated figures and captions.
.translate/state/observed_distributions.md.yml Translation-sync state metadata for the new lecture file.
Suppressed comments (2)

lectures/observed_distributions.md:671

  • 小提琴图的 x 轴被标注为“KDE”,但该图展示的是 violin plot(并非 KDE 曲线),该标签会误导读者。建议移除该 x 轴标签或改为更贴切的含义。
ax.violinplot(x_amazon)
ax.set_ylabel('monthly return (percent change)')
ax.set_xlabel('KDE')

lectures/observed_distributions.md:695

  • 此处将 x_amazon / x_costco 当作带股票代码列的对象来索引(['AMZN'] / ['COST']),但上文它们被当作一维样本使用(例如 x_amazon.mean()、scipy.stats.norm(μ, σ) 等都假定 μ、σ 为标量)。为避免类型不一致/潜在 KeyError,建议直接传入这两个样本序列。
ax.violinplot([x_amazon['AMZN'], x_costco['COST']])

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

name: fig:amazon-hist
---
fig, ax = plt.subplots()
ax.hist(x_amazon, bins=20)
Comment thread lectures/observed_distributions.md Outdated
Comment on lines +308 to +316
mystnb:
figure:
caption: Histogram of the income data
name: fig:income-hist
---
fig, ax = plt.subplots()
ax.hist(x, bins=5, density=True, histtype='bar')
ax.set_xlabel('income')
ax.set_ylabel('density')
Comment on lines +50 to +57
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
import yfinance as yf
import scipy.stats
import seaborn as sns

np.set_printoptions(legacy='1.25') # print scalars as plain numbers
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

@github-actions
github-actions Bot temporarily deployed to pull request August 3, 2026 19:41 Inactive
@mmcky mmcky closed this Aug 10, 2026
@mmcky
mmcky force-pushed the translation-sync-2026-08-03T19-35-34-pr-816 branch from 737c8d1 to a6ce8c6 Compare August 10, 2026 04:40
@mmcky

mmcky commented Aug 10, 2026

Copy link
Copy Markdown
Contributor Author

♻️ Automatically rebased after #278 was merged.

Overlapping files: lectures/observed_distributions.md, lectures/prob_dist.md

The translation content is preserved; only unchanged sections were updated to match the current main branch. Please re-review if needed.

@mmcky

mmcky commented Aug 10, 2026

Copy link
Copy Markdown
Contributor Author

Closing as superseded by #283.

All three of #278, #281 and #283 add lectures/observed_distributions.md as a new file, each translated from a different upstream vintage of the same lecture. The content is cumulative rather than conflicting:

PR Upstream Lines Figure captions Sequence links
#278 QuantEcon/lecture-python-intro#811 785
#281 QuantEcon/lecture-python-intro#816 899 19
#283 QuantEcon/lecture-python-intro#819 903 19

#278 has now merged, so the lecture exists on main at the #811 vintage. Everything this PR would add — the 19 mystnb figure captions from #816 — is also present in #283, which sits one upstream PR later and additionally carries the #819 cross-lecture links. Its state file records source-sha: a453cf53, downstream of this PR's c8587eda, so nothing is lost by taking #283 instead.

Merging both would mean resolving the same new-file conflict twice for a strictly older result.

The captions land via #283, which is queued after #279 (fitting_distributions needs to exist first — #283's observed_distributions.md references it twice, and its mle.md change references it once).

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 automated Automated sync PR opened by action-translation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants