Skip to content

Commit

Permalink
automata commit
Browse files Browse the repository at this point in the history
  • Loading branch information
eldridgejm committed Jan 8, 2025
1 parent a0aeb7e commit 4a75702
Show file tree
Hide file tree
Showing 21 changed files with 772 additions and 772 deletions.
456 changes: 228 additions & 228 deletions practice/all.html

Large diffs are not rendered by default.

144 changes: 72 additions & 72 deletions practice/midterm-01.html

Large diffs are not rendered by default.

280 changes: 140 additions & 140 deletions practice/midterm-02.html

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions practice/tags/Gaussians.html
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,13 @@ <h2>Problem #040</h2>
<p>Suppose a Gaussian with a diagonal covariance matrix is fit to 200 points in <span class="math">\(\mathbb R^4\)</span> using the maximum likelihood estimators. How many parameters are estimated? Count each entry of <span class="math">\(\mu\)</span> and the covariance matrix that must be estimated as its own parameter.</p>
<p>
<span class="inline-response-box">
<span id="answer-32a85d76-54f0-45a6-a1f6-3f9a13f3effe" style="display: none">8</span>
<span id="button-32a85d76-54f0-45a6-a1f6-3f9a13f3effe">
<span id="answer-d4066340-57c6-49d2-905d-265af0c96c36" style="display: none">8</span>
<span id="button-d4066340-57c6-49d2-905d-265af0c96c36">
<button
type="button"
onclick="
document.getElementById('answer-32a85d76-54f0-45a6-a1f6-3f9a13f3effe').style.display = 'inline-block';
document.getElementById('button-32a85d76-54f0-45a6-a1f6-3f9a13f3effe').style.display = 'none'
document.getElementById('answer-d4066340-57c6-49d2-905d-265af0c96c36').style.display = 'inline-block';
document.getElementById('button-d4066340-57c6-49d2-905d-265af0c96c36').style.display = 'none'
"
>
Show Answer
Expand Down Expand Up @@ -179,13 +179,13 @@ <h2>Problem #053</h2>
<p>Suppose a Gaussian with a diagonal covariance matrix is fit to 200 points in <span class="math">\(\mathbb R^4\)</span> using the maximum likelihood estimators. How many parameters are estimated? Count each entry of <span class="math">\(\vec\mu\)</span> and the covariance matrix that must be estimated as its own parameter (the off-diagonal elements of the covariance are zero, and shouldn't be included in your count).</p>
<p>
<span class="inline-response-box">
<span id="answer-28639fc4-f565-422e-ad5d-69d2efd6618e" style="display: none">8</span>
<span id="button-28639fc4-f565-422e-ad5d-69d2efd6618e">
<span id="answer-df2d4193-d47a-4d11-b772-6a0e3c52a7ae" style="display: none">8</span>
<span id="button-df2d4193-d47a-4d11-b772-6a0e3c52a7ae">
<button
type="button"
onclick="
document.getElementById('answer-28639fc4-f565-422e-ad5d-69d2efd6618e').style.display = 'inline-block';
document.getElementById('button-28639fc4-f565-422e-ad5d-69d2efd6618e').style.display = 'none'
document.getElementById('answer-df2d4193-d47a-4d11-b772-6a0e3c52a7ae').style.display = 'inline-block';
document.getElementById('button-df2d4193-d47a-4d11-b772-6a0e3c52a7ae').style.display = 'none'
"
>
Show Answer
Expand Down
8 changes: 4 additions & 4 deletions practice/tags/SVMs.html
Original file line number Diff line number Diff line change
Expand Up @@ -298,13 +298,13 @@ <h2>Problem #073</h2>
<p>What weight vector <i>is</i> the solution of the Hard SVM problem for this data set?</p>
<p>
<span class="inline-response-box">
<span id="answer-2bd8a6b3-b9b1-4136-a703-48078533e04e" style="display: none"><span class="math">\((3, 0, \frac{1}{4})^T\)</span></span>
<span id="button-2bd8a6b3-b9b1-4136-a703-48078533e04e">
<span id="answer-ff49149f-9a24-4445-9ee2-c4352d8a3473" style="display: none"><span class="math">\((3, 0, \frac{1}{4})^T\)</span></span>
<span id="button-ff49149f-9a24-4445-9ee2-c4352d8a3473">
<button
type="button"
onclick="
document.getElementById('answer-2bd8a6b3-b9b1-4136-a703-48078533e04e').style.display = 'inline-block';
document.getElementById('button-2bd8a6b3-b9b1-4136-a703-48078533e04e').style.display = 'none'
document.getElementById('answer-ff49149f-9a24-4445-9ee2-c4352d8a3473').style.display = 'inline-block';
document.getElementById('button-ff49149f-9a24-4445-9ee2-c4352d8a3473').style.display = 'none'
"
>
Show Answer
Expand Down
104 changes: 52 additions & 52 deletions practice/tags/bayes classifier.html
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,13 @@ <h3 class="subproblem-id">Part 2)</h3>
<p>Suppose <span class="math">\(\pr(Y = 1) = 0.5\)</span> and <span class="math">\(\pr(Y = 0) = 0.5\)</span>. What is the Bayes error with respect to this distribution?</p>
<p>
<span class="inline-response-box">
<span id="answer-29f14b75-53e2-46c7-85bc-9c53df1dffb2" style="display: none">0.25</span>
<span id="button-29f14b75-53e2-46c7-85bc-9c53df1dffb2">
<span id="answer-3b697640-e1e1-4746-94e0-d15ccc5a688c" style="display: none">0.25</span>
<span id="button-3b697640-e1e1-4746-94e0-d15ccc5a688c">
<button
type="button"
onclick="
document.getElementById('answer-29f14b75-53e2-46c7-85bc-9c53df1dffb2').style.display = 'inline-block';
document.getElementById('button-29f14b75-53e2-46c7-85bc-9c53df1dffb2').style.display = 'none'
document.getElementById('answer-3b697640-e1e1-4746-94e0-d15ccc5a688c').style.display = 'inline-block';
document.getElementById('button-3b697640-e1e1-4746-94e0-d15ccc5a688c').style.display = 'none'
"
>
Show Answer
Expand All @@ -172,13 +172,13 @@ <h3 class="subproblem-id">Part 4)</h3>
<p>Now suppose <span class="math">\(\pr(Y = 1) = 0.7\)</span> and <span class="math">\(\pr(Y = 0) = 0.3\)</span>. What is the Bayes error with respect to this distribution?</p>
<p>
<span class="inline-response-box">
<span id="answer-c9fc3584-2fc1-4732-b692-50a5277013c8" style="display: none">0.29</span>
<span id="button-c9fc3584-2fc1-4732-b692-50a5277013c8">
<span id="answer-bd9bfe95-9c62-4109-824d-cf6fb55b28d4" style="display: none">0.29</span>
<span id="button-bd9bfe95-9c62-4109-824d-cf6fb55b28d4">
<button
type="button"
onclick="
document.getElementById('answer-c9fc3584-2fc1-4732-b692-50a5277013c8').style.display = 'inline-block';
document.getElementById('button-c9fc3584-2fc1-4732-b692-50a5277013c8').style.display = 'none'
document.getElementById('answer-bd9bfe95-9c62-4109-824d-cf6fb55b28d4').style.display = 'inline-block';
document.getElementById('button-bd9bfe95-9c62-4109-824d-cf6fb55b28d4').style.display = 'none'
"
>
Show Answer
Expand Down Expand Up @@ -278,13 +278,13 @@ <h3 class="subproblem-id">Part 1)</h3>
<p>What is <span class="math">\(\pr(1 \leq X \leq 3 \given Y = 0)\)</span>?</p>
<p>
<span class="inline-response-box">
<span id="answer-c8d0d2be-ebe7-4fc5-83cc-b80d58562b68" style="display: none">0.6</span>
<span id="button-c8d0d2be-ebe7-4fc5-83cc-b80d58562b68">
<span id="answer-a1d46d5c-7c6a-4537-9d2b-4d3214b1c3b8" style="display: none">0.6</span>
<span id="button-a1d46d5c-7c6a-4537-9d2b-4d3214b1c3b8">
<button
type="button"
onclick="
document.getElementById('answer-c8d0d2be-ebe7-4fc5-83cc-b80d58562b68').style.display = 'inline-block';
document.getElementById('button-c8d0d2be-ebe7-4fc5-83cc-b80d58562b68').style.display = 'none'
document.getElementById('answer-a1d46d5c-7c6a-4537-9d2b-4d3214b1c3b8').style.display = 'inline-block';
document.getElementById('button-a1d46d5c-7c6a-4537-9d2b-4d3214b1c3b8').style.display = 'none'
"
>
Show Answer
Expand All @@ -311,13 +311,13 @@ <h3 class="subproblem-id">Part 3)</h3>
<p>Suppose again that <span class="math">\(\pr(Y = 1) = \pr(Y = 0) = 0.5\)</span>. What is the Bayes error with respect to this distribution?</p>
<p>
<span class="inline-response-box">
<span id="answer-44fb00f3-db95-4a01-8d1c-9150c58832b8" style="display: none">0.30</span>
<span id="button-44fb00f3-db95-4a01-8d1c-9150c58832b8">
<span id="answer-31610345-c514-4bee-815e-193bdeb1c472" style="display: none">0.30</span>
<span id="button-31610345-c514-4bee-815e-193bdeb1c472">
<button
type="button"
onclick="
document.getElementById('answer-44fb00f3-db95-4a01-8d1c-9150c58832b8').style.display = 'inline-block';
document.getElementById('button-44fb00f3-db95-4a01-8d1c-9150c58832b8').style.display = 'none'
document.getElementById('answer-31610345-c514-4bee-815e-193bdeb1c472').style.display = 'inline-block';
document.getElementById('button-31610345-c514-4bee-815e-193bdeb1c472').style.display = 'none'
"
>
Show Answer
Expand All @@ -344,13 +344,13 @@ <h3 class="subproblem-id">Part 5)</h3>
<p>Suppose again that <span class="math">\(\pr(Y = 1) = 0.7\)</span> and <span class="math">\(\pr(Y = 0) = 0.3\)</span>. What is the Bayes error with respect to this distribution?</p>
<p>
<span class="inline-response-box">
<span id="answer-5cce68d8-115f-41be-a2c8-c35d2dd6edec" style="display: none">0.27</span>
<span id="button-5cce68d8-115f-41be-a2c8-c35d2dd6edec">
<span id="answer-4345eee2-9580-4337-a272-da0d8865d8b5" style="display: none">0.27</span>
<span id="button-4345eee2-9580-4337-a272-da0d8865d8b5">
<button
type="button"
onclick="
document.getElementById('answer-5cce68d8-115f-41be-a2c8-c35d2dd6edec').style.display = 'inline-block';
document.getElementById('button-5cce68d8-115f-41be-a2c8-c35d2dd6edec').style.display = 'none'
document.getElementById('answer-4345eee2-9580-4337-a272-da0d8865d8b5').style.display = 'inline-block';
document.getElementById('button-4345eee2-9580-4337-a272-da0d8865d8b5').style.display = 'none'
"
>
Show Answer
Expand Down Expand Up @@ -385,13 +385,13 @@ <h3 class="subproblem-id">Part 1)</h3>
<p>Suppose that <span class="math">\(\pr(Y = 1) = \pr(Y = 0) = 0.5\)</span>. What is <span class="math">\(\pr(1 \leq X \leq 3)\)</span>?</p>
<p>
<span class="inline-response-box">
<span id="answer-5dce7c42-4a34-473d-9f53-8e7f1766fe61" style="display: none">0.3</span>
<span id="button-5dce7c42-4a34-473d-9f53-8e7f1766fe61">
<span id="answer-37399624-b6fa-4d52-ad47-e9273f574087" style="display: none">0.3</span>
<span id="button-37399624-b6fa-4d52-ad47-e9273f574087">
<button
type="button"
onclick="
document.getElementById('answer-5dce7c42-4a34-473d-9f53-8e7f1766fe61').style.display = 'inline-block';
document.getElementById('button-5dce7c42-4a34-473d-9f53-8e7f1766fe61').style.display = 'none'
document.getElementById('answer-37399624-b6fa-4d52-ad47-e9273f574087').style.display = 'inline-block';
document.getElementById('button-37399624-b6fa-4d52-ad47-e9273f574087').style.display = 'none'
"
>
Show Answer
Expand All @@ -418,13 +418,13 @@ <h3 class="subproblem-id">Part 3)</h3>
<p>Suppose again that <span class="math">\(\pr(Y = 1) = \pr(Y = 0) = 0.5\)</span>. What is the Bayes error with respect to this distribution?</p>
<p>
<span class="inline-response-box">
<span id="answer-518bd08c-5be1-4f80-b74c-e9ecf6972fc3" style="display: none">0.25</span>
<span id="button-518bd08c-5be1-4f80-b74c-e9ecf6972fc3">
<span id="answer-81be8788-461c-46eb-baea-117843e94a96" style="display: none">0.25</span>
<span id="button-81be8788-461c-46eb-baea-117843e94a96">
<button
type="button"
onclick="
document.getElementById('answer-518bd08c-5be1-4f80-b74c-e9ecf6972fc3').style.display = 'inline-block';
document.getElementById('button-518bd08c-5be1-4f80-b74c-e9ecf6972fc3').style.display = 'none'
document.getElementById('answer-81be8788-461c-46eb-baea-117843e94a96').style.display = 'inline-block';
document.getElementById('button-81be8788-461c-46eb-baea-117843e94a96').style.display = 'none'
"
>
Show Answer
Expand All @@ -439,13 +439,13 @@ <h3 class="subproblem-id">Part 4)</h3>
<p>Now suppose <span class="math">\(\pr(Y = 1) = 0.7\)</span> and <span class="math">\(\pr(Y = 0) = 0.3\)</span>. What is <span class="math">\(\pr(1 \leq X \leq 3)\)</span>?</p>
<p>
<span class="inline-response-box">
<span id="answer-8944dd10-a840-4728-a857-a066eeea1e3d" style="display: none">0.34</span>
<span id="button-8944dd10-a840-4728-a857-a066eeea1e3d">
<span id="answer-427d9761-878d-4032-affe-dcaa4fda64ea" style="display: none">0.34</span>
<span id="button-427d9761-878d-4032-affe-dcaa4fda64ea">
<button
type="button"
onclick="
document.getElementById('answer-8944dd10-a840-4728-a857-a066eeea1e3d').style.display = 'inline-block';
document.getElementById('button-8944dd10-a840-4728-a857-a066eeea1e3d').style.display = 'none'
document.getElementById('answer-427d9761-878d-4032-affe-dcaa4fda64ea').style.display = 'inline-block';
document.getElementById('button-427d9761-878d-4032-affe-dcaa4fda64ea').style.display = 'none'
"
>
Show Answer
Expand All @@ -472,13 +472,13 @@ <h3 class="subproblem-id">Part 6)</h3>
<p>Suppose again that <span class="math">\(\pr(Y = 1) = 0.7\)</span> and <span class="math">\(\pr(Y = 0) = 0.3\)</span>. What is the Bayes error with respect to this distribution?</p>
<p>
<span class="inline-response-box">
<span id="answer-3268a686-1d31-43cb-8fea-b8f5f0bcb3f0" style="display: none">0.28</span>
<span id="button-3268a686-1d31-43cb-8fea-b8f5f0bcb3f0">
<span id="answer-690ddeb3-fd04-4b2d-8a72-af0a9be349e3" style="display: none">0.28</span>
<span id="button-690ddeb3-fd04-4b2d-8a72-af0a9be349e3">
<button
type="button"
onclick="
document.getElementById('answer-3268a686-1d31-43cb-8fea-b8f5f0bcb3f0').style.display = 'inline-block';
document.getElementById('button-3268a686-1d31-43cb-8fea-b8f5f0bcb3f0').style.display = 'none'
document.getElementById('answer-690ddeb3-fd04-4b2d-8a72-af0a9be349e3').style.display = 'inline-block';
document.getElementById('button-690ddeb3-fd04-4b2d-8a72-af0a9be349e3').style.display = 'none'
"
>
Show Answer
Expand Down Expand Up @@ -510,13 +510,13 @@ <h3 class="subproblem-id">Part 1)</h3>
<p>What is the estimate of the Class 0 density at <span class="math">\(x = 0.6\)</span>? That is, what is the estimate <span class="math">\(\hat p(0.6 \given Y = 0)\)</span>?</p>
<p>
<span class="inline-response-box">
<span id="answer-a3417d87-b3af-44d3-bc1d-564a7bce55f1" style="display: none">5/3</span>
<span id="button-a3417d87-b3af-44d3-bc1d-564a7bce55f1">
<span id="answer-946bb26d-5f01-4dad-a57e-fdf851334d64" style="display: none">5/3</span>
<span id="button-946bb26d-5f01-4dad-a57e-fdf851334d64">
<button
type="button"
onclick="
document.getElementById('answer-a3417d87-b3af-44d3-bc1d-564a7bce55f1').style.display = 'inline-block';
document.getElementById('button-a3417d87-b3af-44d3-bc1d-564a7bce55f1').style.display = 'none'
document.getElementById('answer-946bb26d-5f01-4dad-a57e-fdf851334d64').style.display = 'inline-block';
document.getElementById('button-946bb26d-5f01-4dad-a57e-fdf851334d64').style.display = 'none'
"
>
Show Answer
Expand All @@ -531,13 +531,13 @@ <h3 class="subproblem-id">Part 2)</h3>
<p>Using the same histogram estimator, what is the estimate <span class="math">\(\hat\pr(Y = 1 \given x = 0.35)\)</span>?</p>
<p>
<span class="inline-response-box">
<span id="answer-a2c193fa-0417-4d93-ad3c-303c4a97f290" style="display: none">3/5 = 0.6</span>
<span id="button-a2c193fa-0417-4d93-ad3c-303c4a97f290">
<span id="answer-a0b5f194-c8f1-4a5c-aefc-07359fb8f395" style="display: none">3/5 = 0.6</span>
<span id="button-a0b5f194-c8f1-4a5c-aefc-07359fb8f395">
<button
type="button"
onclick="
document.getElementById('answer-a2c193fa-0417-4d93-ad3c-303c4a97f290').style.display = 'inline-block';
document.getElementById('button-a2c193fa-0417-4d93-ad3c-303c4a97f290').style.display = 'none'
document.getElementById('answer-a0b5f194-c8f1-4a5c-aefc-07359fb8f395').style.display = 'inline-block';
document.getElementById('button-a0b5f194-c8f1-4a5c-aefc-07359fb8f395').style.display = 'none'
"
>
Show Answer
Expand All @@ -552,13 +552,13 @@ <h3 class="subproblem-id">Part 3)</h3>
<p>What is the estimate of the marginal density of <span class="math">\(x\)</span> at <span class="math">\(x = 0.1\)</span>? That is, what is <span class="math">\(\hat p(0.1)\)</span>?</p>
<p>
<span class="inline-response-box">
<span id="answer-c6f276c9-3509-48ad-a977-faab040b006d" style="display: none">7/(19*0.25) = 1.47</span>
<span id="button-c6f276c9-3509-48ad-a977-faab040b006d">
<span id="answer-4042ac24-f230-4b5d-ab31-38c9d0565baa" style="display: none">7/(19*0.25) = 1.47</span>
<span id="button-4042ac24-f230-4b5d-ab31-38c9d0565baa">
<button
type="button"
onclick="
document.getElementById('answer-c6f276c9-3509-48ad-a977-faab040b006d').style.display = 'inline-block';
document.getElementById('button-c6f276c9-3509-48ad-a977-faab040b006d').style.display = 'none'
document.getElementById('answer-4042ac24-f230-4b5d-ab31-38c9d0565baa').style.display = 'inline-block';
document.getElementById('button-4042ac24-f230-4b5d-ab31-38c9d0565baa').style.display = 'none'
"
>
Show Answer
Expand All @@ -575,13 +575,13 @@ <h3 class="subproblem-id">Part 4)</h3>
\]</div>
<p>
<span class="inline-response-box">
<span id="answer-e3b8fa0e-0626-456b-8083-82684df48e88" style="display: none">1</span>
<span id="button-e3b8fa0e-0626-456b-8083-82684df48e88">
<span id="answer-40e38484-8ef9-4eb3-94f6-a320786b11f8" style="display: none">1</span>
<span id="button-40e38484-8ef9-4eb3-94f6-a320786b11f8">
<button
type="button"
onclick="
document.getElementById('answer-e3b8fa0e-0626-456b-8083-82684df48e88').style.display = 'inline-block';
document.getElementById('button-e3b8fa0e-0626-456b-8083-82684df48e88').style.display = 'none'
document.getElementById('answer-40e38484-8ef9-4eb3-94f6-a320786b11f8').style.display = 'inline-block';
document.getElementById('button-40e38484-8ef9-4eb3-94f6-a320786b11f8').style.display = 'none'
"
>
Show Answer
Expand Down
Loading

0 comments on commit 4a75702

Please sign in to comment.