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 64a90a4 commit e03f0c3
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-1b64c6c4-a387-472c-886c-3b25ad4eac81" style="display: none">8</span>
<span id="button-1b64c6c4-a387-472c-886c-3b25ad4eac81">
<span id="answer-7e3baea4-9458-46e6-9b5e-042b3cea3dd1" style="display: none">8</span>
<span id="button-7e3baea4-9458-46e6-9b5e-042b3cea3dd1">
<button
type="button"
onclick="
document.getElementById('answer-1b64c6c4-a387-472c-886c-3b25ad4eac81').style.display = 'inline-block';
document.getElementById('button-1b64c6c4-a387-472c-886c-3b25ad4eac81').style.display = 'none'
document.getElementById('answer-7e3baea4-9458-46e6-9b5e-042b3cea3dd1').style.display = 'inline-block';
document.getElementById('button-7e3baea4-9458-46e6-9b5e-042b3cea3dd1').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-0b93ae99-b11b-485c-a4ab-a0223dea7738" style="display: none">8</span>
<span id="button-0b93ae99-b11b-485c-a4ab-a0223dea7738">
<span id="answer-776f172b-2270-44e4-a380-9037e03032f5" style="display: none">8</span>
<span id="button-776f172b-2270-44e4-a380-9037e03032f5">
<button
type="button"
onclick="
document.getElementById('answer-0b93ae99-b11b-485c-a4ab-a0223dea7738').style.display = 'inline-block';
document.getElementById('button-0b93ae99-b11b-485c-a4ab-a0223dea7738').style.display = 'none'
document.getElementById('answer-776f172b-2270-44e4-a380-9037e03032f5').style.display = 'inline-block';
document.getElementById('button-776f172b-2270-44e4-a380-9037e03032f5').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-dae538d8-cef9-48a8-acff-05e2efe4e87b" style="display: none"><span class="math">\((3, 0, \frac{1}{4})^T\)</span></span>
<span id="button-dae538d8-cef9-48a8-acff-05e2efe4e87b">
<span id="answer-6e8069a8-33b3-4274-8a95-e88253b97772" style="display: none"><span class="math">\((3, 0, \frac{1}{4})^T\)</span></span>
<span id="button-6e8069a8-33b3-4274-8a95-e88253b97772">
<button
type="button"
onclick="
document.getElementById('answer-dae538d8-cef9-48a8-acff-05e2efe4e87b').style.display = 'inline-block';
document.getElementById('button-dae538d8-cef9-48a8-acff-05e2efe4e87b').style.display = 'none'
document.getElementById('answer-6e8069a8-33b3-4274-8a95-e88253b97772').style.display = 'inline-block';
document.getElementById('button-6e8069a8-33b3-4274-8a95-e88253b97772').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-1dac1fb2-6273-4973-82a8-ce152ba8569e" style="display: none">0.25</span>
<span id="button-1dac1fb2-6273-4973-82a8-ce152ba8569e">
<span id="answer-6f1153c1-c505-4e42-a845-d6979f17250e" style="display: none">0.25</span>
<span id="button-6f1153c1-c505-4e42-a845-d6979f17250e">
<button
type="button"
onclick="
document.getElementById('answer-1dac1fb2-6273-4973-82a8-ce152ba8569e').style.display = 'inline-block';
document.getElementById('button-1dac1fb2-6273-4973-82a8-ce152ba8569e').style.display = 'none'
document.getElementById('answer-6f1153c1-c505-4e42-a845-d6979f17250e').style.display = 'inline-block';
document.getElementById('button-6f1153c1-c505-4e42-a845-d6979f17250e').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-fb553e3a-f84d-4bd8-a265-fe4538a98d43" style="display: none">0.29</span>
<span id="button-fb553e3a-f84d-4bd8-a265-fe4538a98d43">
<span id="answer-644643cf-e0ac-4147-85b2-b29a6a3a22cf" style="display: none">0.29</span>
<span id="button-644643cf-e0ac-4147-85b2-b29a6a3a22cf">
<button
type="button"
onclick="
document.getElementById('answer-fb553e3a-f84d-4bd8-a265-fe4538a98d43').style.display = 'inline-block';
document.getElementById('button-fb553e3a-f84d-4bd8-a265-fe4538a98d43').style.display = 'none'
document.getElementById('answer-644643cf-e0ac-4147-85b2-b29a6a3a22cf').style.display = 'inline-block';
document.getElementById('button-644643cf-e0ac-4147-85b2-b29a6a3a22cf').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-967ad30a-96e9-44a4-b87f-2ccdbc381968" style="display: none">0.6</span>
<span id="button-967ad30a-96e9-44a4-b87f-2ccdbc381968">
<span id="answer-05fab436-51d3-4a42-8849-8e13cd3a4ae8" style="display: none">0.6</span>
<span id="button-05fab436-51d3-4a42-8849-8e13cd3a4ae8">
<button
type="button"
onclick="
document.getElementById('answer-967ad30a-96e9-44a4-b87f-2ccdbc381968').style.display = 'inline-block';
document.getElementById('button-967ad30a-96e9-44a4-b87f-2ccdbc381968').style.display = 'none'
document.getElementById('answer-05fab436-51d3-4a42-8849-8e13cd3a4ae8').style.display = 'inline-block';
document.getElementById('button-05fab436-51d3-4a42-8849-8e13cd3a4ae8').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-4be894fa-fb71-4676-918c-df0913ab5165" style="display: none">0.30</span>
<span id="button-4be894fa-fb71-4676-918c-df0913ab5165">
<span id="answer-99348c5f-eb88-4e5c-ba0c-e5c9e9c2c677" style="display: none">0.30</span>
<span id="button-99348c5f-eb88-4e5c-ba0c-e5c9e9c2c677">
<button
type="button"
onclick="
document.getElementById('answer-4be894fa-fb71-4676-918c-df0913ab5165').style.display = 'inline-block';
document.getElementById('button-4be894fa-fb71-4676-918c-df0913ab5165').style.display = 'none'
document.getElementById('answer-99348c5f-eb88-4e5c-ba0c-e5c9e9c2c677').style.display = 'inline-block';
document.getElementById('button-99348c5f-eb88-4e5c-ba0c-e5c9e9c2c677').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-306b215c-733b-4675-a9f6-85a1965f4e13" style="display: none">0.27</span>
<span id="button-306b215c-733b-4675-a9f6-85a1965f4e13">
<span id="answer-1bda6365-2be8-4758-89da-c6518278ec8a" style="display: none">0.27</span>
<span id="button-1bda6365-2be8-4758-89da-c6518278ec8a">
<button
type="button"
onclick="
document.getElementById('answer-306b215c-733b-4675-a9f6-85a1965f4e13').style.display = 'inline-block';
document.getElementById('button-306b215c-733b-4675-a9f6-85a1965f4e13').style.display = 'none'
document.getElementById('answer-1bda6365-2be8-4758-89da-c6518278ec8a').style.display = 'inline-block';
document.getElementById('button-1bda6365-2be8-4758-89da-c6518278ec8a').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-d40b8993-7ed3-476e-897f-f98808201201" style="display: none">0.3</span>
<span id="button-d40b8993-7ed3-476e-897f-f98808201201">
<span id="answer-90c6abe9-326a-4470-a8fc-212678a82833" style="display: none">0.3</span>
<span id="button-90c6abe9-326a-4470-a8fc-212678a82833">
<button
type="button"
onclick="
document.getElementById('answer-d40b8993-7ed3-476e-897f-f98808201201').style.display = 'inline-block';
document.getElementById('button-d40b8993-7ed3-476e-897f-f98808201201').style.display = 'none'
document.getElementById('answer-90c6abe9-326a-4470-a8fc-212678a82833').style.display = 'inline-block';
document.getElementById('button-90c6abe9-326a-4470-a8fc-212678a82833').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-bc491e4c-eda2-43f4-978c-4d6356763a40" style="display: none">0.25</span>
<span id="button-bc491e4c-eda2-43f4-978c-4d6356763a40">
<span id="answer-bc611144-95f3-4f71-ae1d-d4423e2c7509" style="display: none">0.25</span>
<span id="button-bc611144-95f3-4f71-ae1d-d4423e2c7509">
<button
type="button"
onclick="
document.getElementById('answer-bc491e4c-eda2-43f4-978c-4d6356763a40').style.display = 'inline-block';
document.getElementById('button-bc491e4c-eda2-43f4-978c-4d6356763a40').style.display = 'none'
document.getElementById('answer-bc611144-95f3-4f71-ae1d-d4423e2c7509').style.display = 'inline-block';
document.getElementById('button-bc611144-95f3-4f71-ae1d-d4423e2c7509').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-5b4d0042-8277-498f-88f3-e2a6b13ddac5" style="display: none">0.34</span>
<span id="button-5b4d0042-8277-498f-88f3-e2a6b13ddac5">
<span id="answer-b1bd1b11-b7b1-4b7c-8ae6-c62ae15d18b9" style="display: none">0.34</span>
<span id="button-b1bd1b11-b7b1-4b7c-8ae6-c62ae15d18b9">
<button
type="button"
onclick="
document.getElementById('answer-5b4d0042-8277-498f-88f3-e2a6b13ddac5').style.display = 'inline-block';
document.getElementById('button-5b4d0042-8277-498f-88f3-e2a6b13ddac5').style.display = 'none'
document.getElementById('answer-b1bd1b11-b7b1-4b7c-8ae6-c62ae15d18b9').style.display = 'inline-block';
document.getElementById('button-b1bd1b11-b7b1-4b7c-8ae6-c62ae15d18b9').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-91cb35ff-cfd3-4942-8e16-57b0700de8e4" style="display: none">0.28</span>
<span id="button-91cb35ff-cfd3-4942-8e16-57b0700de8e4">
<span id="answer-fea5cbdc-1a89-4112-b7a1-ce89b9493f4e" style="display: none">0.28</span>
<span id="button-fea5cbdc-1a89-4112-b7a1-ce89b9493f4e">
<button
type="button"
onclick="
document.getElementById('answer-91cb35ff-cfd3-4942-8e16-57b0700de8e4').style.display = 'inline-block';
document.getElementById('button-91cb35ff-cfd3-4942-8e16-57b0700de8e4').style.display = 'none'
document.getElementById('answer-fea5cbdc-1a89-4112-b7a1-ce89b9493f4e').style.display = 'inline-block';
document.getElementById('button-fea5cbdc-1a89-4112-b7a1-ce89b9493f4e').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-c55d17f1-3d42-487a-97a7-0a8047a3b312" style="display: none">5/3</span>
<span id="button-c55d17f1-3d42-487a-97a7-0a8047a3b312">
<span id="answer-e7f61048-f8c8-4a89-8eef-85c7de9ec0d0" style="display: none">5/3</span>
<span id="button-e7f61048-f8c8-4a89-8eef-85c7de9ec0d0">
<button
type="button"
onclick="
document.getElementById('answer-c55d17f1-3d42-487a-97a7-0a8047a3b312').style.display = 'inline-block';
document.getElementById('button-c55d17f1-3d42-487a-97a7-0a8047a3b312').style.display = 'none'
document.getElementById('answer-e7f61048-f8c8-4a89-8eef-85c7de9ec0d0').style.display = 'inline-block';
document.getElementById('button-e7f61048-f8c8-4a89-8eef-85c7de9ec0d0').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-184de05e-10c5-4c9a-8411-1f93634ea522" style="display: none">3/5 = 0.6</span>
<span id="button-184de05e-10c5-4c9a-8411-1f93634ea522">
<span id="answer-76b6b9ab-86db-4879-8cb7-93b3d6190c04" style="display: none">3/5 = 0.6</span>
<span id="button-76b6b9ab-86db-4879-8cb7-93b3d6190c04">
<button
type="button"
onclick="
document.getElementById('answer-184de05e-10c5-4c9a-8411-1f93634ea522').style.display = 'inline-block';
document.getElementById('button-184de05e-10c5-4c9a-8411-1f93634ea522').style.display = 'none'
document.getElementById('answer-76b6b9ab-86db-4879-8cb7-93b3d6190c04').style.display = 'inline-block';
document.getElementById('button-76b6b9ab-86db-4879-8cb7-93b3d6190c04').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-4c9cadb4-1ade-4f77-b848-326edb63b7ff" style="display: none">7/(19*0.25) = 1.47</span>
<span id="button-4c9cadb4-1ade-4f77-b848-326edb63b7ff">
<span id="answer-dff00db3-b3f9-4a08-a55d-d2a315b16ac8" style="display: none">7/(19*0.25) = 1.47</span>
<span id="button-dff00db3-b3f9-4a08-a55d-d2a315b16ac8">
<button
type="button"
onclick="
document.getElementById('answer-4c9cadb4-1ade-4f77-b848-326edb63b7ff').style.display = 'inline-block';
document.getElementById('button-4c9cadb4-1ade-4f77-b848-326edb63b7ff').style.display = 'none'
document.getElementById('answer-dff00db3-b3f9-4a08-a55d-d2a315b16ac8').style.display = 'inline-block';
document.getElementById('button-dff00db3-b3f9-4a08-a55d-d2a315b16ac8').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-9de14091-54ec-4a76-bc49-ae1c0791720c" style="display: none">1</span>
<span id="button-9de14091-54ec-4a76-bc49-ae1c0791720c">
<span id="answer-7699503d-207d-4cc1-85d0-83155998e460" style="display: none">1</span>
<span id="button-7699503d-207d-4cc1-85d0-83155998e460">
<button
type="button"
onclick="
document.getElementById('answer-9de14091-54ec-4a76-bc49-ae1c0791720c').style.display = 'inline-block';
document.getElementById('button-9de14091-54ec-4a76-bc49-ae1c0791720c').style.display = 'none'
document.getElementById('answer-7699503d-207d-4cc1-85d0-83155998e460').style.display = 'inline-block';
document.getElementById('button-7699503d-207d-4cc1-85d0-83155998e460').style.display = 'none'
"
>
Show Answer
Expand Down
Loading

0 comments on commit e03f0c3

Please sign in to comment.