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 679603c commit 09ba2e1
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-830c4ff8-6f66-454a-99e7-a1abb04f0ffc" style="display: none">8</span>
<span id="button-830c4ff8-6f66-454a-99e7-a1abb04f0ffc">
<span id="answer-6aebab74-dbbe-41c5-9732-7bf282faa81d" style="display: none">8</span>
<span id="button-6aebab74-dbbe-41c5-9732-7bf282faa81d">
<button
type="button"
onclick="
document.getElementById('answer-830c4ff8-6f66-454a-99e7-a1abb04f0ffc').style.display = 'inline-block';
document.getElementById('button-830c4ff8-6f66-454a-99e7-a1abb04f0ffc').style.display = 'none'
document.getElementById('answer-6aebab74-dbbe-41c5-9732-7bf282faa81d').style.display = 'inline-block';
document.getElementById('button-6aebab74-dbbe-41c5-9732-7bf282faa81d').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-b98815dd-9007-4048-8864-dd692ea090c1" style="display: none">8</span>
<span id="button-b98815dd-9007-4048-8864-dd692ea090c1">
<span id="answer-20c92cf0-8049-4cf5-acf0-76405341103b" style="display: none">8</span>
<span id="button-20c92cf0-8049-4cf5-acf0-76405341103b">
<button
type="button"
onclick="
document.getElementById('answer-b98815dd-9007-4048-8864-dd692ea090c1').style.display = 'inline-block';
document.getElementById('button-b98815dd-9007-4048-8864-dd692ea090c1').style.display = 'none'
document.getElementById('answer-20c92cf0-8049-4cf5-acf0-76405341103b').style.display = 'inline-block';
document.getElementById('button-20c92cf0-8049-4cf5-acf0-76405341103b').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-2e4ba570-9c4e-42f2-9230-bf6fedaf8eae" style="display: none"><span class="math">\((3, 0, \frac{1}{4})^T\)</span></span>
<span id="button-2e4ba570-9c4e-42f2-9230-bf6fedaf8eae">
<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">
<button
type="button"
onclick="
document.getElementById('answer-2e4ba570-9c4e-42f2-9230-bf6fedaf8eae').style.display = 'inline-block';
document.getElementById('button-2e4ba570-9c4e-42f2-9230-bf6fedaf8eae').style.display = 'none'
document.getElementById('answer-0b59a810-d24b-4e62-87cb-9959bc8c6bc9').style.display = 'inline-block';
document.getElementById('button-0b59a810-d24b-4e62-87cb-9959bc8c6bc9').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-701782c7-f3b3-495b-87ec-900f221470e2" style="display: none">0.25</span>
<span id="button-701782c7-f3b3-495b-87ec-900f221470e2">
<span id="answer-eeffe83e-49ed-4c5f-9e69-f3bf848c7b69" style="display: none">0.25</span>
<span id="button-eeffe83e-49ed-4c5f-9e69-f3bf848c7b69">
<button
type="button"
onclick="
document.getElementById('answer-701782c7-f3b3-495b-87ec-900f221470e2').style.display = 'inline-block';
document.getElementById('button-701782c7-f3b3-495b-87ec-900f221470e2').style.display = 'none'
document.getElementById('answer-eeffe83e-49ed-4c5f-9e69-f3bf848c7b69').style.display = 'inline-block';
document.getElementById('button-eeffe83e-49ed-4c5f-9e69-f3bf848c7b69').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-33092dc4-7429-4c0b-9791-e3449feee9cf" style="display: none">0.29</span>
<span id="button-33092dc4-7429-4c0b-9791-e3449feee9cf">
<span id="answer-ea0e348f-660e-44ab-a6f2-e01bd6580033" style="display: none">0.29</span>
<span id="button-ea0e348f-660e-44ab-a6f2-e01bd6580033">
<button
type="button"
onclick="
document.getElementById('answer-33092dc4-7429-4c0b-9791-e3449feee9cf').style.display = 'inline-block';
document.getElementById('button-33092dc4-7429-4c0b-9791-e3449feee9cf').style.display = 'none'
document.getElementById('answer-ea0e348f-660e-44ab-a6f2-e01bd6580033').style.display = 'inline-block';
document.getElementById('button-ea0e348f-660e-44ab-a6f2-e01bd6580033').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-f59d0edf-5b12-4372-8fc1-ce35598946b5" style="display: none">0.6</span>
<span id="button-f59d0edf-5b12-4372-8fc1-ce35598946b5">
<span id="answer-72b26f13-2da0-418c-9d18-49d5aeddc7e2" style="display: none">0.6</span>
<span id="button-72b26f13-2da0-418c-9d18-49d5aeddc7e2">
<button
type="button"
onclick="
document.getElementById('answer-f59d0edf-5b12-4372-8fc1-ce35598946b5').style.display = 'inline-block';
document.getElementById('button-f59d0edf-5b12-4372-8fc1-ce35598946b5').style.display = 'none'
document.getElementById('answer-72b26f13-2da0-418c-9d18-49d5aeddc7e2').style.display = 'inline-block';
document.getElementById('button-72b26f13-2da0-418c-9d18-49d5aeddc7e2').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-03273e93-2c8b-4392-840f-0d86f4c04413" style="display: none">0.30</span>
<span id="button-03273e93-2c8b-4392-840f-0d86f4c04413">
<span id="answer-09019431-0da2-4d39-8991-19b8a688b3c4" style="display: none">0.30</span>
<span id="button-09019431-0da2-4d39-8991-19b8a688b3c4">
<button
type="button"
onclick="
document.getElementById('answer-03273e93-2c8b-4392-840f-0d86f4c04413').style.display = 'inline-block';
document.getElementById('button-03273e93-2c8b-4392-840f-0d86f4c04413').style.display = 'none'
document.getElementById('answer-09019431-0da2-4d39-8991-19b8a688b3c4').style.display = 'inline-block';
document.getElementById('button-09019431-0da2-4d39-8991-19b8a688b3c4').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-66201ab0-71d6-4fdd-8a3c-0190b6490479" style="display: none">0.27</span>
<span id="button-66201ab0-71d6-4fdd-8a3c-0190b6490479">
<span id="answer-815c0e09-8125-42cb-94fe-21e9e956443e" style="display: none">0.27</span>
<span id="button-815c0e09-8125-42cb-94fe-21e9e956443e">
<button
type="button"
onclick="
document.getElementById('answer-66201ab0-71d6-4fdd-8a3c-0190b6490479').style.display = 'inline-block';
document.getElementById('button-66201ab0-71d6-4fdd-8a3c-0190b6490479').style.display = 'none'
document.getElementById('answer-815c0e09-8125-42cb-94fe-21e9e956443e').style.display = 'inline-block';
document.getElementById('button-815c0e09-8125-42cb-94fe-21e9e956443e').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-51bc10a3-7414-49cf-84bd-5fa2d02061ad" style="display: none">0.3</span>
<span id="button-51bc10a3-7414-49cf-84bd-5fa2d02061ad">
<span id="answer-c6616845-b9fa-44b9-a6c5-7b3af4092ad1" style="display: none">0.3</span>
<span id="button-c6616845-b9fa-44b9-a6c5-7b3af4092ad1">
<button
type="button"
onclick="
document.getElementById('answer-51bc10a3-7414-49cf-84bd-5fa2d02061ad').style.display = 'inline-block';
document.getElementById('button-51bc10a3-7414-49cf-84bd-5fa2d02061ad').style.display = 'none'
document.getElementById('answer-c6616845-b9fa-44b9-a6c5-7b3af4092ad1').style.display = 'inline-block';
document.getElementById('button-c6616845-b9fa-44b9-a6c5-7b3af4092ad1').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-b3f27390-7929-4342-b3af-1632331d829d" style="display: none">0.25</span>
<span id="button-b3f27390-7929-4342-b3af-1632331d829d">
<span id="answer-c1eaa319-2a32-461b-80f0-2168a3f66140" style="display: none">0.25</span>
<span id="button-c1eaa319-2a32-461b-80f0-2168a3f66140">
<button
type="button"
onclick="
document.getElementById('answer-b3f27390-7929-4342-b3af-1632331d829d').style.display = 'inline-block';
document.getElementById('button-b3f27390-7929-4342-b3af-1632331d829d').style.display = 'none'
document.getElementById('answer-c1eaa319-2a32-461b-80f0-2168a3f66140').style.display = 'inline-block';
document.getElementById('button-c1eaa319-2a32-461b-80f0-2168a3f66140').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-f9ef2334-e65c-4db8-bc30-0581f834ada3" style="display: none">0.34</span>
<span id="button-f9ef2334-e65c-4db8-bc30-0581f834ada3">
<span id="answer-723170b1-1e06-4210-b9a9-86e55f375b3f" style="display: none">0.34</span>
<span id="button-723170b1-1e06-4210-b9a9-86e55f375b3f">
<button
type="button"
onclick="
document.getElementById('answer-f9ef2334-e65c-4db8-bc30-0581f834ada3').style.display = 'inline-block';
document.getElementById('button-f9ef2334-e65c-4db8-bc30-0581f834ada3').style.display = 'none'
document.getElementById('answer-723170b1-1e06-4210-b9a9-86e55f375b3f').style.display = 'inline-block';
document.getElementById('button-723170b1-1e06-4210-b9a9-86e55f375b3f').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-0c8b5c0c-7999-4179-af52-555a81ff74e8" style="display: none">0.28</span>
<span id="button-0c8b5c0c-7999-4179-af52-555a81ff74e8">
<span id="answer-12f8e95d-75a4-4b7a-b5c0-a8c9f623ade1" style="display: none">0.28</span>
<span id="button-12f8e95d-75a4-4b7a-b5c0-a8c9f623ade1">
<button
type="button"
onclick="
document.getElementById('answer-0c8b5c0c-7999-4179-af52-555a81ff74e8').style.display = 'inline-block';
document.getElementById('button-0c8b5c0c-7999-4179-af52-555a81ff74e8').style.display = 'none'
document.getElementById('answer-12f8e95d-75a4-4b7a-b5c0-a8c9f623ade1').style.display = 'inline-block';
document.getElementById('button-12f8e95d-75a4-4b7a-b5c0-a8c9f623ade1').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-4bfa83ce-f250-432c-8ab6-41efe40fb4d0" style="display: none">5/3</span>
<span id="button-4bfa83ce-f250-432c-8ab6-41efe40fb4d0">
<span id="answer-0014f67c-78ec-45bc-b4ee-871acfa64071" style="display: none">5/3</span>
<span id="button-0014f67c-78ec-45bc-b4ee-871acfa64071">
<button
type="button"
onclick="
document.getElementById('answer-4bfa83ce-f250-432c-8ab6-41efe40fb4d0').style.display = 'inline-block';
document.getElementById('button-4bfa83ce-f250-432c-8ab6-41efe40fb4d0').style.display = 'none'
document.getElementById('answer-0014f67c-78ec-45bc-b4ee-871acfa64071').style.display = 'inline-block';
document.getElementById('button-0014f67c-78ec-45bc-b4ee-871acfa64071').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-111e86ee-72d7-4f89-97aa-1b32f8cb9025" style="display: none">3/5 = 0.6</span>
<span id="button-111e86ee-72d7-4f89-97aa-1b32f8cb9025">
<span id="answer-1b945d7b-7f0d-478a-b4da-5549ff17f6dc" style="display: none">3/5 = 0.6</span>
<span id="button-1b945d7b-7f0d-478a-b4da-5549ff17f6dc">
<button
type="button"
onclick="
document.getElementById('answer-111e86ee-72d7-4f89-97aa-1b32f8cb9025').style.display = 'inline-block';
document.getElementById('button-111e86ee-72d7-4f89-97aa-1b32f8cb9025').style.display = 'none'
document.getElementById('answer-1b945d7b-7f0d-478a-b4da-5549ff17f6dc').style.display = 'inline-block';
document.getElementById('button-1b945d7b-7f0d-478a-b4da-5549ff17f6dc').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-34a30431-ba50-408b-ab69-9a1b777fd436" style="display: none">7/(19*0.25) = 1.47</span>
<span id="button-34a30431-ba50-408b-ab69-9a1b777fd436">
<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">
<button
type="button"
onclick="
document.getElementById('answer-34a30431-ba50-408b-ab69-9a1b777fd436').style.display = 'inline-block';
document.getElementById('button-34a30431-ba50-408b-ab69-9a1b777fd436').style.display = 'none'
document.getElementById('answer-e5c03dda-d503-4336-87d8-bb70dee07f33').style.display = 'inline-block';
document.getElementById('button-e5c03dda-d503-4336-87d8-bb70dee07f33').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-57f2ffc9-3681-43b8-9800-5fad69ca9bff" style="display: none">1</span>
<span id="button-57f2ffc9-3681-43b8-9800-5fad69ca9bff">
<span id="answer-2afb40ff-2071-4c17-beee-5358df5b12a3" style="display: none">1</span>
<span id="button-2afb40ff-2071-4c17-beee-5358df5b12a3">
<button
type="button"
onclick="
document.getElementById('answer-57f2ffc9-3681-43b8-9800-5fad69ca9bff').style.display = 'inline-block';
document.getElementById('button-57f2ffc9-3681-43b8-9800-5fad69ca9bff').style.display = 'none'
document.getElementById('answer-2afb40ff-2071-4c17-beee-5358df5b12a3').style.display = 'inline-block';
document.getElementById('button-2afb40ff-2071-4c17-beee-5358df5b12a3').style.display = 'none'
"
>
Show Answer
Expand Down
Loading

0 comments on commit 09ba2e1

Please sign in to comment.