Skip to content

Commit 3cfe75c

Browse files
Render course
1 parent b059990 commit 3cfe75c

2 files changed

Lines changed: 37 additions & 25 deletions

File tree

docs/01-Problem-Setup.html

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,8 @@ <h2 id="toc-title">Table of contents</h2>
178178

179179
<ul>
180180
<li><a href="#population-and-sample" id="toc-population-and-sample" class="nav-link active" data-scroll-target="#population-and-sample"><span class="header-section-number">2.1</span> Population and Sample</a></li>
181-
<li><a href="#how-to-pick-a-model" id="toc-how-to-pick-a-model" class="nav-link" data-scroll-target="#how-to-pick-a-model"><span class="header-section-number">2.2</span> How to pick a model?</a></li>
182-
<li><a href="#how-to-evaluate-a-model" id="toc-how-to-evaluate-a-model" class="nav-link" data-scroll-target="#how-to-evaluate-a-model"><span class="header-section-number">2.3</span> How to evaluate a model?</a></li>
183-
<li><a href="#preview-linear-regression" id="toc-preview-linear-regression" class="nav-link" data-scroll-target="#preview-linear-regression"><span class="header-section-number">2.4</span> Preview: linear regression</a></li>
181+
<li><a href="#how-to-evaluate-and-pick-a-model" id="toc-how-to-evaluate-and-pick-a-model" class="nav-link" data-scroll-target="#how-to-evaluate-and-pick-a-model"><span class="header-section-number">2.2</span> How to evaluate and pick a model?</a></li>
182+
<li><a href="#preview-linear-regression" id="toc-preview-linear-regression" class="nav-link" data-scroll-target="#preview-linear-regression"><span class="header-section-number">2.3</span> Preview: linear regression</a></li>
184183
</ul>
185184
<div class="toc-actions"><ul><li><a href="https://github.com/ottrproject/OTTR_Quarto/edit/main/01-Problem-Setup.qmd" class="toc-action"><i class="bi bi-github"></i>Edit this page</a></li><li><a href="https://docs.google.com/forms/d/e/1FAIpQLSfBvVELBg8lcynKj0TrzMlov1zil-Sbkh9VhMKRcSpeo1xo6g/viewform" class="toc-action"><i class="bi empty"></i>Report an issue</a></li></ul></div></nav>
186185
</div>
@@ -212,23 +211,36 @@ <h1 class="title d-none d-lg-block"><span class="chapter-number">2</span>&nbsp;
212211
<p><span class="math display">\[
213212
BloodPressure=f(Age, BMI, Income, ...)+\epsilon
214213
\]</span></p>
215-
<p>Where <span class="math inline">\(f(Age, BMI, Income, ...)\)</span> is a machine learning model that takes in the clinical and demographic variables and make a prediction on the <span class="math inline">\(BloodPressure\)</span>. This model is not perfect to give a perfect, correct prediction, so there is an “error term” <span class="math inline">\(\epsilon\)</span> that captures the imperfectness of the model.</p>
214+
<p>Where <span class="math inline">\(f(Age, BMI, Income, ...)\)</span> is a machine learning model that takes in the clinical and demographic variables and make a prediction on the <span class="math inline">\(BloodPressure\)</span>. This model is not perfect to give the correct prediction, so there is an “error term” <span class="math inline">\(\epsilon\)</span> (Greek letter epsilon) that captures the imperfectness of the model.</p>
216215
<p>A machine learning model, such as the one described above, has <em>two main uses:</em></p>
216+
<ol type="1">
217+
<li><p><strong>Prediction:</strong> How accurately can we predict outcomes?</p>
217218
<ul>
218-
<li><p><strong>Prediction:</strong> How accurately can we predict outcomes?</p></li>
219-
<li><p><strong>Inference:</strong> Which predictors are associated with the response, and how strong is the association?</p></li>
220-
</ul>
219+
<li>Given a new person’s <span class="math inline">\(Age, BMI, Income, …\)</span> , predict the person’s <span class="math inline">\(BloodPressure\)</span> and compare it to the true value.</li>
220+
</ul></li>
221+
<li><p><strong>Inference:</strong> Which predictors are associated with the response, and how strong is the association?</p>
222+
<ul>
223+
<li>Suppose the model is described as <span class="math inline">\(BloodPressure = f(Age,BMI,Income,…)=20 + 3 \cdot Age - .2 \cdot BMI + .00015 \cdot Income\)</span>. Each variable has a relationship to the outcome: an increase of <span class="math inline">\(Age\)</span> by 1 will lead to an increase of <span class="math inline">\(BloodPressure\)</span> by 3. This measures the strength of association between a variable and the outcome.</li>
224+
</ul></li>
225+
</ol>
221226
<section id="population-and-sample" class="level2" data-number="2.1">
222227
<h2 data-number="2.1" class="anchored" data-anchor-id="population-and-sample"><span class="header-section-number">2.1</span> Population and Sample</h2>
228+
<p>The way we formulate machine learning model is based on some fundamental concepts in inferential statistics. We will refresh this quickly in the context of our problem. Recall the following definitions:</p>
229+
<p><strong>Population:</strong> The entire collection of individual units that a researcher is interested to study. For NHANES, this could be the entire US population.</p>
230+
<p><strong>Sample:</strong> A smaller collection of individual units that the researcher has selected to study. For NHANES, this could be a random sampling of the US population.</p>
231+
<p>In Machine Learning problems, we often like to take two, non-overlapping samples from the population: the <strong>Training Set</strong>, and the <strong>Test Set</strong>. We <strong>train</strong> our model using the Training Set, which gives us a function <span class="math inline">\(f()\)</span> that relates the predictors to the outcome. Then, for our main use cases:</p>
232+
<ol type="1">
233+
<li><strong>Prediction:</strong> We use the trained model to predict the outcome using predictors from the Test Set and compare the predicted outcome to the true value in the Test Set.</li>
234+
<li><strong>Inference</strong>: We examine the function <span class="math inline">\(f()\)</span>’s trained values, which are called <strong>parameters</strong>. For instance, <span class="math inline">\(f(Age,BMI,Income,…)=20 + 3 \cdot Age - .2 \cdot BMI + .00015 \cdot Income\)</span>, the values <span class="math inline">\(20\)</span>, <span class="math inline">\(3\)</span>, <span class="math inline">\(-.2\)</span>, and <span class="math inline">\(.00015\)</span> are the parameters. Because these parameters are derived from the Training Set, they are an <em>estimated</em> quantity from a sample, similar to other summary statistics like the mean of a sample. Therefore, to say anything about the true population, we have to use statistical tools such as p-values and confidence intervals.</li>
235+
</ol>
236+
<p>If the concepts of population, sample, estimation, p-value, and confidence interval is new to you, we recommend do a bit of reading here [todo].</p>
223237
</section>
224-
<section id="how-to-pick-a-model" class="level2" data-number="2.2">
225-
<h2 data-number="2.2" class="anchored" data-anchor-id="how-to-pick-a-model"><span class="header-section-number">2.2</span> How to pick a model?</h2>
226-
</section>
227-
<section id="how-to-evaluate-a-model" class="level2" data-number="2.3">
228-
<h2 data-number="2.3" class="anchored" data-anchor-id="how-to-evaluate-a-model"><span class="header-section-number">2.3</span> How to evaluate a model?</h2>
238+
<section id="how-to-evaluate-and-pick-a-model" class="level2" data-number="2.2">
239+
<h2 data-number="2.2" class="anchored" data-anchor-id="how-to-evaluate-and-pick-a-model"><span class="header-section-number">2.2</span> How to evaluate and pick a model?</h2>
240+
<p>The little example model we showcased above is an example of a <strong>linear model</strong>, but we will look at several types of models in this course. In order to decide how to evaluate and pick a model, we will need to develop a framework to assess a model.</p>
229241
</section>
230-
<section id="preview-linear-regression" class="level2" data-number="2.4">
231-
<h2 data-number="2.4" class="anchored" data-anchor-id="preview-linear-regression"><span class="header-section-number">2.4</span> Preview: linear regression</h2>
242+
<section id="preview-linear-regression" class="level2" data-number="2.3">
243+
<h2 data-number="2.3" class="anchored" data-anchor-id="preview-linear-regression"><span class="header-section-number">2.3</span> Preview: linear regression</h2>
232244

