Skip to content

Commit

Permalink
deploy: 75ffa4d
Browse files Browse the repository at this point in the history
  • Loading branch information
Jemoka committed Jul 28, 2024
1 parent 3060219 commit 8084a1e
Show file tree
Hide file tree
Showing 156 changed files with 164 additions and 164 deletions.
2 changes: 1 addition & 1 deletion posts/kbhaction_value_function/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
&ldquo;the utility that gains the best action-value&rdquo;"><meta name=author content="Houjun Liu"><link rel=stylesheet href=/css/global.css><link rel=stylesheet href=/css/syntax.css></head><body><div class=center-clearfix><header><span id=header-name onclick='window.location.href="/"' style=cursor:pointer>Houjun Liu</span><div id=socialpanel><a href=https://www.jemoka.com/search/ class=header-social id=header-search><i class="ic fa-solid fa-magnifying-glass"></i></i></a>
<a href=https://github.com/Jemoka/ class=header-social id=header-github><i class="ic fa-brands fa-github"></i></a>
<a href=https://maly.io/@jemoka class=header-social id=header-twitter><i class="ic fa-brands fa-mastodon"></i></a>
<a href=https://www.reddit.com/user/Jemoka/ class=header-social id=header-reddit><i class="ic fa-brands fa-reddit"></i></a></div></header><div id=title><h1>action-value function</h1><span class=tagbox></span></div><aside id=toc><h1 id=toc-title>table of contents</h1><nav id=TableOfContents><ul><li><a href=#value-function--kbhaction-value-function-dot-md><a href=HAHAHUGOSHORTCODE15s1HBHB>value function</a></a></li><li><a href=#value-function-policy>value-function policy</a></li><li><a href=#advantage>advantage</a></li></ul></nav></aside><main><article><div><p>Quality of taking a particular value at a function&mdash;&ldquo;expected discounted return when following a <a href=/posts/kbhpolicy/>policy</a> from \(S\) and taking \(a\)&rdquo;:</p><p>\begin{equation}
<a href=https://www.reddit.com/user/Jemoka/ class=header-social id=header-reddit><i class="ic fa-brands fa-reddit"></i></a></div></header><div id=title><h1>action-value function</h1><span class=tagbox></span></div><aside id=toc><h1 id=toc-title>table of contents</h1><nav id=TableOfContents><ul><li><a href=#value-function--kbhaction-value-function-dot-md><a href=HAHAHUGOSHORTCODE16s1HBHB>value function</a></a></li><li><a href=#value-function-policy>value-function policy</a></li><li><a href=#advantage>advantage</a></li></ul></nav></aside><main><article><div><p>Quality of taking a particular value at a function&mdash;&ldquo;expected discounted return when following a <a href=/posts/kbhpolicy/>policy</a> from \(S\) and taking \(a\)&rdquo;:</p><p>\begin{equation}
Q(s,a) = R(s,a) + \gamma \sum_{s&rsquo;} T(s&rsquo;|s,a) U(s&rsquo;)
\end{equation}</p><p>where, \(T\) is the transition probability from \(s\) to \(s&rsquo;\) given action \(a\).</p><h2 id=value-function--kbhaction-value-function-dot-md><a href=/posts/kbhaction_value_function/>value function</a></h2><p>Therefore, the <a href=/posts/kbhutility_theory/>utility</a> of being in a state (called the <a href=/posts/kbhaction_value_function/>value function</a>) is:</p><p>\begin{equation}
U(s) = \max_{a} Q(s,a)
Expand Down
2 changes: 1 addition & 1 deletion posts/kbhangelman_syndrome/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
cause of Angelman Syndrome Angelman Syndrome is primarily caused by the UBE3A and the ubiquitin proteasome system. Poly-ubiquitin chain asks to discard cells."><meta name=author content="Houjun Liu"><link rel=stylesheet href=/css/global.css><link rel=stylesheet href=/css/syntax.css></head><body><div class=center-clearfix><header><span id=header-name onclick='window.location.href="/"' style=cursor:pointer>Houjun Liu</span><div id=socialpanel><a href=https://www.jemoka.com/search/ class=header-social id=header-search><i class="ic fa-solid fa-magnifying-glass"></i></i></a>
<a href=https://github.com/Jemoka/ class=header-social id=header-github><i class="ic fa-brands fa-github"></i></a>
<a href=https://maly.io/@jemoka class=header-social id=header-twitter><i class="ic fa-brands fa-mastodon"></i></a>
<a href=https://www.reddit.com/user/Jemoka/ class=header-social id=header-reddit><i class="ic fa-brands fa-reddit"></i></a></div></header><div id=title><h1>Angelman Syndrome</h1><span class=tagbox></span></div><aside id=toc><h1 id=toc-title>table of contents</h1><nav id=TableOfContents><ul><li><a href=#cause-of-angelman-syndrome--kbhangelman-syndrome-dot-md>cause of <a href=HAHAHUGOSHORTCODE76s1HBHB>Angelman Syndrome</a></a></li></ul></nav></aside><main><article><div><p><a href=/posts/kbhangelman_syndrome/>Angelman Syndrome</a> is a syndrome is ~1 in 15000, clinically recognizable, developmental delay syndrome.</p><h2 id=cause-of-angelman-syndrome--kbhangelman-syndrome-dot-md>cause of <a href=/posts/kbhangelman_syndrome/>Angelman Syndrome</a></h2><p><a href=/posts/kbhangelman_syndrome/>Angelman Syndrome</a> is primarily caused by the <a href>UBE3A</a> and the <a href>ubiquitin proteasome system.</a> Poly-<a href>ubiquitin</a> chain asks to discard cells.</p></div></article></main><footer><p id=footer>&copy; 2019-2024 Houjun Liu. Licensed CC BY-NC-SA 4.0.</p></footer></div></body></html>
<a href=https://www.reddit.com/user/Jemoka/ class=header-social id=header-reddit><i class="ic fa-brands fa-reddit"></i></a></div></header><div id=title><h1>Angelman Syndrome</h1><span class=tagbox></span></div><aside id=toc><h1 id=toc-title>table of contents</h1><nav id=TableOfContents><ul><li><a href=#cause-of-angelman-syndrome--kbhangelman-syndrome-dot-md>cause of <a href=HAHAHUGOSHORTCODE77s1HBHB>Angelman Syndrome</a></a></li></ul></nav></aside><main><article><div><p><a href=/posts/kbhangelman_syndrome/>Angelman Syndrome</a> is a syndrome is ~1 in 15000, clinically recognizable, developmental delay syndrome.</p><h2 id=cause-of-angelman-syndrome--kbhangelman-syndrome-dot-md>cause of <a href=/posts/kbhangelman_syndrome/>Angelman Syndrome</a></h2><p><a href=/posts/kbhangelman_syndrome/>Angelman Syndrome</a> is primarily caused by the <a href>UBE3A</a> and the <a href>ubiquitin proteasome system.</a> Poly-<a href>ubiquitin</a> chain asks to discard cells.</p></div></article></main><footer><p id=footer>&copy; 2019-2024 Houjun Liu. Licensed CC BY-NC-SA 4.0.</p></footer></div></body></html>
2 changes: 1 addition & 1 deletion posts/kbhapproximate_inference/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
Step 2: sample from \(B,S\) We sample \(B\). We sampled that \(B=1\) today. We sample \(S\). We sampled that \(S=0\) today. Step 3: sample from \(E\) We sample \(E\) GIVEN what we already sampled, that \(B=1, S=0\), we sampled that that \(E = 1\) Step 4: sample from \(D, C\) We sample \(D\) given that \(E=1\) as we sampled."><meta name=author content="Houjun Liu"><link rel=stylesheet href=/css/global.css><link rel=stylesheet href=/css/syntax.css></head><body><div class=center-clearfix><header><span id=header-name onclick='window.location.href="/"' style=cursor:pointer>Houjun Liu</span><div id=socialpanel><a href=https://www.jemoka.com/search/ class=header-social id=header-search><i class="ic fa-solid fa-magnifying-glass"></i></i></a>
<a href=https://github.com/Jemoka/ class=header-social id=header-github><i class="ic fa-brands fa-github"></i></a>
<a href=https://maly.io/@jemoka class=header-social id=header-twitter><i class="ic fa-brands fa-mastodon"></i></a>
<a href=https://www.reddit.com/user/Jemoka/ class=header-social id=header-reddit><i class="ic fa-brands fa-reddit"></i></a></div></header><div id=title><h1>approximate inference</h1><span class=tagbox></span></div><aside id=toc><h1 id=toc-title>table of contents</h1><nav id=TableOfContents><ul><li><a href=#direct-sampling--kbhdirect-sampling-dot-md><a href=HAHAHUGOSHORTCODE90s0HBHB>Direct Sampling</a></a><ul><li><a href=#example>Example</a></li></ul></li><li><a href=#likelihood-weighted-sampling--kbhdirect-sampling-dot-md><a href=HAHAHUGOSHORTCODE90s6HBHB>Likelihood Weighted Sampling</a></a><ul><li><a href=#example>Example</a></li></ul></li></ul></nav></aside><main><article><div><h2 id=direct-sampling--kbhdirect-sampling-dot-md><a href=/posts/kbhdirect_sampling/>Direct Sampling</a></h2><p><a href=/posts/kbhdirect_sampling/>Direct Sampling</a> is an <a href=/posts/kbhapproximate_inference/>approximate inference</a> method where we pull samples from the given <a href=/posts/kbhjoint_probability_distribution/>joint probability distribution</a>.</p><h3 id=example>Example</h3><p>Suppose we are interested in:</p><figure><img src=/ox-hugo/2023-10-05_09-19-51_screenshot.png></figure><p>where we dare \(P(B^{1}|D^{1},C^{1})\).</p><h4 id=step-1-sort>Step 1: sort</h4><p>We obtain a <a href=/posts/kbhtopological_sort/>topological sort</a> of this network:</p><p>\begin{equation}
<a href=https://www.reddit.com/user/Jemoka/ class=header-social id=header-reddit><i class="ic fa-brands fa-reddit"></i></a></div></header><div id=title><h1>approximate inference</h1><span class=tagbox></span></div><aside id=toc><h1 id=toc-title>table of contents</h1><nav id=TableOfContents><ul><li><a href=#direct-sampling--kbhdirect-sampling-dot-md><a href=HAHAHUGOSHORTCODE89s0HBHB>Direct Sampling</a></a><ul><li><a href=#example>Example</a></li></ul></li><li><a href=#likelihood-weighted-sampling--kbhdirect-sampling-dot-md><a href=HAHAHUGOSHORTCODE89s6HBHB>Likelihood Weighted Sampling</a></a><ul><li><a href=#example>Example</a></li></ul></li></ul></nav></aside><main><article><div><h2 id=direct-sampling--kbhdirect-sampling-dot-md><a href=/posts/kbhdirect_sampling/>Direct Sampling</a></h2><p><a href=/posts/kbhdirect_sampling/>Direct Sampling</a> is an <a href=/posts/kbhapproximate_inference/>approximate inference</a> method where we pull samples from the given <a href=/posts/kbhjoint_probability_distribution/>joint probability distribution</a>.</p><h3 id=example>Example</h3><p>Suppose we are interested in:</p><figure><img src=/ox-hugo/2023-10-05_09-19-51_screenshot.png></figure><p>where we dare \(P(B^{1}|D^{1},C^{1})\).</p><h4 id=step-1-sort>Step 1: sort</h4><p>We obtain a <a href=/posts/kbhtopological_sort/>topological sort</a> of this network:</p><p>\begin{equation}
B, S, E, D, C
\end{equation}</p><h4 id=step-2-sample-from-b-s>Step 2: sample from \(B,S\)</h4><ul><li>We sample \(B\). We sampled that \(B=1\) today.</li><li>We sample \(S\). We sampled that \(S=0\) today.</li></ul><h4 id=step-3-sample-from-e>Step 3: sample from \(E\)</h4><ul><li>We sample \(E\) <strong>GIVEN</strong> what we already sampled, that \(B=1, S=0\), we sampled that that \(E = 1\)</li></ul><h4 id=step-4-sample-from-d-c>Step 4: sample from \(D, C\)</h4><ul><li>We sample \(D\) given that \(E=1\) as we sampled.</li><li>We sample \(C\) given that \(E=1\) as we sampled.</li></ul><h4 id=repeat>Repeat</h4><p>Repeat steps 2-4</p><h4 id=step-n-analyze>Step n: Analyze</h4><table><thead><tr><th>B</th><th>S</th><th>E</th><th>D</th><th>C</th></tr></thead><tbody><tr><td>1</td><td>0</td><td>1</td><td>0</td><td>1</td></tr><tr><td>0</td><td>1</td><td>1</td><td>0</td><td>0</td></tr><tr><td>1</td><td>1</td><td>1</td><td>1</td><td>0</td></tr><tr><td>0</td><td>0</td><td>1</td><td>1</td><td>0</td></tr><tr><td>1</td><td>0</td><td>1</td><td>1</td><td>1</td></tr></tbody></table><p>We desire to know \(P(b^{1}|d^{1}, c^{1})\). Looks like, given this table, it would be \(100\%\).</p><h2 id=likelihood-weighted-sampling--kbhdirect-sampling-dot-md><a href=/posts/kbhdirect_sampling/#likelihood-weighted-sampling>Likelihood Weighted Sampling</a></h2><p><a href=/posts/kbhdirect_sampling/#likelihood-weighted-sampling>Likelihood Weighted Sampling</a> is a sampling approach whereby you force values that you wont, and then weight the results by the chance of it happening.</p><p>This is <strong>super useful</strong> when our envidence is unlikely.</p><h3 id=example>Example</h3><p>Suppose again you are interested in \(P(b^{1}|d^{1}, c^{1})\). In this case, we only sample \(B,S,E\):</p><table><thead><tr><th>B</th><th>S</th><th>E</th></tr></thead><tbody><tr><td>0</td><td>1</td><td>0</td></tr><tr><td>1</td><td>0</td><td>1</td></tr></tbody></table><p>Now, for each of these results, we the compute the chance of our priors happening given the samples.</p><ul><li>Row 1: \(p(d^{1}|e^{0})p(c^{1}|e^{0})\)</li><li>Row 2: \(p(d^{1}|e^{1})p(c^{1}|e^{1})\)</li></ul><p>Let&rsquo;s say:</p><ul><li>Row 1: \(p(d^{1}|e^{0})p(c^{1}|e^{0})=0.3\)</li><li>Row 2: \(p(d^{1}|e^{1})p(c^{1}|e^{1})=0.9\)</li></ul><p>Finally, to compute \(p(b^{1}|d^{1}c^{1})\):</p><p>\begin{equation}
\frac{0.9}{0.9+0.3}
Expand Down
2 changes: 1 addition & 1 deletion posts/kbhautism/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
autism gene signature The gene signature of autism can be measured in clean and quantitative assays."><meta name=author content="Houjun Liu"><link rel=stylesheet href=/css/global.css><link rel=stylesheet href=/css/syntax.css></head><body><div class=center-clearfix><header><span id=header-name onclick='window.location.href="/"' style=cursor:pointer>Houjun Liu</span><div id=socialpanel><a href=https://www.jemoka.com/search/ class=header-social id=header-search><i class="ic fa-solid fa-magnifying-glass"></i></i></a>
<a href=https://github.com/Jemoka/ class=header-social id=header-github><i class="ic fa-brands fa-github"></i></a>
<a href=https://maly.io/@jemoka class=header-social id=header-twitter><i class="ic fa-brands fa-mastodon"></i></a>
<a href=https://www.reddit.com/user/Jemoka/ class=header-social id=header-reddit><i class="ic fa-brands fa-reddit"></i></a></div></header><div id=title><h1>autism</h1><span class=tagbox></span></div><aside id=toc><h1 id=toc-title>table of contents</h1><nav id=TableOfContents><ul><li><a href=#autism--kbhautism-dot-md--gene-signature><a href=HAHAHUGOSHORTCODE112s2HBHB>autism</a> gene signature</a></li></ul></nav></aside><main><article><div><p>autism is a spectrum disorder that are caused by both environmental and genetic factors.</p><p>Key Question: how can different <a href=/posts/kbhchromatin/>chromatin</a> regulators lead to the same set of symptoms named &ldquo;<a href=/posts/kbhautism/>autism</a>&rdquo;.</p><h2 id=autism--kbhautism-dot-md--gene-signature><a href=/posts/kbhautism/>autism</a> gene signature</h2><p>The gene signature of autism can be measured in clean and quantitative assays.</p></div></article></main><footer><p id=footer>&copy; 2019-2024 Houjun Liu. Licensed CC BY-NC-SA 4.0.</p></footer></div></body></html>
<a href=https://www.reddit.com/user/Jemoka/ class=header-social id=header-reddit><i class="ic fa-brands fa-reddit"></i></a></div></header><div id=title><h1>autism</h1><span class=tagbox></span></div><aside id=toc><h1 id=toc-title>table of contents</h1><nav id=TableOfContents><ul><li><a href=#autism--kbhautism-dot-md--gene-signature><a href=HAHAHUGOSHORTCODE113s2HBHB>autism</a> gene signature</a></li></ul></nav></aside><main><article><div><p>autism is a spectrum disorder that are caused by both environmental and genetic factors.</p><p>Key Question: how can different <a href=/posts/kbhchromatin/>chromatin</a> regulators lead to the same set of symptoms named &ldquo;<a href=/posts/kbhautism/>autism</a>&rdquo;.</p><h2 id=autism--kbhautism-dot-md--gene-signature><a href=/posts/kbhautism/>autism</a> gene signature</h2><p>The gene signature of autism can be measured in clean and quantitative assays.</p></div></article></main><footer><p id=footer>&copy; 2019-2024 Houjun Liu. Licensed CC BY-NC-SA 4.0.</p></footer></div></body></html>
2 changes: 1 addition & 1 deletion posts/kbhbaysian_parameter_learning/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
To do this, we desire:"><meta name=author content="Houjun Liu"><link rel=stylesheet href=/css/global.css><link rel=stylesheet href=/css/syntax.css></head><body><div class=center-clearfix><header><span id=header-name onclick='window.location.href="/"' style=cursor:pointer>Houjun Liu</span><div id=socialpanel><a href=https://www.jemoka.com/search/ class=header-social id=header-search><i class="ic fa-solid fa-magnifying-glass"></i></i></a>
<a href=https://github.com/Jemoka/ class=header-social id=header-github><i class="ic fa-brands fa-github"></i></a>
<a href=https://maly.io/@jemoka class=header-social id=header-twitter><i class="ic fa-brands fa-mastodon"></i></a>
<a href=https://www.reddit.com/user/Jemoka/ class=header-social id=header-reddit><i class="ic fa-brands fa-reddit"></i></a></div></header><div id=title><h1>Baysian Parameter Learning</h1><span class=tagbox></span></div><aside id=toc><h1 id=toc-title>table of contents</h1><nav id=TableOfContents><ul><li><a href=#bayesian-parameter-learning-on-binary-distributions>Bayesian Parameter Learning on Binary Distributions</a><ul><li><a href=#beta-distribution>Beta Distribution</a></li><li><a href=#total-probability-in-beta-distributions>Total Probability in beta distributions</a></li><li><a href=#choosing-a-prior>Choosing a prior</a></li></ul></li><li><a href=#dirichlet-distribution>Dirichlet Distribution</a></li><li><a href=#expectation--kbhexpectation-dot-md--of-a-distribution><a href=HAHAHUGOSHORTCODE173s14HBHB>expectation</a> of a distribution</a></li></ul></nav></aside><main><article><div><p>We treat this as an inference problem in <a href=/posts/kbhnaive_bayes/>Naive Bayes</a>: <strong>observations are independent from each other</strong>.</p><p>Instead of trying to compute a \(\theta\) that works for <a href=/posts/kbhmaximum_likelihood_parameter_learning/>Maximum Likelihood Parameter Learning</a>, what we instead do is try to understand what \(\theta\) can be in terms of a distribution.</p><p>That is, we want to get some:</p><figure><img src=/ox-hugo/2023-10-05_10-22-12_screenshot.png></figure><p>&ldquo;for each value of \(\theta\), what&rsquo;s the chance that that is the actual value&rdquo;</p><p>To do this, we desire:</p><p>\begin{equation}
<a href=https://www.reddit.com/user/Jemoka/ class=header-social id=header-reddit><i class="ic fa-brands fa-reddit"></i></a></div></header><div id=title><h1>Baysian Parameter Learning</h1><span class=tagbox></span></div><aside id=toc><h1 id=toc-title>table of contents</h1><nav id=TableOfContents><ul><li><a href=#bayesian-parameter-learning-on-binary-distributions>Bayesian Parameter Learning on Binary Distributions</a><ul><li><a href=#beta-distribution>Beta Distribution</a></li><li><a href=#total-probability-in-beta-distributions>Total Probability in beta distributions</a></li><li><a href=#choosing-a-prior>Choosing a prior</a></li></ul></li><li><a href=#dirichlet-distribution>Dirichlet Distribution</a></li><li><a href=#expectation--kbhexpectation-dot-md--of-a-distribution><a href=HAHAHUGOSHORTCODE148s14HBHB>expectation</a> of a distribution</a></li></ul></nav></aside><main><article><div><p>We treat this as an inference problem in <a href=/posts/kbhnaive_bayes/>Naive Bayes</a>: <strong>observations are independent from each other</strong>.</p><p>Instead of trying to compute a \(\theta\) that works for <a href=/posts/kbhmaximum_likelihood_parameter_learning/>Maximum Likelihood Parameter Learning</a>, what we instead do is try to understand what \(\theta\) can be in terms of a distribution.</p><p>That is, we want to get some:</p><figure><img src=/ox-hugo/2023-10-05_10-22-12_screenshot.png></figure><p>&ldquo;for each value of \(\theta\), what&rsquo;s the chance that that is the actual value&rdquo;</p><p>To do this, we desire:</p><p>\begin{equation}
p(\theta | D)
\end{equation}</p><p>&ldquo;what&rsquo;s the probability of theta being at a certain value given the observations we had.&rdquo;</p><p>And to obtain the actual the actual value, we calculate the <a href=/posts/kbhexpectation/>expectation</a> of this distribution:</p><p>\begin{equation}
\hat{\theta} = \mathbb{E}[\theta] = \int \theta p(\theta | D) \dd{\theta}
Expand Down
Loading

0 comments on commit 8084a1e

Please sign in to comment.