lake_model_intro, time_series_with_matrices, long_run_growth: four small fixes

オープン 初心者向け
#862 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

評価

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

調査の方向性

参照先のセルと行にある、指定された3つの講義ファイルを読んでください。lake_model_intro.md、time_series_with_matrices.md、long_run_growth.mdです。指定されたパラメーター、プロットのループ、サンプルの構築、国ごとの色の割り当てを確認し、列挙された修正を行ってください。Tがシミュレーションされた経路に影響し、プロットの平均と色が説明どおりに計算され、使われていないガードが処理され、表記がe_0になったら完了です。確認済みの方程式r(A)は変更しないでください。

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

説明

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.

主要言語
Jupyter Notebook
スター
67
フォーク
33
平均マージ
6時間 22分
マージ済み PR(30日)
3

環境構築

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

はじめの一歩

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

QuantEcon/lecture-python-intro のほかの issue

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

似ている issue

Data Visualization の issue をもっと見る

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

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