QuantEcon / QuantEcon/lecture-python.myst
[lake_model] Comments
Nobody has claimed this yet.
- Dominant language
- TeX
- Stars
- 123
- Forks
- 57
- Avg merge
- 3d 10h
- Merged PRs (30d)
- 11
Description
-
This part https://github.com/QuantEcon/lecture-python.myst/blame/main/lectures/lake_model.md#L260-L274 is not very wise (computing the stationary distribution of a 2-state (column-)stochastic matrix by iteration). As shown in the Finite Markov Chains chapter, and to be discussed in the current chapter, it can be simply computed exactly (up to floating points errors) by
def rate_steady_state(self): x = np.array([self.A_hat[0, 1], self.A_hat[1, 0]]) return x / x.sum() -
The discussion in "Aggregate Dynamics":
This part is hard to read. The same discussion as in "Finite Markov Chains" is given in a different language without any indication: From the discussion in "Finite Markov Chains", we know that- the (column-)stochastic matrix
A_hathas a stationary distribution (or equivalently, it has a nonnegative eigenvector with eigenvalue one); and A_hatbeing (irreducible and) aperiodic (or equivalently, the other eigenvalues are less than one in magnitude), from any initial distribution we have convergence to the (unique) stationary distribution.
In my view, this new language (with eigenvalues) is not necessary, and it would be enough to refer to the previous discussion in "Finite Markov Chains" (as to be done below).
- the (column-)stochastic matrix
-
There are a few places where the inner product of two vectors (1d-ndarrays)
aandbis computed bynp.sum(a * b)instead of
a @ bIs there any purpose for this?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in lectures/lake_model.md around lines 260-274 and review the linked Aggregate Dynamics, dynamics-of-an-individual-worker, ergodicity, and Finite Markov Chains sections. Check the stationary-distribution calculation, the eigenvalue discussion, and the np.sum(a * b) inner products; done means the comments are addressed consistently in the lecture.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- numpy, python
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100