Skip to content

mccall_q: match intermediate's copy, apart from the title's number - #83

Merged
mmcky merged 1 commit into
mainfrom
mccall-q-match-intermediate
Nov 23, 2026
Merged

mmcky merged 1 commit into
mainfrom
mccall-q-match-intermediate

Conversation

@mmcky

@mmcky mmcky commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

What

dp's mccall_q is a copy of intermediate's (lectures/mccall_q.md in QuantEcon/lecture-python.myst), and intermediate's copy has moved on since dp took it. This brings dp's file in line with intermediate's current one, so that the copy is mechanical again. After this pull request, dp's file differs from intermediate's in one line, the title:

intermediate dp, after this pull request
Title Job Search X: Search with Q-Learning Job Search IX: Search with Q-Learning

Intermediate's series has a lecture that dp's doesn't carry (mccall_risk, Job Search V), so in dp's book this is the ninth Job Search lecture, and it keeps that number.

What comes across from intermediate:

  • sentence-case section headings ("Review of McCall model", "Implied quality function $Q$", "From probabilities to samples", "Q-learning", "Employed worker can't quit", "Possible extensions");
  • typo corrections: "objection" to "option", "illegitmate" to "illegitimate", "previos" to "previous", "prematurally" to "prematurely", "algorthm" to "algorithm", "vis a vis" to "versus", "map" to "maps", "if and update" to "and update", and doubled spaces;
  • the Q-learning figure's legend, with the errors rounded to two decimals and placed below the plot;
  • progress prints that step by max(1, N // 10);
  • the value function for the new wage grid computed once rather than twice: the plotting cell no longer repeats the next cell's mcm.VFI().

The paragraph on whether letting a worker quit speeds up learning is unchanged here. QuantEcon/lecture-python.myst#1145 raises it with intermediate, and dp will follow whatever changes there.

Validation

Done on 2026-11-23, a full validation; the evidence is in the comment below. Fresh builds with no cache of this branch and of main, each rendered from its own cache, all green, in the same image. mccall_q differs from main only as intended: every printed output and figures 1 to 4 are identical, and figures 5 and 6 differ by their legend. The other differing pages are main's two new commits (#79, #80), output noise and the status page.

This changes lecture content, so it needs a person's review.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WT8bMacV9Lmy1VLUc6XJoL

dp's mccall_q is a copy of lectures/mccall_q.md in
QuantEcon/lecture-python.myst, which has moved on since dp took it.
This brings dp's file in line with intermediate's current one, so the
copy is mechanical again:

- sentence-case section headings;
- typo corrections ("objection" to "option", "illegitimate",
  "previous", "prematurely", "algorithm", "vis a vis" to "versus");
- the Q-learning figure's legend, with the errors rounded to two
  decimals and placed below the plot;
- progress prints that step by `max(1, N // 10)`;
- no repeated value function iteration before the epoch loop.

The one line that differs is the title. Intermediate's is
"Job Search X", because its series has a lecture dp doesn't carry
(mccall_risk, Job Search V). In dp's book this is the ninth Job Search
lecture, so it stays "Job Search IX".

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WT8bMacV9Lmy1VLUc6XJoL
Copilot AI adaptive review requested due to automatic review settings November 23, 2026 00:10

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.

🟡 Changes recommended

The lecture text contains an active factual inconsistency: its claim about quitting accelerating learning conflicts with the seeded experiment’s plotted results and remains unresolved.

1 open issue
What changed in this PR

Synchronizes lectures/mccall_q.md with the current intermediate lecture while preserving the DP-specific Job Search IX title.

Changes:

  • Corrects section headings, wording, spelling, grammar, and spacing.
  • Improves progress reporting and Q-learning plot legend formatting.
  • Removes a duplicated value-function iteration calculation.
File Description
lectures/​mccall_q.md Updates the lecture prose and executable examples to match the intermediate version while retaining DP-specific numbering.

Review effort: Lite (adaptive)

Comment thread lectures/mccall_q.md Resolved
@mmcky

mmcky commented Nov 23, 2026

Copy link
Copy Markdown
Contributor Author

Validation: a full validation

Fresh builds with no cache of this branch and of main, each executing every notebook in quantecon-build:latest (the same image on both sides, sha256:833e117fefbd), then rendered by ci.yml from its own side's cache. All four runs are green:

Build Execution (cache.yml) Render (ci.yml)
main 45085789015, at e9b47eb, 2026-11-22 23:54 UTC 45090411745, at 8c3d02a
this pull request 45087078177, at ab72a63, 2026-11-23 00:09 UTC 45090414536, at ab72a63

Main moved during the validation. Its render, at 8c3d02a, restored the cache of the execution above. The commits since this branch's base, bed2e34, are #80 (cross_product_trick's eq:Kalman102 reference) and #79 (discrete_dp's links); the only commit between e9b47eb and bed2e34 is #77, which changes only the bibliography.

The changed lecture. mccall_q differs from main only as this pull request intends: the headings, the typo corrections and the changed code lines. Every printed output is identical. Figures 1 to 4 are identical. Figures 5 and 6, the two epoch plots, are 860 × 529 pixels against main's 860 × 525, because their legend now sits below the plot with its errors rounded to two decimals.

Build logs. The two executions' logs have the same warning lines (15 distinct, the same counts), and the renders' logs match too.

The rest of the HTML. 34 of 57 pages differ in all. Besides mccall_q:

  • Main's two new commits: cross_product_trick (the repaired equation reference, Repair the eq:Kalman102 reference in cross_product_trick #80) and discrete_dp (its links, Point discrete_dp's optimal growth links at os_stochastic #79).
  • Output noise, as between any two builds: unseeded draws and timings, on 30 pages. 28 of them also differed in earlier comparisons of dp builds. The other two are os_egm and os_time_iter. Both draw with a fixed seed. os_egm's first printed error differs in its 16th significant figure (1.208333333333334 against 1.208333333333333), which is round-off. os_time_iter's figures 1 and 2 differ on 33 and 39 pixels, each by one shade level in 255, which is anti-aliasing.
  • The status page: build times.

Packages installed inside cells. Five pages run pip install in a cell (amss, calvo_machine_learn, chang_credible, chang_ramsey, odu), which the build log doesn't record. On each one, "Successfully installed" lists the same packages at the same versions on both sides.

@mmcky
mmcky merged commit bfb1d7b into main Nov 23, 2026
4 checks passed
@mmcky
mmcky deleted the mccall-q-match-intermediate branch November 23, 2026 00:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants