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 9edf70b commit b3230b8
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-b3b2563e-19b8-4910-9d86-9c7347bfdf32" style="display: none">8</span>
<span id="button-b3b2563e-19b8-4910-9d86-9c7347bfdf32">
<span id="answer-03a05001-f579-440a-a17c-a3b5d065d5d7" style="display: none">8</span>
<span id="button-03a05001-f579-440a-a17c-a3b5d065d5d7">
<button
type="button"
onclick="
document.getElementById('answer-b3b2563e-19b8-4910-9d86-9c7347bfdf32').style.display = 'inline-block';
document.getElementById('button-b3b2563e-19b8-4910-9d86-9c7347bfdf32').style.display = 'none'
document.getElementById('answer-03a05001-f579-440a-a17c-a3b5d065d5d7').style.display = 'inline-block';
document.getElementById('button-03a05001-f579-440a-a17c-a3b5d065d5d7').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-e91d5f5d-a9e8-4c4d-bd76-7d92c3d6cb5c" style="display: none">8</span>
<span id="button-e91d5f5d-a9e8-4c4d-bd76-7d92c3d6cb5c">
<span id="answer-c2549aff-d001-4fa2-8746-0ac0e2c96643" style="display: none">8</span>
<span id="button-c2549aff-d001-4fa2-8746-0ac0e2c96643">
<button
type="button"
onclick="
document.getElementById('answer-e91d5f5d-a9e8-4c4d-bd76-7d92c3d6cb5c').style.display = 'inline-block';
document.getElementById('button-e91d5f5d-a9e8-4c4d-bd76-7d92c3d6cb5c').style.display = 'none'
document.getElementById('answer-c2549aff-d001-4fa2-8746-0ac0e2c96643').style.display = 'inline-block';
document.getElementById('button-c2549aff-d001-4fa2-8746-0ac0e2c96643').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-7bbba19b-9c18-4274-bd74-b388af91e4a3" style="display: none"><span class="math">\((3, 0, \frac{1}{4})^T\)</span></span>
<span id="button-7bbba19b-9c18-4274-bd74-b388af91e4a3">
<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">
<button
type="button"
onclick="
document.getElementById('answer-7bbba19b-9c18-4274-bd74-b388af91e4a3').style.display = 'inline-block';
document.getElementById('button-7bbba19b-9c18-4274-bd74-b388af91e4a3').style.display = 'none'
document.getElementById('answer-bd1de0c0-0467-46e8-b96e-29d3b026d287').style.display = 'inline-block';
document.getElementById('button-bd1de0c0-0467-46e8-b96e-29d3b026d287').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-06006f87-33eb-4c8e-83ed-19a281352b80" style="display: none">0.25</span>
<span id="button-06006f87-33eb-4c8e-83ed-19a281352b80">
<span id="answer-0c84258b-2897-4343-b529-2cf388ecbabd" style="display: none">0.25</span>
<span id="button-0c84258b-2897-4343-b529-2cf388ecbabd">
<button
type="button"
onclick="
document.getElementById('answer-06006f87-33eb-4c8e-83ed-19a281352b80').style.display = 'inline-block';
document.getElementById('button-06006f87-33eb-4c8e-83ed-19a281352b80').style.display = 'none'
document.getElementById('answer-0c84258b-2897-4343-b529-2cf388ecbabd').style.display = 'inline-block';
document.getElementById('button-0c84258b-2897-4343-b529-2cf388ecbabd').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-80147019-9041-46eb-b21f-bc6ac20d7164" style="display: none">0.29</span>
<span id="button-80147019-9041-46eb-b21f-bc6ac20d7164">
<span id="answer-a7a6ede2-4c23-4016-ba85-58c3688dd24b" style="display: none">0.29</span>
<span id="button-a7a6ede2-4c23-4016-ba85-58c3688dd24b">
<button
type="button"
onclick="
document.getElementById('answer-80147019-9041-46eb-b21f-bc6ac20d7164').style.display = 'inline-block';
document.getElementById('button-80147019-9041-46eb-b21f-bc6ac20d7164').style.display = 'none'
document.getElementById('answer-a7a6ede2-4c23-4016-ba85-58c3688dd24b').style.display = 'inline-block';
document.getElementById('button-a7a6ede2-4c23-4016-ba85-58c3688dd24b').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-68dd6822-203a-4202-9b65-39b503e115fe" style="display: none">0.6</span>
<span id="button-68dd6822-203a-4202-9b65-39b503e115fe">
<span id="answer-eb56582a-443c-4104-bb88-242a73b239fc" style="display: none">0.6</span>
<span id="button-eb56582a-443c-4104-bb88-242a73b239fc">
<button
type="button"
onclick="
document.getElementById('answer-68dd6822-203a-4202-9b65-39b503e115fe').style.display = 'inline-block';
document.getElementById('button-68dd6822-203a-4202-9b65-39b503e115fe').style.display = 'none'
document.getElementById('answer-eb56582a-443c-4104-bb88-242a73b239fc').style.display = 'inline-block';
document.getElementById('button-eb56582a-443c-4104-bb88-242a73b239fc').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-cb5655aa-b703-41e0-8ab1-88cf7f4a6cb9" style="display: none">0.30</span>
<span id="button-cb5655aa-b703-41e0-8ab1-88cf7f4a6cb9">
<span id="answer-4f75bef5-eb2f-475f-9c87-7bfa0aee525d" style="display: none">0.30</span>
<span id="button-4f75bef5-eb2f-475f-9c87-7bfa0aee525d">
<button
type="button"
onclick="
document.getElementById('answer-cb5655aa-b703-41e0-8ab1-88cf7f4a6cb9').style.display = 'inline-block';
document.getElementById('button-cb5655aa-b703-41e0-8ab1-88cf7f4a6cb9').style.display = 'none'
document.getElementById('answer-4f75bef5-eb2f-475f-9c87-7bfa0aee525d').style.display = 'inline-block';
document.getElementById('button-4f75bef5-eb2f-475f-9c87-7bfa0aee525d').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-4af37001-8a0c-4f4e-9261-d67b39468075" style="display: none">0.27</span>
<span id="button-4af37001-8a0c-4f4e-9261-d67b39468075">
<span id="answer-7143ffab-e63c-4b89-87b2-bc7657d3e7ea" style="display: none">0.27</span>
<span id="button-7143ffab-e63c-4b89-87b2-bc7657d3e7ea">
<button
type="button"
onclick="
document.getElementById('answer-4af37001-8a0c-4f4e-9261-d67b39468075').style.display = 'inline-block';
document.getElementById('button-4af37001-8a0c-4f4e-9261-d67b39468075').style.display = 'none'
document.getElementById('answer-7143ffab-e63c-4b89-87b2-bc7657d3e7ea').style.display = 'inline-block';
document.getElementById('button-7143ffab-e63c-4b89-87b2-bc7657d3e7ea').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-312d152b-befd-495c-b805-9160ba69d069" style="display: none">0.3</span>
<span id="button-312d152b-befd-495c-b805-9160ba69d069">
<span id="answer-364fd8a4-9ffc-433c-a88b-bb43782529d6" style="display: none">0.3</span>
<span id="button-364fd8a4-9ffc-433c-a88b-bb43782529d6">
<button
type="button"
onclick="
document.getElementById('answer-312d152b-befd-495c-b805-9160ba69d069').style.display = 'inline-block';
document.getElementById('button-312d152b-befd-495c-b805-9160ba69d069').style.display = 'none'
document.getElementById('answer-364fd8a4-9ffc-433c-a88b-bb43782529d6').style.display = 'inline-block';
document.getElementById('button-364fd8a4-9ffc-433c-a88b-bb43782529d6').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-1b86b119-fec0-44a1-b023-c88c43c15069" style="display: none">0.25</span>
<span id="button-1b86b119-fec0-44a1-b023-c88c43c15069">
<span id="answer-1a793f60-d507-4cce-95ba-9ebb513695e1" style="display: none">0.25</span>
<span id="button-1a793f60-d507-4cce-95ba-9ebb513695e1">
<button
type="button"
onclick="
document.getElementById('answer-1b86b119-fec0-44a1-b023-c88c43c15069').style.display = 'inline-block';
document.getElementById('button-1b86b119-fec0-44a1-b023-c88c43c15069').style.display = 'none'
document.getElementById('answer-1a793f60-d507-4cce-95ba-9ebb513695e1').style.display = 'inline-block';
document.getElementById('button-1a793f60-d507-4cce-95ba-9ebb513695e1').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-c98f772b-4760-4a30-be7a-51b487b1d01a" style="display: none">0.34</span>
<span id="button-c98f772b-4760-4a30-be7a-51b487b1d01a">
<span id="answer-9a1bf012-d3bc-4ff8-abd0-30dca9fba1f5" style="display: none">0.34</span>
<span id="button-9a1bf012-d3bc-4ff8-abd0-30dca9fba1f5">
<button
type="button"
onclick="
document.getElementById('answer-c98f772b-4760-4a30-be7a-51b487b1d01a').style.display = 'inline-block';
document.getElementById('button-c98f772b-4760-4a30-be7a-51b487b1d01a').style.display = 'none'
document.getElementById('answer-9a1bf012-d3bc-4ff8-abd0-30dca9fba1f5').style.display = 'inline-block';
document.getElementById('button-9a1bf012-d3bc-4ff8-abd0-30dca9fba1f5').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-7e683842-2994-4b97-ab53-d5d629e69028" style="display: none">0.28</span>
<span id="button-7e683842-2994-4b97-ab53-d5d629e69028">
<span id="answer-a3b61af5-738a-4d73-a4c4-3857da14ab2b" style="display: none">0.28</span>
<span id="button-a3b61af5-738a-4d73-a4c4-3857da14ab2b">
<button
type="button"
onclick="
document.getElementById('answer-7e683842-2994-4b97-ab53-d5d629e69028').style.display = 'inline-block';
document.getElementById('button-7e683842-2994-4b97-ab53-d5d629e69028').style.display = 'none'
document.getElementById('answer-a3b61af5-738a-4d73-a4c4-3857da14ab2b').style.display = 'inline-block';
document.getElementById('button-a3b61af5-738a-4d73-a4c4-3857da14ab2b').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-2f7429f2-3e42-446f-8578-467a33baa934" style="display: none">5/3</span>
<span id="button-2f7429f2-3e42-446f-8578-467a33baa934">
<span id="answer-34ef9c50-7fe8-4f33-8550-ed2ae0d2a36d" style="display: none">5/3</span>
<span id="button-34ef9c50-7fe8-4f33-8550-ed2ae0d2a36d">
<button
type="button"
onclick="
document.getElementById('answer-2f7429f2-3e42-446f-8578-467a33baa934').style.display = 'inline-block';
document.getElementById('button-2f7429f2-3e42-446f-8578-467a33baa934').style.display = 'none'
document.getElementById('answer-34ef9c50-7fe8-4f33-8550-ed2ae0d2a36d').style.display = 'inline-block';
document.getElementById('button-34ef9c50-7fe8-4f33-8550-ed2ae0d2a36d').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-386c56af-efed-4de5-9fba-e9afcfec79ae" style="display: none">3/5 = 0.6</span>
<span id="button-386c56af-efed-4de5-9fba-e9afcfec79ae">
<span id="answer-b8276926-ceda-488a-8687-0710d5605d49" style="display: none">3/5 = 0.6</span>
<span id="button-b8276926-ceda-488a-8687-0710d5605d49">
<button
type="button"
onclick="
document.getElementById('answer-386c56af-efed-4de5-9fba-e9afcfec79ae').style.display = 'inline-block';
document.getElementById('button-386c56af-efed-4de5-9fba-e9afcfec79ae').style.display = 'none'
document.getElementById('answer-b8276926-ceda-488a-8687-0710d5605d49').style.display = 'inline-block';
document.getElementById('button-b8276926-ceda-488a-8687-0710d5605d49').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-de7f8e16-870f-47b7-ab2c-cd36495254ce" style="display: none">7/(19*0.25) = 1.47</span>
<span id="button-de7f8e16-870f-47b7-ab2c-cd36495254ce">
<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">
<button
type="button"
onclick="
document.getElementById('answer-de7f8e16-870f-47b7-ab2c-cd36495254ce').style.display = 'inline-block';
document.getElementById('button-de7f8e16-870f-47b7-ab2c-cd36495254ce').style.display = 'none'
document.getElementById('answer-bf2f0035-6f29-45f0-ae45-4b292b281924').style.display = 'inline-block';
document.getElementById('button-bf2f0035-6f29-45f0-ae45-4b292b281924').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-93e85867-e81b-4ab0-8929-6dce8d354c9e" style="display: none">1</span>
<span id="button-93e85867-e81b-4ab0-8929-6dce8d354c9e">
<span id="answer-e975a472-67ce-4557-a0b5-7cbac35a5db6" style="display: none">1</span>
<span id="button-e975a472-67ce-4557-a0b5-7cbac35a5db6">
<button
type="button"
onclick="
document.getElementById('answer-93e85867-e81b-4ab0-8929-6dce8d354c9e').style.display = 'inline-block';
document.getElementById('button-93e85867-e81b-4ab0-8929-6dce8d354c9e').style.display = 'none'
document.getElementById('answer-e975a472-67ce-4557-a0b5-7cbac35a5db6').style.display = 'inline-block';
document.getElementById('button-e975a472-67ce-4557-a0b5-7cbac35a5db6').style.display = 'none'
"
>
Show Answer
Expand Down
Loading

0 comments on commit b3230b8

Please sign in to comment.