Skip to content

[back_prop, stats_examples, endogenous_lake, multi_hyper] Fix four small errors - #1124

Open
officialasishkumar wants to merge 1 commit into
QuantEcon:mainfrom
officialasishkumar:fix-1111-back-prop-stats-lake-hyper
Open

officialasishkumar wants to merge 1 commit into
QuantEcon:mainfrom
officialasishkumar:fix-1111-back-prop-stats-lake-hyper

Conversation

@officialasishkumar

Copy link
Copy Markdown

Fixes #1111

Four small fixes from the review in #1111:

  • back_prop: train split key each epoch but drew the permutation from a fixed random.key(1), so the data came in the same order every epoch. It now draws from the fresh subkey.
  • stats_examples: the negative binomial mean and variance now use the parameter r instead of k: $\mathbb{E}(X) = r(1-p)/p$, $\mathbb{V}(X) = r(1-p)/p^2$.
  • endogenous_lake: the text accepts an offer when $w \geq \bar w$, but the code counted w_vec > w_bar, understating the job finding rate by $\gamma,p(\bar w)$. Changed to >= in the three places listed in the issue, and fixed the "paramters" typo in the printed message.
  • multi_hyper: count now takes its loop length from vec1.shape[0] instead of the global sample, which Numba freezes at compile time.

I did not rebuild the lectures locally (no JAX/Numba environment on the machine I used); the changes are one-line edits matching the descriptions in the issue.

…all errors

- back_prop: train() split the key each epoch but drew the permutation
  from a fixed random.key(1), so every epoch saw the data in the same
  order. Draw it from the fresh subkey instead.
- stats_examples: the negative binomial mean and variance used k (the
  value of X) where the parameter r belongs.
- endogenous_lake: the text accepts offers with w >= w_bar, but the code
  counted w > w_bar, which treats the reservation wage itself as
  rejected and understates the job finding rate. Use >= in the job
  finding rate and the employed-value mask, and fix a typo in the
  printed message.
- multi_hyper: count() took its loop length from the global sample
  array, which Numba freezes at compile time. Use vec1.shape[0].

Fixes QuantEcon#1111

This branch has not been deployed

No deployments
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.

back_prop, stats_examples, endogenous_lake, multi_hyper: four small fixes

1 participant