233245

234246
</section>

docs/search.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -44,27 +44,27 @@
4444
"href": "01-Problem-Setup.html",
4545
"title": "2  Problem Set-Up",
4646
"section": "",
47-
"text": "2.1 Population and Sample",
47+
"text": "2.1 Population and Sample\nThe way we formulate machine learning model is based on some fundamental concepts in inferential statistics. We will refresh this quickly in the context of our problem. Recall the following definitions:\nPopulation: The entire collection of individual units that a researcher is interested to study. For NHANES, this could be the entire US population.\nSample: A smaller collection of individual units that the researcher has selected to study. For NHANES, this could be a random sampling of the US population.\nIn Machine Learning problems, we often like to take two, non-overlapping samples from the population: the Training Set, and the Test Set. We train our model using the Training Set, which gives us a function \\(f()\\) that relates the predictors to the outcome. Then, for our main use cases:\nIf the concepts of population, sample, estimation, p-value, and confidence interval is new to you, we recommend do a bit of reading here [todo].",
4848
"crumbs": [
4949
"<span class='chapter-number'>2</span>  <span class='chapter-title'>Problem Set-Up</span>"
5050
]
5151
},
5252
{
53-
"objectID": "01-Problem-Setup.html#how-to-pick-a-model",
54-
"href": "01-Problem-Setup.html#how-to-pick-a-model",
53+
"objectID": "01-Problem-Setup.html#population-and-sample",
54+
"href": "01-Problem-Setup.html#population-and-sample",
5555
"title": "2  Problem Set-Up",
56-
"section": "2.2 How to pick a model?",
57-
"text": "2.2 How to pick a model?",
56+
"section": "",
57+
"text": "Prediction: We use the trained model to predict the outcome using predictors from the Test Set and compare the predicted outcome to the true value in the Test Set.\nInference: We examine the function \\(f()\\)’s trained values, which are called parameters. For instance, \\(f(Age,BMI,Income,…)=20 + 3 \\cdot Age - .2 \\cdot BMI + .00015 \\cdot Income\\), the values \\(20\\), \\(3\\), \\(-.2\\), and \\(.00015\\) are the parameters. Because these parameters are derived from the Training Set, they are an estimated quantity from a sample, similar to other summary statistics like the mean of a sample. Therefore, to say anything about the true population, we have to use statistical tools such as p-values and confidence intervals.",
5858
"crumbs": [
5959
"<span class='chapter-number'>2</span>  <span class='chapter-title'>Problem Set-Up</span>"
6060
]
6161
},
6262
{
63-
"objectID": "01-Problem-Setup.html#how-to-evaluate-a-model",
64-
"href": "01-Problem-Setup.html#how-to-evaluate-a-model",
63+
"objectID": "01-Problem-Setup.html#how-to-evaluate-and-pick-a-model",
64+
"href": "01-Problem-Setup.html#how-to-evaluate-and-pick-a-model",
6565
"title": "2  Problem Set-Up",
66-
"section": "2.3 How to evaluate a model?",
67-
"text": "2.3 How to evaluate a model?",
66+
"section": "2.2 How to evaluate and pick a model?",
67+
"text": "2.2 How to evaluate and pick a model?\nThe little example model we showcased above is an example of a linear model, but we will look at several types of models in this course. In order to decide how to evaluate and pick a model, we will need to develop a framework to assess a model.",
6868
"crumbs": [
6969
"<span class='chapter-number'>2</span>  <span class='chapter-title'>Problem Set-Up</span>"
7070
]
@@ -73,8 +73,8 @@
7373
"objectID": "01-Problem-Setup.html#preview-linear-regression",
7474
"href": "01-Problem-Setup.html#preview-linear-regression",
7575
"title": "2  Problem Set-Up",
76-
"section": "2.4 Preview: linear regression",
77-
"text": "2.4 Preview: linear regression",
76+
"section": "2.3 Preview: linear regression",
77+
"text": "2.3 Preview: linear regression",
7878
"crumbs": [
7979
"<span class='chapter-number'>2</span>  <span class='chapter-title'>Problem Set-Up</span>"
8080
]

0 commit comments

Comments
 (0)