back_prop, stats_examples, endogenous_lake, multi_hyper: four small fixes

Abierto
#1,111 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
72/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
python

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
TeX
Estrellas
129
Forks
59
Merge medio
2 d 10 h
PR fusionados (30 d)
11

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de QuantEcon/lecture-python.myst

Todos los issues de QuantEcon/lecture-python.myst

Issues similares

Más issues de Data Engineering

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.