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 b3230b8 commit 679603c
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-03a05001-f579-440a-a17c-a3b5d065d5d7" style="display: none">8</span>
<span id="button-03a05001-f579-440a-a17c-a3b5d065d5d7">
<span id="answer-830c4ff8-6f66-454a-99e7-a1abb04f0ffc" style="display: none">8</span>
<span id="button-830c4ff8-6f66-454a-99e7-a1abb04f0ffc">
<button
type="button"
onclick="
document.getElementById('answer-03a05001-f579-440a-a17c-a3b5d065d5d7').style.display = 'inline-block';
document.getElementById('button-03a05001-f579-440a-a17c-a3b5d065d5d7').style.display = 'none'
document.getElementById('answer-830c4ff8-6f66-454a-99e7-a1abb04f0ffc').style.display = 'inline-block';
document.getElementById('button-830c4ff8-6f66-454a-99e7-a1abb04f0ffc').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-c2549aff-d001-4fa2-8746-0ac0e2c96643" style="display: none">8</span>
<span id="button-c2549aff-d001-4fa2-8746-0ac0e2c96643">
<span id="answer-b98815dd-9007-4048-8864-dd692ea090c1" style="display: none">8</span>
<span id="button-b98815dd-9007-4048-8864-dd692ea090c1">
<button
type="button"
onclick="
document.getElementById('answer-c2549aff-d001-4fa2-8746-0ac0e2c96643').style.display = 'inline-block';
document.getElementById('button-c2549aff-d001-4fa2-8746-0ac0e2c96643').style.display = 'none'
document.getElementById('answer-b98815dd-9007-4048-8864-dd692ea090c1').style.display = 'inline-block';
document.getElementById('button-b98815dd-9007-4048-8864-dd692ea090c1').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-bd1de0c0-0467-46e8-b96e-29d3b026d287" style="display: none"><span class="math">\((3, 0, \frac{1}{4})^T\)</span></span>
<span id="button-bd1de0c0-0467-46e8-b96e-29d3b026d287">
<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">
<button
type="button"
onclick="
document.getElementById('answer-bd1de0c0-0467-46e8-b96e-29d3b026d287').style.display = 'inline-block';
document.getElementById('button-bd1de0c0-0467-46e8-b96e-29d3b026d287').style.display = 'none'
document.getElementById('answer-2e4ba570-9c4e-42f2-9230-bf6fedaf8eae').style.display = 'inline-block';
document.getElementById('button-2e4ba570-9c4e-42f2-9230-bf6fedaf8eae').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-0c84258b-2897-4343-b529-2cf388ecbabd" style="display: none">0.25</span>
<span id="button-0c84258b-2897-4343-b529-2cf388ecbabd">
<span id="answer-701782c7-f3b3-495b-87ec-900f221470e2" style="display: none">0.25</span>
<span id="button-701782c7-f3b3-495b-87ec-900f221470e2">
<button
type="button"
onclick="
document.getElementById('answer-0c84258b-2897-4343-b529-2cf388ecbabd').style.display = 'inline-block';
document.getElementById('button-0c84258b-2897-4343-b529-2cf388ecbabd').style.display = 'none'
document.getElementById('answer-701782c7-f3b3-495b-87ec-900f221470e2').style.display = 'inline-block';
document.getElementById('button-701782c7-f3b3-495b-87ec-900f221470e2').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-a7a6ede2-4c23-4016-ba85-58c3688dd24b" style="display: none">0.29</span>
<span id="button-a7a6ede2-4c23-4016-ba85-58c3688dd24b">
<span id="answer-33092dc4-7429-4c0b-9791-e3449feee9cf" style="display: none">0.29</span>
<span id="button-33092dc4-7429-4c0b-9791-e3449feee9cf">
<button
type="button"
onclick="
document.getElementById('answer-a7a6ede2-4c23-4016-ba85-58c3688dd24b').style.display = 'inline-block';
document.getElementById('button-a7a6ede2-4c23-4016-ba85-58c3688dd24b').style.display = 'none'
document.getElementById('answer-33092dc4-7429-4c0b-9791-e3449feee9cf').style.display = 'inline-block';
document.getElementById('button-33092dc4-7429-4c0b-9791-e3449feee9cf').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-eb56582a-443c-4104-bb88-242a73b239fc" style="display: none">0.6</span>
<span id="button-eb56582a-443c-4104-bb88-242a73b239fc">
<span id="answer-f59d0edf-5b12-4372-8fc1-ce35598946b5" style="display: none">0.6</span>
<span id="button-f59d0edf-5b12-4372-8fc1-ce35598946b5">
<button
type="button"
onclick="
document.getElementById('answer-eb56582a-443c-4104-bb88-242a73b239fc').style.display = 'inline-block';
document.getElementById('button-eb56582a-443c-4104-bb88-242a73b239fc').style.display = 'none'
document.getElementById('answer-f59d0edf-5b12-4372-8fc1-ce35598946b5').style.display = 'inline-block';
document.getElementById('button-f59d0edf-5b12-4372-8fc1-ce35598946b5').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-4f75bef5-eb2f-475f-9c87-7bfa0aee525d" style="display: none">0.30</span>
<span id="button-4f75bef5-eb2f-475f-9c87-7bfa0aee525d">
<span id="answer-03273e93-2c8b-4392-840f-0d86f4c04413" style="display: none">0.30</span>
<span id="button-03273e93-2c8b-4392-840f-0d86f4c04413">
<button
type="button"
onclick="
document.getElementById('answer-4f75bef5-eb2f-475f-9c87-7bfa0aee525d').style.display = 'inline-block';
document.getElementById('button-4f75bef5-eb2f-475f-9c87-7bfa0aee525d').style.display = 'none'
document.getElementById('answer-03273e93-2c8b-4392-840f-0d86f4c04413').style.display = 'inline-block';
document.getElementById('button-03273e93-2c8b-4392-840f-0d86f4c04413').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-7143ffab-e63c-4b89-87b2-bc7657d3e7ea" style="display: none">0.27</span>
<span id="button-7143ffab-e63c-4b89-87b2-bc7657d3e7ea">
<span id="answer-66201ab0-71d6-4fdd-8a3c-0190b6490479" style="display: none">0.27</span>
<span id="button-66201ab0-71d6-4fdd-8a3c-0190b6490479">
<button
type="button"
onclick="
document.getElementById('answer-7143ffab-e63c-4b89-87b2-bc7657d3e7ea').style.display = 'inline-block';
document.getElementById('button-7143ffab-e63c-4b89-87b2-bc7657d3e7ea').style.display = 'none'
document.getElementById('answer-66201ab0-71d6-4fdd-8a3c-0190b6490479').style.display = 'inline-block';
document.getElementById('button-66201ab0-71d6-4fdd-8a3c-0190b6490479').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-364fd8a4-9ffc-433c-a88b-bb43782529d6" style="display: none">0.3</span>
<span id="button-364fd8a4-9ffc-433c-a88b-bb43782529d6">
<span id="answer-51bc10a3-7414-49cf-84bd-5fa2d02061ad" style="display: none">0.3</span>
<span id="button-51bc10a3-7414-49cf-84bd-5fa2d02061ad">
<button
type="button"
onclick="
document.getElementById('answer-364fd8a4-9ffc-433c-a88b-bb43782529d6').style.display = 'inline-block';
document.getElementById('button-364fd8a4-9ffc-433c-a88b-bb43782529d6').style.display = 'none'
document.getElementById('answer-51bc10a3-7414-49cf-84bd-5fa2d02061ad').style.display = 'inline-block';
document.getElementById('button-51bc10a3-7414-49cf-84bd-5fa2d02061ad').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-1a793f60-d507-4cce-95ba-9ebb513695e1" style="display: none">0.25</span>
<span id="button-1a793f60-d507-4cce-95ba-9ebb513695e1">
<span id="answer-b3f27390-7929-4342-b3af-1632331d829d" style="display: none">0.25</span>
<span id="button-b3f27390-7929-4342-b3af-1632331d829d">
<button
type="button"
onclick="
document.getElementById('answer-1a793f60-d507-4cce-95ba-9ebb513695e1').style.display = 'inline-block';
document.getElementById('button-1a793f60-d507-4cce-95ba-9ebb513695e1').style.display = 'none'
document.getElementById('answer-b3f27390-7929-4342-b3af-1632331d829d').style.display = 'inline-block';
document.getElementById('button-b3f27390-7929-4342-b3af-1632331d829d').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-9a1bf012-d3bc-4ff8-abd0-30dca9fba1f5" style="display: none">0.34</span>
<span id="button-9a1bf012-d3bc-4ff8-abd0-30dca9fba1f5">
<span id="answer-f9ef2334-e65c-4db8-bc30-0581f834ada3" style="display: none">0.34</span>
<span id="button-f9ef2334-e65c-4db8-bc30-0581f834ada3">
<button
type="button"
onclick="
document.getElementById('answer-9a1bf012-d3bc-4ff8-abd0-30dca9fba1f5').style.display = 'inline-block';
document.getElementById('button-9a1bf012-d3bc-4ff8-abd0-30dca9fba1f5').style.display = 'none'
document.getElementById('answer-f9ef2334-e65c-4db8-bc30-0581f834ada3').style.display = 'inline-block';
document.getElementById('button-f9ef2334-e65c-4db8-bc30-0581f834ada3').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-a3b61af5-738a-4d73-a4c4-3857da14ab2b" style="display: none">0.28</span>
<span id="button-a3b61af5-738a-4d73-a4c4-3857da14ab2b">
<span id="answer-0c8b5c0c-7999-4179-af52-555a81ff74e8" style="display: none">0.28</span>
<span id="button-0c8b5c0c-7999-4179-af52-555a81ff74e8">
<button
type="button"
onclick="
document.getElementById('answer-a3b61af5-738a-4d73-a4c4-3857da14ab2b').style.display = 'inline-block';
document.getElementById('button-a3b61af5-738a-4d73-a4c4-3857da14ab2b').style.display = 'none'
document.getElementById('answer-0c8b5c0c-7999-4179-af52-555a81ff74e8').style.display = 'inline-block';
document.getElementById('button-0c8b5c0c-7999-4179-af52-555a81ff74e8').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-34ef9c50-7fe8-4f33-8550-ed2ae0d2a36d" style="display: none">5/3</span>
<span id="button-34ef9c50-7fe8-4f33-8550-ed2ae0d2a36d">
<span id="answer-4bfa83ce-f250-432c-8ab6-41efe40fb4d0" style="display: none">5/3</span>
<span id="button-4bfa83ce-f250-432c-8ab6-41efe40fb4d0">
<button
type="button"
onclick="
document.getElementById('answer-34ef9c50-7fe8-4f33-8550-ed2ae0d2a36d').style.display = 'inline-block';
document.getElementById('button-34ef9c50-7fe8-4f33-8550-ed2ae0d2a36d').style.display = 'none'
document.getElementById('answer-4bfa83ce-f250-432c-8ab6-41efe40fb4d0').style.display = 'inline-block';
document.getElementById('button-4bfa83ce-f250-432c-8ab6-41efe40fb4d0').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-b8276926-ceda-488a-8687-0710d5605d49" style="display: none">3/5 = 0.6</span>
<span id="button-b8276926-ceda-488a-8687-0710d5605d49">
<span id="answer-111e86ee-72d7-4f89-97aa-1b32f8cb9025" style="display: none">3/5 = 0.6</span>
<span id="button-111e86ee-72d7-4f89-97aa-1b32f8cb9025">
<button
type="button"
onclick="
document.getElementById('answer-b8276926-ceda-488a-8687-0710d5605d49').style.display = 'inline-block';
document.getElementById('button-b8276926-ceda-488a-8687-0710d5605d49').style.display = 'none'
document.getElementById('answer-111e86ee-72d7-4f89-97aa-1b32f8cb9025').style.display = 'inline-block';
document.getElementById('button-111e86ee-72d7-4f89-97aa-1b32f8cb9025').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-bf2f0035-6f29-45f0-ae45-4b292b281924" style="display: none">7/(19*0.25) = 1.47</span>
<span id="button-bf2f0035-6f29-45f0-ae45-4b292b281924">
<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">
<button
type="button"
onclick="
document.getElementById('answer-bf2f0035-6f29-45f0-ae45-4b292b281924').style.display = 'inline-block';
document.getElementById('button-bf2f0035-6f29-45f0-ae45-4b292b281924').style.display = 'none'
document.getElementById('answer-34a30431-ba50-408b-ab69-9a1b777fd436').style.display = 'inline-block';
document.getElementById('button-34a30431-ba50-408b-ab69-9a1b777fd436').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-e975a472-67ce-4557-a0b5-7cbac35a5db6" style="display: none">1</span>
<span id="button-e975a472-67ce-4557-a0b5-7cbac35a5db6">
<span id="answer-57f2ffc9-3681-43b8-9800-5fad69ca9bff" style="display: none">1</span>
<span id="button-57f2ffc9-3681-43b8-9800-5fad69ca9bff">
<button
type="button"
onclick="
document.getElementById('answer-e975a472-67ce-4557-a0b5-7cbac35a5db6').style.display = 'inline-block';
document.getElementById('button-e975a472-67ce-4557-a0b5-7cbac35a5db6').style.display = 'none'
document.getElementById('answer-57f2ffc9-3681-43b8-9800-5fad69ca9bff').style.display = 'inline-block';
document.getElementById('button-57f2ffc9-3681-43b8-9800-5fad69ca9bff').style.display = 'none'
"
>
Show Answer
Expand Down
Loading

0 comments on commit 679603c

Please sign in to comment.