lake_model_intro, time_series_with_matrices, long_run_growth: four small fixes

Offen Anfängerfreundlich
#862 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

@nishantmishraa arbeitet bereits daran.

Seit 06.11.2026.

  • #863 von @nishantmishraa — offen

Bewertung

Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Anfängerfreundlichkeit
78/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
jupyter-notebook, matplotlib, numpy, python

Rechercherichtung

Lies die drei genannten Vorlesungsdateien an den referenzierten Zellen und Zeilen: lake_model_intro.md, time_series_with_matrices.md und long_run_growth.md. Überprüfe den angegebenen Parameter, die Plot-Schleife, die Konstruktion der Stichprobe und die Farbzuordnung der Länder und nimm dann die aufgeführten Korrekturen vor. Fertig ist die Arbeit, wenn T die simulierten Pfade beeinflusst, der Plot-Mittelwert und die Farben wie beschrieben berechnet werden, die tote Schutzbedingung behandelt ist und die Notation e_0 lautet; die bestätigte Gleichung r(A) soll unverändert bleiben.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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

  • lectures/lake_model_intro.md, line 96: $(u_0, e_o)$ should read $(u_0, e_0)$.
  • lectures/lake_model_intro.md, plot_time_paths (line 291): the T parameter is never used, because the loop calls lm.simulate_path(x0=x) without it (line 338), so plot_time_paths(lm, T=...) changes nothing. The closing if ax is None: plt.show() (lines 359–360) never runs either, because ax was already replaced by new axes when it was None (lines 314–315). The figure still appears in a notebook, so only the guard is dead.
  • lectures/time_series_with_matrices.md, the # Plot mean cell (line 467): each pass of for i in range(N) draws a fresh sample of N paths with series_process.sample_y(N, rng=rng) (line 472) and plots only its i-th row, so plotting 100 paths simulates 10,000, and μ_y is replotted on every pass. Drawing one sample before the loop and plotting the mean once gives the same picture. Separately, sample_y (line 437) could build ys as (b + us) @ A_inv.T rather than stacking one product per row.
  • lectures/long_run_growth.md, the color_mapping cell (line 144): country_names = data['countrycode'] holds one entry per row of the data, not per country, so cm.tab20(np.linspace(0, 0.95, len(country_names))) (line 147) spaces the colours over every row, and the dictionary keeps the colour of each code's last row. The colours then depend on how many rows each country has. data['countrycode'].unique() gives one evenly spaced colour per country.

The same review also questioned r(A) = 1 + g at lake_model_intro.md line 272, but that is exact as written: every column of A sums to 1 + g.

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

Vorherrschende Sprache
Jupyter Notebook
Sterne
67
Forks
33
Ø Merge
6 Std. 22 Min.
Gemergte PRs (30 T.)
3

Entwicklungsumgebung

Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus QuantEcon/lecture-python-intro

Alle Issues in QuantEcon/lecture-python-intro

Ähnliche Issues

Weitere Issues zu Data Visualization

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.