Skip to content
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

Update made to Markov Chains: Basic Concepts lecture #479

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

Jiarui-ZH
Copy link
Contributor

@Jiarui-ZH Jiarui-ZH commented Jun 27, 2024

Update to Markov Chains: Basic Concepts lecture (#453 )

Content

  • In “A stochastic matrix (or Markov matrix) is an 𝑛×𝑛 square matrix 𝑃 such that each row of 𝑃 is a probability mass function over 𝑛 outcomes.” delete “over 𝑛 outcomes”.
  • Change titles “32.2.2.1. Example 1” and “32.2.2.2. Example 2” into titles that are intuitive of the respective examples. )
  • For Example 3 (the example for democracy (D), autocracy (A), and an intermediate state called anocracy (N)), implement the following order: table; figure; matrix.
  • Change date to time in section of “32.2.3. Defining Markov chains”
  • Add “(probability mass function)” such that “𝑃(𝑥,⋅) is the conditional distribution (probability mass function) of 𝑋𝑡+1 given.”
  • In “It can be shown that for a long series drawn from P, the fraction of the sample that takes value 0 will be about 0.25.”, change to “It can be proven that for a long series drawn from P, the fraction of the sample that takes value 0 will be about 0.25.”
  • In the section “32.4. Distributions over time”, have subsections dividing into two parts: “One unit of time” and “m steps in the future”
  • In 32.4.1, move the function above (after “m-th power of 𝑃”). After the function, add text “For one way to see it, consider again (32.6), but now with a 𝜓𝑡 that puts all probability on state 𝑥.
  • Then 𝜓𝑡 is a vector with 1 in position 𝑥 and zero elsewhere.
  • Inserting this into (32.6), we see that, conditional on 𝑋𝑡=𝑥, the distribution of 𝑋𝑡+𝑚 is the 𝑥-th row of 𝑃𝑚.”
  • In 32.4.2, instead of the link “considered above”, include the section number (32.4.1) with a link.
  • Search for “considered above” and replace it with section number and make sure the hyperlink works. (In pdf version, the “considered above” link does not work.)
  • In 32.4.3, in (2), put a note to better explain “cross-sectional frequencies”.

Copy link

netlify bot commented Jun 27, 2024

Deploy Preview for taupe-gaufre-c4e660 ready!

Name Link
🔨 Latest commit 7420047
🔍 Latest deploy log https://app.netlify.com/sites/taupe-gaufre-c4e660/deploys/670890f0b0411100087cff8e
😎 Deploy Preview https://deploy-preview-479--taupe-gaufre-c4e660.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

github-actions bot commented Jun 27, 2024

@github-actions github-actions bot temporarily deployed to pull request June 27, 2024 05:58 Inactive
@github-actions github-actions bot temporarily deployed to pull request June 27, 2024 06:00 Inactive
Copy link
Contributor

@mmcky mmcky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Jiarui-ZH just some minor comments below

lectures/markov_chains_I.md Outdated Show resolved Hide resolved
lectures/markov_chains_I.md Show resolved Hide resolved
lectures/markov_chains_I.md Show resolved Hide resolved
lectures/markov_chains_I.md Outdated Show resolved Hide resolved
lectures/markov_chains_I.md Outdated Show resolved Hide resolved
@Jiarui-ZH
Copy link
Contributor Author

@mmcky, Thank you for the review, please let me know if there is any thing else I need to change!

@mmcky
Copy link
Contributor

mmcky commented Jun 30, 2024

thanks @Jiarui-ZH there are some undefined labels that need to be fixed. Once this is building I will do a full review.

  • /home/runner/work/lecture-python-intro/lecture-python-intro/lectures/markov_chains_I.md: WARNING: label 'mc_eg2' not found.
  • /home/runner/work/lecture-python-intro/lecture-python-intro/lectures/markov_chains_I.md:627: WARNING: prf:ref reference target not found: mc_eg2
  • /home/runner/work/lecture-python-intro/lecture-python-intro/lectures/markov_chains_I.md: WARNING: label 'mc_eg1' not found.
  • /home/runner/work/lecture-python-intro/lecture-python-intro/lectures/markov_chains_I.md:649: WARNING: prf:ref reference target not found: mc_eg1
  • /home/runner/work/lecture-python-intro/lecture-python-intro/lectures/markov_chains_I.md: WARNING: label 'mc_eg1' not found.
  • /home/runner/work/lecture-python-intro/lecture-python-intro/lectures/markov_chains_I.md:743: WARNING: prf:ref reference target not found: mc_eg1
  • /home/runner/work/lecture-python-intro/lecture-python-intro/lectures/markov_chains_I.md: WARNING: label 'mc_eg2' not found.
  • /home/runner/work/lecture-python-intro/lecture-python-intro/lectures/markov_chains_I.md:857: WARNING: prf:ref reference target not found: mc_eg2

