lecture-python-intro icon indicating copy to clipboard operation
lecture-python-intro copied to clipboard

Update made to Markov Chains: Basic Concepts lecture

Open Jiarui-ZH opened this issue 1 year ago • 16 comments

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”.

Jiarui-ZH avatar Jun 27 '24 05:06 Jiarui-ZH

Deploy Preview for taupe-gaufre-c4e660 ready!

Name Link
Latest commit 73f572a21772baf664e84d5e10a5cfb752f5d847
Latest deploy log https://app.netlify.com/projects/taupe-gaufre-c4e660/deploys/684f751384c17d00088729d5
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 project configuration.

netlify[bot] avatar Jun 27 '24 05:06 netlify[bot]

🚀 Deployed on https://684f773792cd7d1ae45b5cd7--taupe-gaufre-c4e660.netlify.app

github-actions[bot] avatar Jun 27 '24 05:06 github-actions[bot]

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

Jiarui-ZH avatar Jun 30 '24 12:06 Jiarui-ZH

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

mmcky avatar Jun 30 '24 23:06 mmcky

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

Jiarui-ZH avatar Jul 01 '24 17:07 Jiarui-ZH

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`

mmcky avatar Jul 02 '24 00:07 mmcky

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

Jiarui-ZH avatar Jul 04 '24 06:07 Jiarui-ZH

@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

Jiarui-ZH avatar Jul 15 '24 05:07 Jiarui-ZH

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.

mmcky avatar Jul 15 '24 22:07 mmcky

ahh I see, thank you for the fixes

Jiarui-ZH avatar Jul 17 '24 02:07 Jiarui-ZH

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

mmcky avatar Jul 19 '24 03:07 mmcky

@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 avatar Aug 05 '24 02:08 Jiarui-ZH

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

Jiarui-ZH avatar Aug 05 '24 02:08 Jiarui-ZH

@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.

mmcky avatar Oct 11 '24 02:10 mmcky

Resolved!

Jiarui-ZH avatar Oct 11 '24 03:10 Jiarui-ZH

@HumphreyYang or @nisha617 would either of you have time to have a Quick Look over these changes?

mmcky avatar Jun 16 '25 01:06 mmcky