back_prop, stats_examples, endogenous_lake, multi_hyper: four small fixes

オープン
#1,111 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
72/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
python

調査の方向性

Read the four named lecture files at the cited sections: lectures/back_prop.md, lectures/stats_examples.md, lectures/endogenous_lake.md, and lectures/multi_hyper.md. Check the described training shuffle, Pascal formulas, job-finding comparison and message, and count loop length against the issue. Done when each listed correction is reflected and the install cell remains runnable.

索引モデルが issue の本文から書いたものです。

説明

Four small things found while these lectures were reviewed on their way into the shared lecture pool (QuantEcon/lectures#44). None is urgent. Line numbers are at 4d82fff.

  • lectures/back_prop.md, train (line 501): each epoch splits key, but line 504 draws the permutation from a fixed random.key(1), so the data come in the same order every epoch and the key argument has no effect. key, subkey = random.split(key) followed by random.permutation(subkey, indices) shuffles as intended.
  • lectures/stats_examples.md, the Pascal (negative binomial) section (lines 121–122): the mean and variance are written with $k$, the value of $X$, where the parameter $r$ belongs: they should read $\mathbb{E}(X) = r(1-p)/p$ and $\mathbb{V}(X) = r(1-p)/p^2$.
  • lectures/endogenous_lake.md, the job-finding rate (lines 338, 464 and 496): the text accepts an offer when $w \geq \bar w$ (lines 84 and 319), but the code counts w_vec > w_bar. Since w_bar is the first grid wage at which accepting is optimal (jnp.searchsorted(V - U, 0)), the strict inequality treats the reservation wage itself as rejected and understates $\lambda$ by $\gamma , p(\bar w)$; >= matches the text. The message printed at line 339 also reads "paramters".
  • lectures/multi_hyper.md, count (line 391): it takes its loop length from the global sample (size = sample.shape[0], line 392) rather than from its own arguments. It gives the right answer here, since it is only called with columns of sample, but Numba freezes global arrays when it compiles, so size = vec1.shape[0] is the safer form.

The same review asked for skip-execution on back_prop's install cell, but that cell is meant to run: the lecture uses kaleido and plotly afterwards.

When these land here, the pool picks them up through its nightly refresh.

主要言語
TeX
スター
129
フォーク
59
平均マージ
2日 10時間
マージ済み PR(30日)
11

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

QuantEcon/lecture-python.myst のほかの issue

QuantEcon/lecture-python.myst の issue をすべて見る

似ている issue

Data Engineering の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。