@Jiarui-ZH
Copy link
Contributor Author

Hi @mmcky , sorry for the trouble but can you give me a short rundown on the how prf:ref is used? I am still unclear with the referring of markdown

@mmcky
Copy link
Contributor

mmcky commented Jul 2, 2024

Hi @mmcky , sorry for the trouble but can you give me a short rundown on the how prf:ref is used? I am still unclear with the referring of markdown

Hi @Jiarui-ZH here are the docs re: syntax

https://sphinx-proof.readthedocs.io/en/latest/syntax.html

you essentially use the label that is assigned to the directive item as a reference such as:

{prf:ref}`my-theorem`

@Jiarui-ZH
Copy link
Contributor Author

Everything except for simplifying figures is mentioned in #453 is resolved

@github-actions github-actions bot temporarily deployed to pull request July 4, 2024 06:19 Inactive
@github-actions github-actions bot temporarily deployed to pull request July 4, 2024 06:20 Inactive
Copy link
Contributor

@mmcky mmcky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jstac this is ready for your review.

@@ -172,7 +172,7 @@ In particular, $P(i,j)$ is the


(mc_eg1)=
#### Example 2
#### Example 2: Unemployment
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @Jiarui-ZH for opening #502. We can deal with that separately.

@mmcky mmcky added the ready label Jul 5, 2024
@Jiarui-ZH Jiarui-ZH added in-work and removed ready labels Jul 15, 2024
@Jiarui-ZH
Copy link
Contributor Author

@mmcky I have tried to use the sphinix-proof for exampeles however the following warning pops up. I am not sure why this is happening it would be great if you can review this.
image

@mmcky
Copy link
Contributor

mmcky commented Jul 15, 2024

Thanks for reaching out @Jiarui-ZH.

The main issues were:

  1. The example directives were missing a closing gate using backticks.
  2. When you have nested directives it is best practice to use different levels of backticks. So the main example directive would use 4 ticks while the nested directives use 3 ticks.

See 088d92b for fixes.

@github-actions github-actions bot temporarily deployed to pull request July 15, 2024 22:46 Inactive
@github-actions github-actions bot temporarily deployed to pull request July 15, 2024 22:46 Inactive
@Jiarui-ZH
Copy link
Contributor Author

ahh I see, thank you for the fixes

@mmcky
Copy link
Contributor

mmcky commented Jul 19, 2024

@Jiarui-ZH are there any other additions you are planning to make to this PR?

@Jiarui-ZH
Copy link
Contributor Author

@mmcky Sorry for the late reply I have been swamped with deferred exams. I have made my final update to this lecture. Please let me know if there is anything else I should update

@Jiarui-ZH
Copy link
Contributor Author

for Example 1: Economic states and Example 2: Unemployment which are the only two examples that were referred back to later in the lecture I left them as they are as I thought they are a bit long to be using prf:example and looks neat enough already

@mmcky
Copy link
Contributor

mmcky commented Oct 11, 2024

@Jiarui-ZH just organising for this to get merged.
Would you have time to resolve the current conflict? It seems straight forward and can be done via the web interface but let me know if you have any questions.

@github-actions github-actions bot temporarily deployed to pull request October 11, 2024 03:01 Inactive
@github-actions github-actions bot temporarily deployed to pull request October 11, 2024 03:02 Inactive
@Jiarui-ZH
Copy link
Contributor Author

Resolved!

* The red, blue and green dots are initial marginal probability distributions $\psi_1, \psi_2, \psi_3$, each of which is represented as a vector in $\mathbb R^3$.
* The transparent dots are the marginal distributions $\psi_i P^t$ for $t = 1, 2, \ldots$, for $i=1,2,3.$.
* The yellow dot is $\psi^*$.
\update_markov_chain_I
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Jiarui-ZH is this meant to be a link?

@mmcky mmcky removed the ready label Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants