Skip to content

Commit

Permalink
303 class 4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
SichangHe committed Apr 8, 2024
1 parent 2b27de7 commit ad9354a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 16 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Build and deploy mdBook site
on:
push:
branches: ['main']
branches: ["main"]
pull_request:
workflow_dispatch:

Expand All @@ -10,16 +10,16 @@ jobs:
name: Build with mdBook
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
lfs: true
- uses: cargo-bins/cargo-binstall@main
- name: Install mdBook, mdBook-KaTeX, and mdBook-ToC
run: cargo binstall -y mdbook mdbook-katex mdbook-toc
- name: Build
run: mdbook build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
- uses: actions/checkout@v4
with:
lfs: true
- uses: cargo-bins/cargo-binstall@main
- name: Install mdBook, mdBook-KaTeX, and mdBook-ToC
run: cargo binstall -y mdbook mdbook-katex mdbook-toc
- name: Build
run: mdbook build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3

deploy:
name: Deploy the site to GitHub Pages
Expand Down
15 changes: 10 additions & 5 deletions src/notes/class_notes/stats303.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,8 @@ $$

### importance sampling

for value $f$ following distribution with PDF $p$, do not know CDF
for value $f$ following distribution with PDF $p$, do not know CDF,
want expectation

define distribution $q(z)$ with known CDF

Expand All @@ -250,7 +251,8 @@ $$

### simulated annealing

to avoid trapped in local minimum
- to avoid trapped in local minimum
- still need to try multiple time

when seeking minimum, accept increase in $f$ with probability

Expand Down Expand Up @@ -300,16 +302,19 @@ design Markov chain w/ stationary distribution $\pi=p$:
\right)$
- $⇒ p(x)Q_{x,x^*}α(x,x^*)=p(x^*)Q_{x^*,x}α(x^*,x)$
1. use new Markov chain w/ $Q'_{x,x^*}:=α(x,x^*)Q_{x,x^*},\quad x^*≠x$
- $Q_{x,x}$ take the rest of probability
- $Q_{x,x}$ take the rest of probability s.t. $∑_yQ_{x,y}=1$

- do not know when stationary
- drawback: do not know when stationary/converge. sample may be dependent

### Gibbs sampling

want to sample variable $x_i$ following different distribution

fix $x_{-i}:=\{x_1\ldots x_{i-1},x_{i+1}\ldots\}$ to previous value
when sampling $x_i$
when sampling $x_i$:
$$
Q_{x,x^*}:=p(x_i^*|x_{-1})
$$

a special case for metropolis hasting method $\Leftarrow$

Expand Down

0 comments on commit ad9354a

Please sign in to comment.