-
-
Notifications
You must be signed in to change notification settings - Fork 54
[mix_model]: Fix issues and improve the lecture #642
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
📖 Netlify Preview Ready! Preview URL: https://pr-642--sunny-cactus-210e3e.netlify.app (fb4ddb0) 📚 Changed Lecture Pages: mix_model |
|
📖 Netlify Preview Ready! Preview URL: https://pr-642--sunny-cactus-210e3e.netlify.app (7cba5eb) 📚 Changed Lecture Pages: mix_model |
|
hi @mmcky , I have made some changes and made sure I pushed everything to this branch. although I have checked it myself, it'll be nice to have it reviewed by you :-) if there are further issues with the lecture, please let me know! |
|
📖 Netlify Preview Ready! Preview URL: https://pr-642--sunny-cactus-210e3e.netlify.app (67c3a4b) 📚 Changed Lecture Pages: mix_model |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes formatting, style, and link issues in the mix_model lecture to align with style guidelines and improve readability. The changes primarily involve converting raw URLs to proper markdown links, fixing capitalization in headings, and correcting a few punctuation errors.
Key Changes
- Converted raw web links to proper markdown format with descriptive text
- Fixed capitalization in section headings to follow consistent style
- Made minor punctuation and text corrections
|
hi @mmcky, may I know if you have any thoughts on this? I would humbly request you to review this whenever you have the time :-) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many thanks @bishmaybarik! These are great changes!
Noted that if we use
{doc}`lecture_name`
It will give use a hyperlink with the lecture title. So we can reduce the usage of "this lecture" in the lectures.
There are also a few lines of code that's touching 80-character limit so please have a go at breaking them into two lines!
Please let me know what you think.
|
|
||
|
|
||
| Our second method uses a uniform distribution and the following fact that we also described and used in the quantecon lecture <https://python.quantecon.org/prob_matrix.html>: | ||
| Our second method uses a uniform distribution and the following fact that we also described and used in the [quantecon lecture on elementary probability with matrices](https://python.quantecon.org/prob_matrix.html): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Our second method uses a uniform distribution and the following fact that we also described and used in the [quantecon lecture on elementary probability with matrices](https://python.quantecon.org/prob_matrix.html): | |
| Our second method uses a uniform distribution and the following fact that we also described and used in {doc}`prob_matrix`: |
| The reason is that now the wage sequence is actually described by a different statistical model. | ||
| The reason is that now the wage sequence is actually described by a different statistical model. | ||
|
|
||
| Thus, we change the {doc}`quantecon lecture <likelihood_bayes>` specification in the following way. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Thus, we change the {doc}`quantecon lecture <likelihood_bayes>` specification in the following way. | |
| Thus, we change the specification in {doc}`likelihood_bayes` in the following way. |
| each period, though the agent doesn't know the mixing parameter. | ||
|
|
||
| Our first type of agent applies the learning algorithm described in {doc}`this quantecon lecture <likelihood_bayes>`. | ||
| Our first type of agent applies the learning algorithm described in {doc}`this quantecon lecture <likelihood_bayes>`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Our first type of agent applies the learning algorithm described in {doc}`this quantecon lecture <likelihood_bayes>`. | |
| Our first type of agent applies the learning algorithm described in {doc}`likelihood_bayes`. |
| Remember that our type 1 agent uses the wrong statistical model, thinking that nature mixed between $f$ and $g$ once and for all at time $-1$. | ||
|
|
||
| The type 1 agent thus uses the learning algorithm studied in {doc}`this quantecon lecture <likelihood_bayes>`. | ||
| The type 1 agent thus uses the learning algorithm studied in {doc}`this quantecon lecture <likelihood_bayes>`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| The type 1 agent thus uses the learning algorithm studied in {doc}`this quantecon lecture <likelihood_bayes>`. | |
| The type 1 agent thus uses the learning algorithm studied in {doc}`likelihood_bayes`. |
|
|
||
| We'll assume that the person starts out with a prior probability $\pi_0(\alpha)$ on | ||
| We'll assume that the agent starts out with a prior probability $\pi_0(\alpha)$ on | ||
| $\alpha \in (0,1)$ where the prior has one of the forms that we deployed in {doc}`this quantecon lecture <bayes_nonconj>`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| $\alpha \in (0,1)$ where the prior has one of the forms that we deployed in {doc}`this quantecon lecture <bayes_nonconj>`. | |
| $\alpha \in (0,1)$ where the prior has one of the forms that we deployed in {doc}`bayes_nonconj`. |
| We'll create graphs of the posterior $\pi_t(\alpha)$ as | ||
| $t \rightarrow +\infty$ corresponding to ones presented in the quantecon lecture <https://python.quantecon.org/bayes_nonconj.html>. | ||
| We'll create graphs of the posterior $\pi_t(\alpha)$ as | ||
| $t \rightarrow +\infty$ corresponding to ones presented in the [quantecon lecture on Bayesian nonconjugate priors](https://python.quantecon.org/bayes_nonconj.html). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| $t \rightarrow +\infty$ corresponding to ones presented in the [quantecon lecture on Bayesian nonconjugate priors](https://python.quantecon.org/bayes_nonconj.html). | |
| $t \rightarrow +\infty$ corresponding to ones presented in {doc}`bayes_nonconj`. |
|
|
||
| A compound lottery can be said to create a _mixture distribution_. | ||
|
|
||
| Our two ways of constructing a compound lottery will differ in their **timing**. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might be out of the scope of this PR but we should only use bold for definitions
| Our two ways of constructing a compound lottery will differ in their **timing**. | |
| Our two ways of constructing a compound lottery will differ in their *timing*. |
|
|
||
| $$ | ||
| \pi_t = E [ \textrm{nature chose distribution} f | w^t] , \quad t = 0, 1, 2, \ldots | ||
| \pi_t = E [ \textrm{nature chose distribution} f | w^t] , \quad t = 0, 1, 2, \ldots |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding a space between
| \pi_t = E [ \textrm{nature chose distribution} f | w^t] , \quad t = 0, 1, 2, \ldots | |
| \pi_t = E [ \textrm{nature chose distribution } f | w^t] , \quad t = 0, 1, 2, \ldots |
|
|
||
| See <https://numpy.org/doc/stable/reference/generated/numpy.searchsorted.html> for the | ||
| `searchsorted` function. | ||
| See the [numpy.searchsorted documentation](https://numpy.org/doc/stable/reference/generated/numpy.searchsorted.html) for details on the `searchsorted` function. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| See the [numpy.searchsorted documentation](https://numpy.org/doc/stable/reference/generated/numpy.searchsorted.html) for details on the `searchsorted` function. | |
| See the [`numpy.searchsorted` documentation](https://numpy.org/doc/stable/reference/generated/numpy.searchsorted.html) for details on the `searchsorted` function. |
This PR fixes the following issues:
The issue was the following:
link text,doclinks.