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 09ba2e1 commit a5205c2
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-6aebab74-dbbe-41c5-9732-7bf282faa81d" style="display: none">8</span>
<span id="button-6aebab74-dbbe-41c5-9732-7bf282faa81d">
<span id="answer-134d4d62-8265-425e-81f0-558ca4565963" style="display: none">8</span>
<span id="button-134d4d62-8265-425e-81f0-558ca4565963">
<button
type="button"
onclick="
document.getElementById('answer-6aebab74-dbbe-41c5-9732-7bf282faa81d').style.display = 'inline-block';
document.getElementById('button-6aebab74-dbbe-41c5-9732-7bf282faa81d').style.display = 'none'
document.getElementById('answer-134d4d62-8265-425e-81f0-558ca4565963').style.display = 'inline-block';
document.getElementById('button-134d4d62-8265-425e-81f0-558ca4565963').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-20c92cf0-8049-4cf5-acf0-76405341103b" style="display: none">8</span>
<span id="button-20c92cf0-8049-4cf5-acf0-76405341103b">
<span id="answer-66fcba8a-9b50-45da-bc12-c3df1e01b730" style="display: none">8</span>
<span id="button-66fcba8a-9b50-45da-bc12-c3df1e01b730">
<button
type="button"
onclick="
document.getElementById('answer-20c92cf0-8049-4cf5-acf0-76405341103b').style.display = 'inline-block';
document.getElementById('button-20c92cf0-8049-4cf5-acf0-76405341103b').style.display = 'none'
document.getElementById('answer-66fcba8a-9b50-45da-bc12-c3df1e01b730').style.display = 'inline-block';
document.getElementById('button-66fcba8a-9b50-45da-bc12-c3df1e01b730').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-0b59a810-d24b-4e62-87cb-9959bc8c6bc9" style="display: none"><span class="math">\((3, 0, \frac{1}{4})^T\)</span></span>
<span id="button-0b59a810-d24b-4e62-87cb-9959bc8c6bc9">
<span id="answer-6aef70eb-5cbb-46ca-ac44-792b226ae158" style="display: none"><span class="math">\((3, 0, \frac{1}{4})^T\)</span></span>
<span id="button-6aef70eb-5cbb-46ca-ac44-792b226ae158">
<button
type="button"
onclick="
document.getElementById('answer-0b59a810-d24b-4e62-87cb-9959bc8c6bc9').style.display = 'inline-block';
document.getElementById('button-0b59a810-d24b-4e62-87cb-9959bc8c6bc9').style.display = 'none'
document.getElementById('answer-6aef70eb-5cbb-46ca-ac44-792b226ae158').style.display = 'inline-block';
document.getElementById('button-6aef70eb-5cbb-46ca-ac44-792b226ae158').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-eeffe83e-49ed-4c5f-9e69-f3bf848c7b69" style="display: none">0.25</span>
<span id="button-eeffe83e-49ed-4c5f-9e69-f3bf848c7b69">
<span id="answer-45ce7b6b-ee5c-44e4-aaa5-5bab848a03e6" style="display: none">0.25</span>
<span id="button-45ce7b6b-ee5c-44e4-aaa5-5bab848a03e6">
<button
type="button"
onclick="
document.getElementById('answer-eeffe83e-49ed-4c5f-9e69-f3bf848c7b69').style.display = 'inline-block';
document.getElementById('button-eeffe83e-49ed-4c5f-9e69-f3bf848c7b69').style.display = 'none'
document.getElementById('answer-45ce7b6b-ee5c-44e4-aaa5-5bab848a03e6').style.display = 'inline-block';
document.getElementById('button-45ce7b6b-ee5c-44e4-aaa5-5bab848a03e6').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-ea0e348f-660e-44ab-a6f2-e01bd6580033" style="display: none">0.29</span>
<span id="button-ea0e348f-660e-44ab-a6f2-e01bd6580033">
<span id="answer-6f6c9706-0f49-4833-8423-7266e10b59ee" style="display: none">0.29</span>
<span id="button-6f6c9706-0f49-4833-8423-7266e10b59ee">
<button
type="button"
onclick="
document.getElementById('answer-ea0e348f-660e-44ab-a6f2-e01bd6580033').style.display = 'inline-block';
document.getElementById('button-ea0e348f-660e-44ab-a6f2-e01bd6580033').style.display = 'none'
document.getElementById('answer-6f6c9706-0f49-4833-8423-7266e10b59ee').style.display = 'inline-block';
document.getElementById('button-6f6c9706-0f49-4833-8423-7266e10b59ee').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-72b26f13-2da0-418c-9d18-49d5aeddc7e2" style="display: none">0.6</span>
<span id="button-72b26f13-2da0-418c-9d18-49d5aeddc7e2">
<span id="answer-a28dfbc5-4894-4103-becf-5aa0399dd1a8" style="display: none">0.6</span>
<span id="button-a28dfbc5-4894-4103-becf-5aa0399dd1a8">
<button
type="button"
onclick="
document.getElementById('answer-72b26f13-2da0-418c-9d18-49d5aeddc7e2').style.display = 'inline-block';
document.getElementById('button-72b26f13-2da0-418c-9d18-49d5aeddc7e2').style.display = 'none'
document.getElementById('answer-a28dfbc5-4894-4103-becf-5aa0399dd1a8').style.display = 'inline-block';
document.getElementById('button-a28dfbc5-4894-4103-becf-5aa0399dd1a8').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-09019431-0da2-4d39-8991-19b8a688b3c4" style="display: none">0.30</span>
<span id="button-09019431-0da2-4d39-8991-19b8a688b3c4">
<span id="answer-66608acd-91b1-4894-afba-69a95962a6d0" style="display: none">0.30</span>
<span id="button-66608acd-91b1-4894-afba-69a95962a6d0">
<button
type="button"
onclick="
document.getElementById('answer-09019431-0da2-4d39-8991-19b8a688b3c4').style.display = 'inline-block';
document.getElementById('button-09019431-0da2-4d39-8991-19b8a688b3c4').style.display = 'none'
document.getElementById('answer-66608acd-91b1-4894-afba-69a95962a6d0').style.display = 'inline-block';
document.getElementById('button-66608acd-91b1-4894-afba-69a95962a6d0').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-815c0e09-8125-42cb-94fe-21e9e956443e" style="display: none">0.27</span>
<span id="button-815c0e09-8125-42cb-94fe-21e9e956443e">
<span id="answer-54ba0942-5728-4374-a98c-9d6741fdd975" style="display: none">0.27</span>
<span id="button-54ba0942-5728-4374-a98c-9d6741fdd975">
<button
type="button"
onclick="
document.getElementById('answer-815c0e09-8125-42cb-94fe-21e9e956443e').style.display = 'inline-block';
document.getElementById('button-815c0e09-8125-42cb-94fe-21e9e956443e').style.display = 'none'
document.getElementById('answer-54ba0942-5728-4374-a98c-9d6741fdd975').style.display = 'inline-block';
document.getElementById('button-54ba0942-5728-4374-a98c-9d6741fdd975').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-c6616845-b9fa-44b9-a6c5-7b3af4092ad1" style="display: none">0.3</span>
<span id="button-c6616845-b9fa-44b9-a6c5-7b3af4092ad1">
<span id="answer-1c1635de-6089-42cb-bd9e-319723a8cd41" style="display: none">0.3</span>
<span id="button-1c1635de-6089-42cb-bd9e-319723a8cd41">
<button
type="button"
onclick="
document.getElementById('answer-c6616845-b9fa-44b9-a6c5-7b3af4092ad1').style.display = 'inline-block';
document.getElementById('button-c6616845-b9fa-44b9-a6c5-7b3af4092ad1').style.display = 'none'
document.getElementById('answer-1c1635de-6089-42cb-bd9e-319723a8cd41').style.display = 'inline-block';
document.getElementById('button-1c1635de-6089-42cb-bd9e-319723a8cd41').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-c1eaa319-2a32-461b-80f0-2168a3f66140" style="display: none">0.25</span>
<span id="button-c1eaa319-2a32-461b-80f0-2168a3f66140">
<span id="answer-07060954-c88c-44d7-984d-dc4131fb04dc" style="display: none">0.25</span>
<span id="button-07060954-c88c-44d7-984d-dc4131fb04dc">
<button
type="button"
onclick="
document.getElementById('answer-c1eaa319-2a32-461b-80f0-2168a3f66140').style.display = 'inline-block';
document.getElementById('button-c1eaa319-2a32-461b-80f0-2168a3f66140').style.display = 'none'
document.getElementById('answer-07060954-c88c-44d7-984d-dc4131fb04dc').style.display = 'inline-block';
document.getElementById('button-07060954-c88c-44d7-984d-dc4131fb04dc').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-723170b1-1e06-4210-b9a9-86e55f375b3f" style="display: none">0.34</span>
<span id="button-723170b1-1e06-4210-b9a9-86e55f375b3f">
<span id="answer-0c3e8630-28ce-4d68-9847-0df7ae83bbe8" style="display: none">0.34</span>
<span id="button-0c3e8630-28ce-4d68-9847-0df7ae83bbe8">
<button
type="button"
onclick="
document.getElementById('answer-723170b1-1e06-4210-b9a9-86e55f375b3f').style.display = 'inline-block';
document.getElementById('button-723170b1-1e06-4210-b9a9-86e55f375b3f').style.display = 'none'
document.getElementById('answer-0c3e8630-28ce-4d68-9847-0df7ae83bbe8').style.display = 'inline-block';
document.getElementById('button-0c3e8630-28ce-4d68-9847-0df7ae83bbe8').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-12f8e95d-75a4-4b7a-b5c0-a8c9f623ade1" style="display: none">0.28</span>
<span id="button-12f8e95d-75a4-4b7a-b5c0-a8c9f623ade1">
<span id="answer-75bb760c-b13f-4449-8efc-4b6d57e8bce9" style="display: none">0.28</span>
<span id="button-75bb760c-b13f-4449-8efc-4b6d57e8bce9">
<button
type="button"
onclick="
document.getElementById('answer-12f8e95d-75a4-4b7a-b5c0-a8c9f623ade1').style.display = 'inline-block';
document.getElementById('button-12f8e95d-75a4-4b7a-b5c0-a8c9f623ade1').style.display = 'none'
document.getElementById('answer-75bb760c-b13f-4449-8efc-4b6d57e8bce9').style.display = 'inline-block';
document.getElementById('button-75bb760c-b13f-4449-8efc-4b6d57e8bce9').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-0014f67c-78ec-45bc-b4ee-871acfa64071" style="display: none">5/3</span>
<span id="button-0014f67c-78ec-45bc-b4ee-871acfa64071">
<span id="answer-9900fcbe-3fd5-4d62-8948-9018de07606a" style="display: none">5/3</span>
<span id="button-9900fcbe-3fd5-4d62-8948-9018de07606a">
<button
type="button"
onclick="
document.getElementById('answer-0014f67c-78ec-45bc-b4ee-871acfa64071').style.display = 'inline-block';
document.getElementById('button-0014f67c-78ec-45bc-b4ee-871acfa64071').style.display = 'none'
document.getElementById('answer-9900fcbe-3fd5-4d62-8948-9018de07606a').style.display = 'inline-block';
document.getElementById('button-9900fcbe-3fd5-4d62-8948-9018de07606a').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-1b945d7b-7f0d-478a-b4da-5549ff17f6dc" style="display: none">3/5 = 0.6</span>
<span id="button-1b945d7b-7f0d-478a-b4da-5549ff17f6dc">
<span id="answer-20868697-396c-46cd-a93e-15a969179b25" style="display: none">3/5 = 0.6</span>
<span id="button-20868697-396c-46cd-a93e-15a969179b25">
<button
type="button"
onclick="
document.getElementById('answer-1b945d7b-7f0d-478a-b4da-5549ff17f6dc').style.display = 'inline-block';
document.getElementById('button-1b945d7b-7f0d-478a-b4da-5549ff17f6dc').style.display = 'none'
document.getElementById('answer-20868697-396c-46cd-a93e-15a969179b25').style.display = 'inline-block';
document.getElementById('button-20868697-396c-46cd-a93e-15a969179b25').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-e5c03dda-d503-4336-87d8-bb70dee07f33" style="display: none">7/(19*0.25) = 1.47</span>
<span id="button-e5c03dda-d503-4336-87d8-bb70dee07f33">
<span id="answer-f43611b5-f8e3-4584-970e-ca454299a670" style="display: none">7/(19*0.25) = 1.47</span>
<span id="button-f43611b5-f8e3-4584-970e-ca454299a670">
<button
type="button"
onclick="
document.getElementById('answer-e5c03dda-d503-4336-87d8-bb70dee07f33').style.display = 'inline-block';
document.getElementById('button-e5c03dda-d503-4336-87d8-bb70dee07f33').style.display = 'none'
document.getElementById('answer-f43611b5-f8e3-4584-970e-ca454299a670').style.display = 'inline-block';
document.getElementById('button-f43611b5-f8e3-4584-970e-ca454299a670').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-2afb40ff-2071-4c17-beee-5358df5b12a3" style="display: none">1</span>
<span id="button-2afb40ff-2071-4c17-beee-5358df5b12a3">
<span id="answer-ee20ee2a-4008-43af-86ad-744ab01f9b2f" style="display: none">1</span>
<span id="button-ee20ee2a-4008-43af-86ad-744ab01f9b2f">
<button
type="button"
onclick="
document.getElementById('answer-2afb40ff-2071-4c17-beee-5358df5b12a3').style.display = 'inline-block';
document.getElementById('button-2afb40ff-2071-4c17-beee-5358df5b12a3').style.display = 'none'
document.getElementById('answer-ee20ee2a-4008-43af-86ad-744ab01f9b2f').style.display = 'inline-block';
document.getElementById('button-ee20ee2a-4008-43af-86ad-744ab01f9b2f').style.display = 'none'
"
>
Show Answer
Expand Down
Loading

0 comments on commit a5205c2

Please sign in to comment.