Skip to content

Commit

Permalink
update beyond-ML
Browse files Browse the repository at this point in the history
  • Loading branch information
pglpm committed Oct 30, 2024
1 parent 7c3b55c commit 666fe89
Show file tree
Hide file tree
Showing 36 changed files with 280 additions and 248 deletions.
4 changes: 2 additions & 2 deletions _freeze/connection-1-ML/execute-results/html.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion basic_decisions.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ A basic decision problem is analysed in terms of the following elements:

::::{.column-margin}
:::{.callout-tip}
##
##  
[{{< fa seedling >}} Remember: What matters is to be able to identify these elements in a concrete problem, understanding their role. Their technical names don't matter.]{.small}
:::
::::
Expand Down
141 changes: 79 additions & 62 deletions beyond-ML.qmd

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions code_design.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Roughly speaking, more versatility corresponds to calculations of the joint prob

::::{.column-page-right}
:::{.callout-note}
##
##  

$$
\P(
Expand Down Expand Up @@ -92,7 +92,7 @@ To enjoy the versatility discussed above, the code needs to compute
::::{.column-page-right}
:::{.callout-note}
##
##  
$$
\P(
Expand Down Expand Up @@ -132,7 +132,7 @@ But the computation of formula (@eq-objectP) (for all values of $\bz$) must be d

::::{.column-page-inset-right}
:::{.callout-note}
##
##  

(example with $Z \defd ({\red A}, {\blue B}, {\yellow C})$)

Expand Down
2 changes: 1 addition & 1 deletion connection-1-ML.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ In [§@sec-optimality] we emphasized that "guessing successfully" can be a misle
## A "max-success" classifier vs an optimal classifier

:::{.callout-note}
##
##  
You find the code for this chapter and exercises also in [this JupyterLab notebook for R](code/mlc_vs_opm.ipynb) and (courtesy of Viktor Karl Gravdal!) [this JupyterLab notebook for python](code/mlc_vs_opm_py.ipynb).
:::

Expand Down
2 changes: 1 addition & 1 deletion dirichlet-mixture.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ With the explicit formula

:::{.column-page-inset-right}
::::{.callout-note}
##
##  

$$
\P(
Expand Down
8 changes: 4 additions & 4 deletions docs/basic_decisions.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">

<meta name="dcterms.date" content="2024-09-28">
<meta name="dcterms.date" content="2024-10-30">

<title>ADA511 0.2 Data Science and AI prototyping - 3&nbsp; Basic decision problems</title>
<style>
Expand Down Expand Up @@ -133,7 +133,7 @@ <h1 class="quarto-secondary-nav-title"><span id="sec-basic-decisions" class="qua
<img src="./ada511logo8_small.png" alt="" class="sidebar-logo py-0 d-lg-inline d-none">
</a>
<div class="sidebar-title mb-0 py-0">
<a href="./">ADA511 <span class="small grey">0.2</span><br><span class="small grey">2024-09-28</span><br></a><a href="http://creativecommons.org/licenses/by-sa/4.0"><img src="cc_by_sa.png" class="img-fluid" style="width:3em" alt="CC BY-SA 4.0"> <span class="small grey">licence</span></a><br>
<a href="./">ADA511 <span class="small grey">0.2</span><br><span class="small grey">2024-10-30</span><br></a><a href="http://creativecommons.org/licenses/by-sa/4.0"><img src="cc_by_sa.png" class="img-fluid" style="width:3em" alt="CC BY-SA 4.0"> <span class="small grey">licence</span></a><br>
<div class="sidebar-tools-main">
<a href="" class="quarto-reader-toggle quarto-navigation-tool px-1" onclick="window.quartoToggleReader(); return false;" title="Toggle reader mode">
<div class="quarto-reader-toggle-btn">
Expand Down Expand Up @@ -580,7 +580,7 @@ <h1 class="title d-none d-lg-block"><span id="sec-basic-decisions" class="quarto
<div>
<div class="quarto-title-meta-heading">Published</div>
<div class="quarto-title-meta-contents">
<p class="date">2024-09-28</p>
<p class="date">2024-10-30</p>
</div>
</div>

Expand Down Expand Up @@ -613,7 +613,7 @@ <h2 data-number="3.1" class="anchored" data-anchor-id="graphical-representation-
<i class="callout-icon no-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Tip
&nbsp;
</div>
</div>
<div class="callout-body-container callout-body">
Expand Down
149 changes: 82 additions & 67 deletions docs/beyond-ML.html

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions docs/code_design.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">

<meta name="dcterms.date" content="2024-09-28">
<meta name="dcterms.date" content="2024-10-30">

<title>ADA511 0.2 Data Science and AI prototyping - 33&nbsp; Code design</title>
<style>
Expand Down Expand Up @@ -133,7 +133,7 @@ <h1 class="quarto-secondary-nav-title"><span id="sec-code-design" class="quarto-
<img src="./ada511logo8_small.png" alt="" class="sidebar-logo py-0 d-lg-inline d-none">
</a>
<div class="sidebar-title mb-0 py-0">
<a href="./">ADA511 <span class="small grey">0.2</span><br><span class="small grey">2024-09-28</span><br></a><a href="http://creativecommons.org/licenses/by-sa/4.0"><img src="cc_by_sa.png" class="img-fluid" style="width:3em" alt="CC BY-SA 4.0"> <span class="small grey">licence</span></a><br>
<a href="./">ADA511 <span class="small grey">0.2</span><br><span class="small grey">2024-10-30</span><br></a><a href="http://creativecommons.org/licenses/by-sa/4.0"><img src="cc_by_sa.png" class="img-fluid" style="width:3em" alt="CC BY-SA 4.0"> <span class="small grey">licence</span></a><br>
<div class="sidebar-tools-main">
<a href="" class="quarto-reader-toggle quarto-navigation-tool px-1" onclick="window.quartoToggleReader(); return false;" title="Toggle reader mode">
<div class="quarto-reader-toggle-btn">
Expand Down Expand Up @@ -579,7 +579,7 @@ <h1 class="title d-none d-lg-block"><span id="sec-code-design" class="quarto-sec
<div>
<div class="quarto-title-meta-heading">Published</div>
<div class="quarto-title-meta-contents">
<p class="date">2024-09-28</p>
<p class="date">2024-10-30</p>
</div>
</div>

Expand Down Expand Up @@ -619,7 +619,7 @@ <h2 data-number="33.1" class="anchored" data-anchor-id="sec-code-range"><span cl
<i class="callout-icon no-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Note
&nbsp;
</div>
</div>
<div class="callout-body-container callout-body">
Expand Down Expand Up @@ -687,7 +687,7 @@ <h2 data-number="33.2" class="anchored" data-anchor-id="sec-code-computations"><
<i class="callout-icon no-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Note
&nbsp;
</div>
</div>
<div class="callout-body-container callout-body">
Expand Down Expand Up @@ -728,7 +728,7 @@ <h2 data-number="33.2" class="anchored" data-anchor-id="sec-code-computations"><
<i class="callout-icon no-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Note
&nbsp;
</div>
</div>
<div class="callout-body-container callout-body">
Expand Down
16 changes: 8 additions & 8 deletions docs/connection-1-ML.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">

<meta name="dcterms.date" content="2024-09-05">
<meta name="dcterms.date" content="2024-10-30">

<title>ADA511 0.2 Data Science and AI prototyping - 4&nbsp; First connection with machine learning</title>
<style>
Expand Down Expand Up @@ -167,7 +167,7 @@ <h1 class="quarto-secondary-nav-title"><span class="chapter-number">4</span>&nbs
<img src="./ada511logo8_small.png" alt="" class="sidebar-logo py-0 d-lg-inline d-none">
</a>
<div class="sidebar-title mb-0 py-0">
<a href="./">ADA511 <span class="small grey">0.2</span><br><span class="small grey">2024-09-05</span><br></a><a href="http://creativecommons.org/licenses/by-sa/4.0"><img src="cc_by_sa.png" class="img-fluid" style="width:3em" alt="CC BY-SA 4.0"> <span class="small grey">licence</span></a><br>
<a href="./">ADA511 <span class="small grey">0.2</span><br><span class="small grey">2024-10-30</span><br></a><a href="http://creativecommons.org/licenses/by-sa/4.0"><img src="cc_by_sa.png" class="img-fluid" style="width:3em" alt="CC BY-SA 4.0"> <span class="small grey">licence</span></a><br>
<div class="sidebar-tools-main">
<a href="" class="quarto-reader-toggle quarto-navigation-tool px-1" onclick="window.quartoToggleReader(); return false;" title="Toggle reader mode">
<div class="quarto-reader-toggle-btn">
Expand Down Expand Up @@ -613,7 +613,7 @@ <h1 class="title d-none d-lg-block"><span class="chapter-number">4</span>&nbsp;
<div>
<div class="quarto-title-meta-heading">Published</div>
<div class="quarto-title-meta-contents">
<p class="date">2024-09-05</p>
<p class="date">2024-10-30</p>
</div>
</div>

Expand Down Expand Up @@ -641,7 +641,7 @@ <h2 data-number="4.1" class="anchored" data-anchor-id="a-max-success-classifier-
<i class="callout-icon no-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Note
&nbsp;
</div>
</div>
<div class="callout-body-container callout-body">
Expand Down Expand Up @@ -679,8 +679,8 @@ <h2 data-number="4.2" class="anchored" data-anchor-id="example-1-electronic-comp
<div class="cell-output cell-output-stdout">
<pre><code>
Trials: 100000
Machine-Learning Classifier: successes 87480 ( 87.5 %) | total gain -26763
Optimal Predictor Machine: successes 72689 ( 72.7 %) | total gain 9586</code></pre>
Machine-Learning Classifier: successes 87423 ( 87.4 %) | total gain -26033
Optimal Predictor Machine: successes 72662 ( 72.7 %) | total gain 10086</code></pre>
</div>
</div>
<p>Note how the <span class="yellow">machine-learning classifier</span> is the one that <em>makes most successful guesses</em> (around 88%), <strong>and yet it leads to a net loss!</strong> If the utility were in <em>kroner</em>, this classifier would cause the company producing the components a <span class="red">net loss of more than 20 000 kr</span>.</p>
Expand Down Expand Up @@ -720,8 +720,8 @@ <h2 data-number="4.3" class="anchored" data-anchor-id="example-2-find-aladdin-im
<div class="cell-output cell-output-stdout">
<pre><code>
Trials: 10000
Machine-Learning Classifier: successes 6540 ( 65.4 %) | total gain 4612
Optimal Predictor Machine: successes 6024 ( 60.2 %) | total gain 5534</code></pre>
Machine-Learning Classifier: successes 6502 ( 65 %) | total gain 4426
Optimal Predictor Machine: successes 6105 ( 61 %) | total gain 5788</code></pre>
</div>
</div>
<p>Again we see that the <span class="yellow">machine-learning classifier</span> makes more successful guesses than the <span class="blue">optimal predictor machine</span>, but the latter yields a higher “emotional utility”.</p>
Expand Down
8 changes: 4 additions & 4 deletions docs/dirichlet-mixture.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">

<meta name="dcterms.date" content="2024-09-28">
<meta name="dcterms.date" content="2024-10-30">

<title>ADA511 0.2 Data Science and AI prototyping - 32&nbsp; The Dirichlet-mixture belief distribution</title>
<style>
Expand Down Expand Up @@ -133,7 +133,7 @@ <h1 class="quarto-secondary-nav-title"><span id="sec-dirichlet-mix" class="quart
<img src="./ada511logo8_small.png" alt="" class="sidebar-logo py-0 d-lg-inline d-none">
</a>
<div class="sidebar-title mb-0 py-0">
<a href="./">ADA511 <span class="small grey">0.2</span><br><span class="small grey">2024-09-28</span><br></a><a href="http://creativecommons.org/licenses/by-sa/4.0"><img src="cc_by_sa.png" class="img-fluid" style="width:3em" alt="CC BY-SA 4.0"> <span class="small grey">licence</span></a><br>
<a href="./">ADA511 <span class="small grey">0.2</span><br><span class="small grey">2024-10-30</span><br></a><a href="http://creativecommons.org/licenses/by-sa/4.0"><img src="cc_by_sa.png" class="img-fluid" style="width:3em" alt="CC BY-SA 4.0"> <span class="small grey">licence</span></a><br>
<div class="sidebar-tools-main">
<a href="" class="quarto-reader-toggle quarto-navigation-tool px-1" onclick="window.quartoToggleReader(); return false;" title="Toggle reader mode">
<div class="quarto-reader-toggle-btn">
Expand Down Expand Up @@ -585,7 +585,7 @@ <h1 class="title d-none d-lg-block"><span id="sec-dirichlet-mix" class="quarto-s
<div>
<div class="quarto-title-meta-heading">Published</div>
<div class="quarto-title-meta-contents">
<p class="date">2024-09-28</p>
<p class="date">2024-10-30</p>
</div>
</div>

Expand Down Expand Up @@ -935,7 +935,7 @@ <h2 data-number="32.3" class="anchored" data-anchor-id="sec-formulae-with-Dirmix
<i class="callout-icon no-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Note
&nbsp;
</div>
</div>
<div class="callout-body-container callout-body">
Expand Down
8 changes: 4 additions & 4 deletions docs/exchangeable_probabilities.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">

<meta name="dcterms.date" content="2024-09-05">
<meta name="dcterms.date" content="2024-10-30">

<title>ADA511 0.2 Data Science and AI prototyping - 28&nbsp; Exchangeable beliefs</title>
<style>
Expand Down Expand Up @@ -133,7 +133,7 @@ <h1 class="quarto-secondary-nav-title"><span id="sec-exchangeable-beliefs" class
<img src="./ada511logo8_small.png" alt="" class="sidebar-logo py-0 d-lg-inline d-none">
</a>
<div class="sidebar-title mb-0 py-0">
<a href="./">ADA511 <span class="small grey">0.2</span><br><span class="small grey">2024-09-05</span><br></a><a href="http://creativecommons.org/licenses/by-sa/4.0"><img src="cc_by_sa.png" class="img-fluid" style="width:3em" alt="CC BY-SA 4.0"> <span class="small grey">licence</span></a><br>
<a href="./">ADA511 <span class="small grey">0.2</span><br><span class="small grey">2024-10-30</span><br></a><a href="http://creativecommons.org/licenses/by-sa/4.0"><img src="cc_by_sa.png" class="img-fluid" style="width:3em" alt="CC BY-SA 4.0"> <span class="small grey">licence</span></a><br>
<div class="sidebar-tools-main">
<a href="" class="quarto-reader-toggle quarto-navigation-tool px-1" onclick="window.quartoToggleReader(); return false;" title="Toggle reader mode">
<div class="quarto-reader-toggle-btn">
Expand Down Expand Up @@ -582,7 +582,7 @@ <h1 class="title d-none d-lg-block"><span id="sec-exchangeable-beliefs" class="q
<div>
<div class="quarto-title-meta-heading">Published</div>
<div class="quarto-title-meta-contents">
<p class="date">2024-09-05</p>
<p class="date">2024-10-30</p>
</div>
</div>

Expand Down Expand Up @@ -793,7 +793,7 @@ <h2 data-number="28.3" class="anchored" data-anchor-id="sec-exchaneable-distr"><
<i class="callout-icon no-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Note
&nbsp;
</div>
</div>
<div class="callout-body-container callout-body">
Expand Down
8 changes: 4 additions & 4 deletions docs/framework.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">

<meta name="dcterms.date" content="2024-09-28">
<meta name="dcterms.date" content="2024-10-30">

<title>ADA511 0.2 Data Science and AI prototyping - 2&nbsp; Framework</title>
<style>
Expand Down Expand Up @@ -133,7 +133,7 @@ <h1 class="quarto-secondary-nav-title"><span id="sec-framework" class="quarto-se
<img src="./ada511logo8_small.png" alt="" class="sidebar-logo py-0 d-lg-inline d-none">
</a>
<div class="sidebar-title mb-0 py-0">
<a href="./">ADA511 <span class="small grey">0.2</span><br><span class="small grey">2024-09-28</span><br></a><a href="http://creativecommons.org/licenses/by-sa/4.0"><img src="cc_by_sa.png" class="img-fluid" style="width:3em" alt="CC BY-SA 4.0"> <span class="small grey">licence</span></a><br>
<a href="./">ADA511 <span class="small grey">0.2</span><br><span class="small grey">2024-10-30</span><br></a><a href="http://creativecommons.org/licenses/by-sa/4.0"><img src="cc_by_sa.png" class="img-fluid" style="width:3em" alt="CC BY-SA 4.0"> <span class="small grey">licence</span></a><br>
<div class="sidebar-tools-main">
<a href="" class="quarto-reader-toggle quarto-navigation-tool px-1" onclick="window.quartoToggleReader(); return false;" title="Toggle reader mode">
<div class="quarto-reader-toggle-btn">
Expand Down Expand Up @@ -580,7 +580,7 @@ <h1 class="title d-none d-lg-block"><span id="sec-framework" class="quarto-secti
<div>
<div class="quarto-title-meta-heading">Published</div>
<div class="quarto-title-meta-contents">
<p class="date">2024-09-28</p>
<p class="date">2024-10-30</p>
</div>
</div>

Expand Down Expand Up @@ -769,7 +769,7 @@ <h2 data-number="2.3" class="anchored" data-anchor-id="sec-optimality"><span cla
<i class="callout-icon no-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Note
&nbsp;
</div>
</div>
<div class="callout-body-container callout-body">
Expand Down
6 changes: 3 additions & 3 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<meta name="author" content="S. Mæland ORCID">
<meta name="author" content="P.G.L. Porta Mana ORCID ">
<meta name="dcterms.date" content="2024-10-18">
<meta name="dcterms.date" content="2024-10-30">

<title>ADA511 0.2 Data Science and AI prototyping</title>
<style>
Expand Down Expand Up @@ -134,7 +134,7 @@ <h1 class="quarto-secondary-nav-title">ADA511 <span class="small grey">0.2</span
<img src="./ada511logo8_small.png" alt="" class="sidebar-logo py-0 d-lg-inline d-none">
</a>
<div class="sidebar-title mb-0 py-0">
<a href="./">ADA511 <span class="small grey">0.2</span><br><span class="small grey">2024-10-18</span><br></a><a href="http://creativecommons.org/licenses/by-sa/4.0"><img src="cc_by_sa.png" class="img-fluid" style="width:3em" alt="CC BY-SA 4.0"> <span class="small grey">licence</span></a><br>
<a href="./">ADA511 <span class="small grey">0.2</span><br><span class="small grey">2024-10-30</span><br></a><a href="http://creativecommons.org/licenses/by-sa/4.0"><img src="cc_by_sa.png" class="img-fluid" style="width:3em" alt="CC BY-SA 4.0"> <span class="small grey">licence</span></a><br>
<div class="sidebar-tools-main">
<a href="" class="quarto-reader-toggle quarto-navigation-tool px-1" onclick="window.quartoToggleReader(); return false;" title="Toggle reader mode">
<div class="quarto-reader-toggle-btn">
Expand Down Expand Up @@ -589,7 +589,7 @@ <h1 class="title d-none d-lg-block">ADA511 <span class="small grey">0.2</span> <
<div>
<div class="quarto-title-meta-heading">Published</div>
<div class="quarto-title-meta-contents">
<p class="date">2024-10-18</p>
<p class="date">2024-10-30</p>
</div>
</div>

Expand Down
8 changes: 4 additions & 4 deletions docs/inference.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">

<meta name="dcterms.date" content="2024-10-10">
<meta name="dcterms.date" content="2024-10-30">

<title>ADA511 0.2 Data Science and AI prototyping - 5&nbsp; What is an inference?</title>
<style>
Expand Down Expand Up @@ -133,7 +133,7 @@ <h1 class="quarto-secondary-nav-title"><span id="sec-what-inference" class="quar
<img src="./ada511logo8_small.png" alt="" class="sidebar-logo py-0 d-lg-inline d-none">
</a>
<div class="sidebar-title mb-0 py-0">
<a href="./">ADA511 <span class="small grey">0.2</span><br><span class="small grey">2024-10-10</span><br></a><a href="http://creativecommons.org/licenses/by-sa/4.0"><img src="cc_by_sa.png" class="img-fluid" style="width:3em" alt="CC BY-SA 4.0"> <span class="small grey">licence</span></a><br>
<a href="./">ADA511 <span class="small grey">0.2</span><br><span class="small grey">2024-10-30</span><br></a><a href="http://creativecommons.org/licenses/by-sa/4.0"><img src="cc_by_sa.png" class="img-fluid" style="width:3em" alt="CC BY-SA 4.0"> <span class="small grey">licence</span></a><br>
<div class="sidebar-tools-main">
<a href="" class="quarto-reader-toggle quarto-navigation-tool px-1" onclick="window.quartoToggleReader(); return false;" title="Toggle reader mode">
<div class="quarto-reader-toggle-btn">
Expand Down Expand Up @@ -579,7 +579,7 @@ <h1 class="title d-none d-lg-block"><span id="sec-what-inference" class="quarto-
<div>
<div class="quarto-title-meta-heading">Published</div>
<div class="quarto-title-meta-contents">
<p class="date">2024-10-10</p>
<p class="date">2024-10-30</p>
</div>
</div>

Expand Down Expand Up @@ -702,7 +702,7 @@ <h2 data-number="5.2" class="anchored" data-anchor-id="sec-inference-origin"><sp
<i class="callout-icon no-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Note
&nbsp;
</div>
</div>
<div class="callout-body-container callout-body">
Expand Down
Loading

0 comments on commit 666fe89

Please sign in to comment.