From 6fe1e826984b114e5c7edb81aec03c7269dab893 Mon Sep 17 00:00:00 2001 From: Morten Hjorth-Jensen Date: Mon, 18 Aug 2025 09:02:01 +0200 Subject: [PATCH] update --- doc/pub/week34/html/._week34-bs000.html | 16 +- doc/pub/week34/html/._week34-bs001.html | 16 +- doc/pub/week34/html/._week34-bs002.html | 16 +- doc/pub/week34/html/._week34-bs003.html | 16 +- doc/pub/week34/html/._week34-bs004.html | 16 +- doc/pub/week34/html/._week34-bs005.html | 16 +- doc/pub/week34/html/._week34-bs006.html | 16 +- doc/pub/week34/html/._week34-bs007.html | 16 +- doc/pub/week34/html/._week34-bs008.html | 16 +- doc/pub/week34/html/._week34-bs009.html | 16 +- doc/pub/week34/html/._week34-bs010.html | 16 +- doc/pub/week34/html/._week34-bs011.html | 16 +- doc/pub/week34/html/._week34-bs012.html | 16 +- doc/pub/week34/html/._week34-bs013.html | 16 +- doc/pub/week34/html/._week34-bs014.html | 16 +- doc/pub/week34/html/._week34-bs015.html | 16 +- doc/pub/week34/html/._week34-bs016.html | 16 +- doc/pub/week34/html/._week34-bs017.html | 16 +- doc/pub/week34/html/._week34-bs018.html | 16 +- doc/pub/week34/html/._week34-bs019.html | 16 +- doc/pub/week34/html/._week34-bs020.html | 16 +- doc/pub/week34/html/._week34-bs021.html | 16 +- doc/pub/week34/html/._week34-bs022.html | 16 +- doc/pub/week34/html/._week34-bs023.html | 16 +- doc/pub/week34/html/._week34-bs024.html | 16 +- doc/pub/week34/html/._week34-bs025.html | 16 +- doc/pub/week34/html/._week34-bs026.html | 16 +- doc/pub/week34/html/._week34-bs027.html | 16 +- doc/pub/week34/html/._week34-bs028.html | 16 +- doc/pub/week34/html/._week34-bs029.html | 16 +- doc/pub/week34/html/._week34-bs030.html | 16 +- doc/pub/week34/html/._week34-bs031.html | 16 +- doc/pub/week34/html/._week34-bs032.html | 16 +- doc/pub/week34/html/._week34-bs033.html | 16 +- doc/pub/week34/html/._week34-bs034.html | 16 +- doc/pub/week34/html/._week34-bs035.html | 16 +- doc/pub/week34/html/._week34-bs036.html | 16 +- doc/pub/week34/html/._week34-bs037.html | 16 +- doc/pub/week34/html/._week34-bs038.html | 16 +- doc/pub/week34/html/._week34-bs039.html | 16 +- doc/pub/week34/html/._week34-bs040.html | 16 +- doc/pub/week34/html/._week34-bs041.html | 16 +- doc/pub/week34/html/._week34-bs042.html | 16 +- doc/pub/week34/html/._week34-bs043.html | 16 +- doc/pub/week34/html/._week34-bs044.html | 50 +- doc/pub/week34/html/._week34-bs045.html | 20 +- doc/pub/week34/html/._week34-bs046.html | 24 +- doc/pub/week34/html/._week34-bs047.html | 22 +- doc/pub/week34/html/._week34-bs048.html | 16 +- doc/pub/week34/html/._week34-bs049.html | 18 +- doc/pub/week34/html/._week34-bs050.html | 24 +- doc/pub/week34/html/._week34-bs051.html | 20 +- doc/pub/week34/html/._week34-bs052.html | 26 +- doc/pub/week34/html/._week34-bs053.html | 20 +- doc/pub/week34/html/._week34-bs054.html | 26 +- doc/pub/week34/html/._week34-bs055.html | 20 +- doc/pub/week34/html/._week34-bs056.html | 30 +- doc/pub/week34/html/._week34-bs057.html | 32 +- doc/pub/week34/html/._week34-bs058.html | 22 +- doc/pub/week34/html/._week34-bs059.html | 25 +- doc/pub/week34/html/._week34-bs060.html | 20 +- doc/pub/week34/html/._week34-bs061.html | 17 +- doc/pub/week34/html/._week34-bs062.html | 19 +- doc/pub/week34/html/._week34-bs063.html | 25 +- doc/pub/week34/html/._week34-bs064.html | 23 +- doc/pub/week34/html/._week34-bs065.html | 27 +- doc/pub/week34/html/._week34-bs066.html | 25 +- doc/pub/week34/html/week34-bs.html | 16 +- doc/pub/week34/html/week34-reveal.html | 426 ++----- doc/pub/week34/html/week34-solarized.html | 435 ++----- doc/pub/week34/html/week34.html | 435 ++----- .../ipynb/Results/FigureFiles/Masses2016.png | Bin 24916 -> 23538 bytes .../Results/FigureFiles/Masses2016OLS.png | Bin 12483 -> 24916 bytes doc/pub/week34/ipynb/ipynb-week34-src.tar.gz | Bin 1724224 -> 1724224 bytes doc/pub/week34/ipynb/week34.ipynb | 1019 ++++++----------- doc/pub/week34/pdf/week34.pdf | Bin 2281524 -> 2273735 bytes doc/src/week34/week34.do.txt | 363 ++---- 77 files changed, 867 insertions(+), 3082 deletions(-) diff --git a/doc/pub/week34/html/._week34-bs000.html b/doc/pub/week34/html/._week34-bs000.html index 69699453d..eb43b71be 100644 --- a/doc/pub/week34/html/._week34-bs000.html +++ b/doc/pub/week34/html/._week34-bs000.html @@ -232,16 +232,7 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('Fitting an Equation of State for Dense Nuclear Matter', - 2, - None, - 'fitting-an-equation-of-state-for-dense-nuclear-matter'), - ('The code', 2, None, 'the-code'), - ('Splitting our Data in Training and Test data', - 2, - None, - 'splitting-our-data-in-training-and-test-data')]} + ('The $\\chi^2$ function', 2, None, 'the-chi-2-function')]} end of tocinfo --> @@ -347,9 +338,6 @@ MathJax.Hub.Config({
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Fitting an Equation of State for Dense Nuclear Matter
  • -
  • The code
  • -
  • Splitting our Data in Training and Test data
  • @@ -401,7 +389,7 @@ MathJax.Hub.Config({
  • 9
  • 10
  • ...
  • -
  • 71
  • +
  • 68
  • »
  • diff --git a/doc/pub/week34/html/._week34-bs001.html b/doc/pub/week34/html/._week34-bs001.html index 16281083f..8e040eb15 100644 --- a/doc/pub/week34/html/._week34-bs001.html +++ b/doc/pub/week34/html/._week34-bs001.html @@ -232,16 +232,7 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('Fitting an Equation of State for Dense Nuclear Matter', - 2, - None, - 'fitting-an-equation-of-state-for-dense-nuclear-matter'), - ('The code', 2, None, 'the-code'), - ('Splitting our Data in Training and Test data', - 2, - None, - 'splitting-our-data-in-training-and-test-data')]} + ('The $\\chi^2$ function', 2, None, 'the-chi-2-function')]} end of tocinfo --> @@ -347,9 +338,6 @@ MathJax.Hub.Config({
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Fitting an Equation of State for Dense Nuclear Matter
  • -
  • The code
  • -
  • Splitting our Data in Training and Test data
  • @@ -392,7 +380,7 @@ MathJax.Hub.Config({
  • 10
  • 11
  • ...
  • -
  • 71
  • +
  • 68
  • »
  • diff --git a/doc/pub/week34/html/._week34-bs002.html b/doc/pub/week34/html/._week34-bs002.html index e0580ccb4..716cbc10b 100644 --- a/doc/pub/week34/html/._week34-bs002.html +++ b/doc/pub/week34/html/._week34-bs002.html @@ -232,16 +232,7 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('Fitting an Equation of State for Dense Nuclear Matter', - 2, - None, - 'fitting-an-equation-of-state-for-dense-nuclear-matter'), - ('The code', 2, None, 'the-code'), - ('Splitting our Data in Training and Test data', - 2, - None, - 'splitting-our-data-in-training-and-test-data')]} + ('The $\\chi^2$ function', 2, None, 'the-chi-2-function')]} end of tocinfo --> @@ -347,9 +338,6 @@ MathJax.Hub.Config({
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Fitting an Equation of State for Dense Nuclear Matter
  • -
  • The code
  • -
  • Splitting our Data in Training and Test data
  • @@ -392,7 +380,7 @@ MathJax.Hub.Config({
  • 11
  • 12
  • ...
  • -
  • 71
  • +
  • 68
  • »
  • diff --git a/doc/pub/week34/html/._week34-bs003.html b/doc/pub/week34/html/._week34-bs003.html index 312f9fdfc..41bd177fb 100644 --- a/doc/pub/week34/html/._week34-bs003.html +++ b/doc/pub/week34/html/._week34-bs003.html @@ -232,16 +232,7 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('Fitting an Equation of State for Dense Nuclear Matter', - 2, - None, - 'fitting-an-equation-of-state-for-dense-nuclear-matter'), - ('The code', 2, None, 'the-code'), - ('Splitting our Data in Training and Test data', - 2, - None, - 'splitting-our-data-in-training-and-test-data')]} + ('The $\\chi^2$ function', 2, None, 'the-chi-2-function')]} end of tocinfo --> @@ -347,9 +338,6 @@ MathJax.Hub.Config({
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Fitting an Equation of State for Dense Nuclear Matter
  • -
  • The code
  • -
  • Splitting our Data in Training and Test data
  • @@ -397,7 +385,7 @@ MathJax.Hub.Config({
  • 12
  • 13
  • ...
  • -
  • 71
  • +
  • 68
  • »
  • diff --git a/doc/pub/week34/html/._week34-bs004.html b/doc/pub/week34/html/._week34-bs004.html index 225b9de98..8b43d8dcc 100644 --- a/doc/pub/week34/html/._week34-bs004.html +++ b/doc/pub/week34/html/._week34-bs004.html @@ -232,16 +232,7 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('Fitting an Equation of State for Dense Nuclear Matter', - 2, - None, - 'fitting-an-equation-of-state-for-dense-nuclear-matter'), - ('The code', 2, None, 'the-code'), - ('Splitting our Data in Training and Test data', - 2, - None, - 'splitting-our-data-in-training-and-test-data')]} + ('The $\\chi^2$ function', 2, None, 'the-chi-2-function')]} end of tocinfo --> @@ -347,9 +338,6 @@ MathJax.Hub.Config({
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Fitting an Equation of State for Dense Nuclear Matter
  • -
  • The code
  • -
  • Splitting our Data in Training and Test data
  • @@ -386,7 +374,7 @@ MathJax.Hub.Config({
  • 13
  • 14
  • ...
  • -
  • 71
  • +
  • 68
  • »
  • diff --git a/doc/pub/week34/html/._week34-bs005.html b/doc/pub/week34/html/._week34-bs005.html index d68b68c23..83eb9dc48 100644 --- a/doc/pub/week34/html/._week34-bs005.html +++ b/doc/pub/week34/html/._week34-bs005.html @@ -232,16 +232,7 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('Fitting an Equation of State for Dense Nuclear Matter', - 2, - None, - 'fitting-an-equation-of-state-for-dense-nuclear-matter'), - ('The code', 2, None, 'the-code'), - ('Splitting our Data in Training and Test data', - 2, - None, - 'splitting-our-data-in-training-and-test-data')]} + ('The $\\chi^2$ function', 2, None, 'the-chi-2-function')]} end of tocinfo --> @@ -347,9 +338,6 @@ MathJax.Hub.Config({
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Fitting an Equation of State for Dense Nuclear Matter
  • -
  • The code
  • -
  • Splitting our Data in Training and Test data
  • @@ -393,7 +381,7 @@ MathJax.Hub.Config({
  • 14
  • 15
  • ...
  • -
  • 71
  • +
  • 68
  • »
  • diff --git a/doc/pub/week34/html/._week34-bs006.html b/doc/pub/week34/html/._week34-bs006.html index 02b5b74bc..8515293ed 100644 --- a/doc/pub/week34/html/._week34-bs006.html +++ b/doc/pub/week34/html/._week34-bs006.html @@ -232,16 +232,7 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('Fitting an Equation of State for Dense Nuclear Matter', - 2, - None, - 'fitting-an-equation-of-state-for-dense-nuclear-matter'), - ('The code', 2, None, 'the-code'), - ('Splitting our Data in Training and Test data', - 2, - None, - 'splitting-our-data-in-training-and-test-data')]} + ('The $\\chi^2$ function', 2, None, 'the-chi-2-function')]} end of tocinfo --> @@ -347,9 +338,6 @@ MathJax.Hub.Config({
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Fitting an Equation of State for Dense Nuclear Matter
  • -
  • The code
  • -
  • Splitting our Data in Training and Test data
  • @@ -398,7 +386,7 @@ MathJax.Hub.Config({
  • 15
  • 16
  • ...
  • -
  • 71
  • +
  • 68
  • »
  • diff --git a/doc/pub/week34/html/._week34-bs007.html b/doc/pub/week34/html/._week34-bs007.html index 343937b70..decf29aab 100644 --- a/doc/pub/week34/html/._week34-bs007.html +++ b/doc/pub/week34/html/._week34-bs007.html @@ -232,16 +232,7 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('Fitting an Equation of State for Dense Nuclear Matter', - 2, - None, - 'fitting-an-equation-of-state-for-dense-nuclear-matter'), - ('The code', 2, None, 'the-code'), - ('Splitting our Data in Training and Test data', - 2, - None, - 'splitting-our-data-in-training-and-test-data')]} + ('The $\\chi^2$ function', 2, None, 'the-chi-2-function')]} end of tocinfo --> @@ -347,9 +338,6 @@ MathJax.Hub.Config({
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Fitting an Equation of State for Dense Nuclear Matter
  • -
  • The code
  • -
  • Splitting our Data in Training and Test data
  • @@ -398,7 +386,7 @@ MathJax.Hub.Config({
  • 16
  • 17
  • ...
  • -
  • 71
  • +
  • 68
  • »
  • diff --git a/doc/pub/week34/html/._week34-bs008.html b/doc/pub/week34/html/._week34-bs008.html index 5e2fc3534..49d2b88f2 100644 --- a/doc/pub/week34/html/._week34-bs008.html +++ b/doc/pub/week34/html/._week34-bs008.html @@ -232,16 +232,7 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('Fitting an Equation of State for Dense Nuclear Matter', - 2, - None, - 'fitting-an-equation-of-state-for-dense-nuclear-matter'), - ('The code', 2, None, 'the-code'), - ('Splitting our Data in Training and Test data', - 2, - None, - 'splitting-our-data-in-training-and-test-data')]} + ('The $\\chi^2$ function', 2, None, 'the-chi-2-function')]} end of tocinfo --> @@ -347,9 +338,6 @@ MathJax.Hub.Config({
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Fitting an Equation of State for Dense Nuclear Matter
  • -
  • The code
  • -
  • Splitting our Data in Training and Test data
  • @@ -400,7 +388,7 @@ MathJax.Hub.Config({
  • 17
  • 18
  • ...
  • -
  • 71
  • +
  • 68
  • »
  • diff --git a/doc/pub/week34/html/._week34-bs009.html b/doc/pub/week34/html/._week34-bs009.html index a10f6546e..6e1a68d60 100644 --- a/doc/pub/week34/html/._week34-bs009.html +++ b/doc/pub/week34/html/._week34-bs009.html @@ -232,16 +232,7 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('Fitting an Equation of State for Dense Nuclear Matter', - 2, - None, - 'fitting-an-equation-of-state-for-dense-nuclear-matter'), - ('The code', 2, None, 'the-code'), - ('Splitting our Data in Training and Test data', - 2, - None, - 'splitting-our-data-in-training-and-test-data')]} + ('The $\\chi^2$ function', 2, None, 'the-chi-2-function')]} end of tocinfo --> @@ -347,9 +338,6 @@ MathJax.Hub.Config({
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Fitting an Equation of State for Dense Nuclear Matter
  • -
  • The code
  • -
  • Splitting our Data in Training and Test data
  • @@ -401,7 +389,7 @@ al is also widely used in the Machine Learning community. See next slide for lin
  • 18
  • 19
  • ...
  • -
  • 71
  • +
  • 68
  • »
  • diff --git a/doc/pub/week34/html/._week34-bs010.html b/doc/pub/week34/html/._week34-bs010.html index 551ae6e9a..8c2f2c74a 100644 --- a/doc/pub/week34/html/._week34-bs010.html +++ b/doc/pub/week34/html/._week34-bs010.html @@ -232,16 +232,7 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('Fitting an Equation of State for Dense Nuclear Matter', - 2, - None, - 'fitting-an-equation-of-state-for-dense-nuclear-matter'), - ('The code', 2, None, 'the-code'), - ('Splitting our Data in Training and Test data', - 2, - None, - 'splitting-our-data-in-training-and-test-data')]} + ('The $\\chi^2$ function', 2, None, 'the-chi-2-function')]} end of tocinfo --> @@ -347,9 +338,6 @@ MathJax.Hub.Config({
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Fitting an Equation of State for Dense Nuclear Matter
  • -
  • The code
  • -
  • Splitting our Data in Training and Test data
  • @@ -403,7 +391,7 @@ Each chapter of RLM gives access to the pertinent notebooks. These notebooks are
  • 19
  • 20
  • ...
  • -
  • 71
  • +
  • 68
  • »
  • diff --git a/doc/pub/week34/html/._week34-bs011.html b/doc/pub/week34/html/._week34-bs011.html index ea01b2680..184e4e222 100644 --- a/doc/pub/week34/html/._week34-bs011.html +++ b/doc/pub/week34/html/._week34-bs011.html @@ -232,16 +232,7 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('Fitting an Equation of State for Dense Nuclear Matter', - 2, - None, - 'fitting-an-equation-of-state-for-dense-nuclear-matter'), - ('The code', 2, None, 'the-code'), - ('Splitting our Data in Training and Test data', - 2, - None, - 'splitting-our-data-in-training-and-test-data')]} + ('The $\\chi^2$ function', 2, None, 'the-chi-2-function')]} end of tocinfo --> @@ -347,9 +338,6 @@ MathJax.Hub.Config({
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Fitting an Equation of State for Dense Nuclear Matter
  • -
  • The code
  • -
  • Splitting our Data in Training and Test data
  • @@ -403,7 +391,7 @@ MathJax.Hub.Config({
  • 20
  • 21
  • ...
  • -
  • 71
  • +
  • 68
  • »
  • diff --git a/doc/pub/week34/html/._week34-bs012.html b/doc/pub/week34/html/._week34-bs012.html index 20ec204fa..9f836de4a 100644 --- a/doc/pub/week34/html/._week34-bs012.html +++ b/doc/pub/week34/html/._week34-bs012.html @@ -232,16 +232,7 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('Fitting an Equation of State for Dense Nuclear Matter', - 2, - None, - 'fitting-an-equation-of-state-for-dense-nuclear-matter'), - ('The code', 2, None, 'the-code'), - ('Splitting our Data in Training and Test data', - 2, - None, - 'splitting-our-data-in-training-and-test-data')]} + ('The $\\chi^2$ function', 2, None, 'the-chi-2-function')]} end of tocinfo --> @@ -347,9 +338,6 @@ MathJax.Hub.Config({
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Fitting an Equation of State for Dense Nuclear Matter
  • -
  • The code
  • -
  • Splitting our Data in Training and Test data
  • @@ -396,7 +384,7 @@ MathJax.Hub.Config({
  • 21
  • 22
  • ...
  • -
  • 71
  • +
  • 68
  • »
  • diff --git a/doc/pub/week34/html/._week34-bs013.html b/doc/pub/week34/html/._week34-bs013.html index 4f2e5a65b..bfa8125ea 100644 --- a/doc/pub/week34/html/._week34-bs013.html +++ b/doc/pub/week34/html/._week34-bs013.html @@ -232,16 +232,7 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('Fitting an Equation of State for Dense Nuclear Matter', - 2, - None, - 'fitting-an-equation-of-state-for-dense-nuclear-matter'), - ('The code', 2, None, 'the-code'), - ('Splitting our Data in Training and Test data', - 2, - None, - 'splitting-our-data-in-training-and-test-data')]} + ('The $\\chi^2$ function', 2, None, 'the-chi-2-function')]} end of tocinfo --> @@ -347,9 +338,6 @@ MathJax.Hub.Config({
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Fitting an Equation of State for Dense Nuclear Matter
  • -
  • The code
  • -
  • Splitting our Data in Training and Test data
  • @@ -399,7 +387,7 @@ Python is the recurring programming language.
  • 22
  • 23
  • ...
  • -
  • 71
  • +
  • 68
  • »
  • diff --git a/doc/pub/week34/html/._week34-bs014.html b/doc/pub/week34/html/._week34-bs014.html index e69eaa0f1..5d9a494c2 100644 --- a/doc/pub/week34/html/._week34-bs014.html +++ b/doc/pub/week34/html/._week34-bs014.html @@ -232,16 +232,7 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('Fitting an Equation of State for Dense Nuclear Matter', - 2, - None, - 'fitting-an-equation-of-state-for-dense-nuclear-matter'), - ('The code', 2, None, 'the-code'), - ('Splitting our Data in Training and Test data', - 2, - None, - 'splitting-our-data-in-training-and-test-data')]} + ('The $\\chi^2$ function', 2, None, 'the-chi-2-function')]} end of tocinfo --> @@ -347,9 +338,6 @@ MathJax.Hub.Config({
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Fitting an Equation of State for Dense Nuclear Matter
  • -
  • The code
  • -
  • Splitting our Data in Training and Test data
  • @@ -396,7 +384,7 @@ MathJax.Hub.Config({
  • 23
  • 24
  • ...
  • -
  • 71
  • +
  • 68
  • »
  • diff --git a/doc/pub/week34/html/._week34-bs015.html b/doc/pub/week34/html/._week34-bs015.html index ed4941396..515956b41 100644 --- a/doc/pub/week34/html/._week34-bs015.html +++ b/doc/pub/week34/html/._week34-bs015.html @@ -232,16 +232,7 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('Fitting an Equation of State for Dense Nuclear Matter', - 2, - None, - 'fitting-an-equation-of-state-for-dense-nuclear-matter'), - ('The code', 2, None, 'the-code'), - ('Splitting our Data in Training and Test data', - 2, - None, - 'splitting-our-data-in-training-and-test-data')]} + ('The $\\chi^2$ function', 2, None, 'the-chi-2-function')]} end of tocinfo --> @@ -347,9 +338,6 @@ MathJax.Hub.Config({
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Fitting an Equation of State for Dense Nuclear Matter
  • -
  • The code
  • -
  • Splitting our Data in Training and Test data
  • @@ -398,7 +386,7 @@ MathJax.Hub.Config({
  • 24
  • 25
  • ...
  • -
  • 71
  • +
  • 68
  • »
  • diff --git a/doc/pub/week34/html/._week34-bs016.html b/doc/pub/week34/html/._week34-bs016.html index d631c5f36..ef65bfa7d 100644 --- a/doc/pub/week34/html/._week34-bs016.html +++ b/doc/pub/week34/html/._week34-bs016.html @@ -232,16 +232,7 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('Fitting an Equation of State for Dense Nuclear Matter', - 2, - None, - 'fitting-an-equation-of-state-for-dense-nuclear-matter'), - ('The code', 2, None, 'the-code'), - ('Splitting our Data in Training and Test data', - 2, - None, - 'splitting-our-data-in-training-and-test-data')]} + ('The $\\chi^2$ function', 2, None, 'the-chi-2-function')]} end of tocinfo --> @@ -347,9 +338,6 @@ MathJax.Hub.Config({
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Fitting an Equation of State for Dense Nuclear Matter
  • -
  • The code
  • -
  • Splitting our Data in Training and Test data
  • @@ -398,7 +386,7 @@ MathJax.Hub.Config({
  • 25
  • 26
  • ...
  • -
  • 71
  • +
  • 68
  • »
  • diff --git a/doc/pub/week34/html/._week34-bs017.html b/doc/pub/week34/html/._week34-bs017.html index 70fb011e7..4d1296c36 100644 --- a/doc/pub/week34/html/._week34-bs017.html +++ b/doc/pub/week34/html/._week34-bs017.html @@ -232,16 +232,7 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('Fitting an Equation of State for Dense Nuclear Matter', - 2, - None, - 'fitting-an-equation-of-state-for-dense-nuclear-matter'), - ('The code', 2, None, 'the-code'), - ('Splitting our Data in Training and Test data', - 2, - None, - 'splitting-our-data-in-training-and-test-data')]} + ('The $\\chi^2$ function', 2, None, 'the-chi-2-function')]} end of tocinfo --> @@ -347,9 +338,6 @@ MathJax.Hub.Config({
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Fitting an Equation of State for Dense Nuclear Matter
  • -
  • The code
  • -
  • Splitting our Data in Training and Test data
  • @@ -400,7 +388,7 @@ MathJax.Hub.Config({
  • 26
  • 27
  • ...
  • -
  • 71
  • +
  • 68
  • »
  • diff --git a/doc/pub/week34/html/._week34-bs018.html b/doc/pub/week34/html/._week34-bs018.html index 8415c7801..f8d52c910 100644 --- a/doc/pub/week34/html/._week34-bs018.html +++ b/doc/pub/week34/html/._week34-bs018.html @@ -232,16 +232,7 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('Fitting an Equation of State for Dense Nuclear Matter', - 2, - None, - 'fitting-an-equation-of-state-for-dense-nuclear-matter'), - ('The code', 2, None, 'the-code'), - ('Splitting our Data in Training and Test data', - 2, - None, - 'splitting-our-data-in-training-and-test-data')]} + ('The $\\chi^2$ function', 2, None, 'the-chi-2-function')]} end of tocinfo --> @@ -347,9 +338,6 @@ MathJax.Hub.Config({
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Fitting an Equation of State for Dense Nuclear Matter
  • -
  • The code
  • -
  • Splitting our Data in Training and Test data
  • @@ -399,7 +387,7 @@ MathJax.Hub.Config({
  • 27
  • 28
  • ...
  • -
  • 71
  • +
  • 68
  • »
  • diff --git a/doc/pub/week34/html/._week34-bs019.html b/doc/pub/week34/html/._week34-bs019.html index df83b6d3b..ba98aa4ed 100644 --- a/doc/pub/week34/html/._week34-bs019.html +++ b/doc/pub/week34/html/._week34-bs019.html @@ -232,16 +232,7 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('Fitting an Equation of State for Dense Nuclear Matter', - 2, - None, - 'fitting-an-equation-of-state-for-dense-nuclear-matter'), - ('The code', 2, None, 'the-code'), - ('Splitting our Data in Training and Test data', - 2, - None, - 'splitting-our-data-in-training-and-test-data')]} + ('The $\\chi^2$ function', 2, None, 'the-chi-2-function')]} end of tocinfo --> @@ -347,9 +338,6 @@ MathJax.Hub.Config({
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Fitting an Equation of State for Dense Nuclear Matter
  • -
  • The code
  • -
  • Splitting our Data in Training and Test data
  • @@ -396,7 +384,7 @@ MathJax.Hub.Config({
  • 28
  • 29
  • ...
  • -
  • 71
  • +
  • 68
  • »
  • diff --git a/doc/pub/week34/html/._week34-bs020.html b/doc/pub/week34/html/._week34-bs020.html index 1c5261f66..5d2446ce1 100644 --- a/doc/pub/week34/html/._week34-bs020.html +++ b/doc/pub/week34/html/._week34-bs020.html @@ -232,16 +232,7 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('Fitting an Equation of State for Dense Nuclear Matter', - 2, - None, - 'fitting-an-equation-of-state-for-dense-nuclear-matter'), - ('The code', 2, None, 'the-code'), - ('Splitting our Data in Training and Test data', - 2, - None, - 'splitting-our-data-in-training-and-test-data')]} + ('The $\\chi^2$ function', 2, None, 'the-chi-2-function')]} end of tocinfo --> @@ -347,9 +338,6 @@ MathJax.Hub.Config({
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Fitting an Equation of State for Dense Nuclear Matter
  • -
  • The code
  • -
  • Splitting our Data in Training and Test data
  • @@ -401,7 +389,7 @@ MathJax.Hub.Config({
  • 29
  • 30
  • ...
  • -
  • 71
  • +
  • 68
  • »
  • diff --git a/doc/pub/week34/html/._week34-bs021.html b/doc/pub/week34/html/._week34-bs021.html index bcc298249..657370eac 100644 --- a/doc/pub/week34/html/._week34-bs021.html +++ b/doc/pub/week34/html/._week34-bs021.html @@ -232,16 +232,7 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('Fitting an Equation of State for Dense Nuclear Matter', - 2, - None, - 'fitting-an-equation-of-state-for-dense-nuclear-matter'), - ('The code', 2, None, 'the-code'), - ('Splitting our Data in Training and Test data', - 2, - None, - 'splitting-our-data-in-training-and-test-data')]} + ('The $\\chi^2$ function', 2, None, 'the-chi-2-function')]} end of tocinfo --> @@ -347,9 +338,6 @@ MathJax.Hub.Config({
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Fitting an Equation of State for Dense Nuclear Matter
  • -
  • The code
  • -
  • Splitting our Data in Training and Test data
  • @@ -407,7 +395,7 @@ MathJax.Hub.Config({
  • 30
  • 31
  • ...
  • -
  • 71
  • +
  • 68
  • »
  • diff --git a/doc/pub/week34/html/._week34-bs022.html b/doc/pub/week34/html/._week34-bs022.html index 962b7881d..9c37bd750 100644 --- a/doc/pub/week34/html/._week34-bs022.html +++ b/doc/pub/week34/html/._week34-bs022.html @@ -232,16 +232,7 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('Fitting an Equation of State for Dense Nuclear Matter', - 2, - None, - 'fitting-an-equation-of-state-for-dense-nuclear-matter'), - ('The code', 2, None, 'the-code'), - ('Splitting our Data in Training and Test data', - 2, - None, - 'splitting-our-data-in-training-and-test-data')]} + ('The $\\chi^2$ function', 2, None, 'the-chi-2-function')]} end of tocinfo --> @@ -347,9 +338,6 @@ MathJax.Hub.Config({
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Fitting an Equation of State for Dense Nuclear Matter
  • -
  • The code
  • -
  • Splitting our Data in Training and Test data
  • @@ -408,7 +396,7 @@ desired output of a system. Some of the most common tasks are:
  • 31
  • 32
  • ...
  • -
  • 71
  • +
  • 68
  • »
  • diff --git a/doc/pub/week34/html/._week34-bs023.html b/doc/pub/week34/html/._week34-bs023.html index e2dd94f6b..ab50cdc0c 100644 --- a/doc/pub/week34/html/._week34-bs023.html +++ b/doc/pub/week34/html/._week34-bs023.html @@ -232,16 +232,7 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('Fitting an Equation of State for Dense Nuclear Matter', - 2, - None, - 'fitting-an-equation-of-state-for-dense-nuclear-matter'), - ('The code', 2, None, 'the-code'), - ('Splitting our Data in Training and Test data', - 2, - None, - 'splitting-our-data-in-training-and-test-data')]} + ('The $\\chi^2$ function', 2, None, 'the-chi-2-function')]} end of tocinfo --> @@ -347,9 +338,6 @@ MathJax.Hub.Config({
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Fitting an Equation of State for Dense Nuclear Matter
  • -
  • The code
  • -
  • Splitting our Data in Training and Test data
  • @@ -399,7 +387,7 @@ whether we deal with supervised or unsupervised learning.
  • 32
  • 33
  • ...
  • -
  • 71
  • +
  • 68
  • »
  • diff --git a/doc/pub/week34/html/._week34-bs024.html b/doc/pub/week34/html/._week34-bs024.html index a93fcac14..b8dd98551 100644 --- a/doc/pub/week34/html/._week34-bs024.html +++ b/doc/pub/week34/html/._week34-bs024.html @@ -232,16 +232,7 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('Fitting an Equation of State for Dense Nuclear Matter', - 2, - None, - 'fitting-an-equation-of-state-for-dense-nuclear-matter'), - ('The code', 2, None, 'the-code'), - ('Splitting our Data in Training and Test data', - 2, - None, - 'splitting-our-data-in-training-and-test-data')]} + ('The $\\chi^2$ function', 2, None, 'the-chi-2-function')]} end of tocinfo --> @@ -347,9 +338,6 @@ MathJax.Hub.Config({
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Fitting an Equation of State for Dense Nuclear Matter
  • -
  • The code
  • -
  • Splitting our Data in Training and Test data
  • @@ -390,7 +378,7 @@ MathJax.Hub.Config({
  • 33
  • 34
  • ...
  • -
  • 71
  • +
  • 68
  • »
  • diff --git a/doc/pub/week34/html/._week34-bs025.html b/doc/pub/week34/html/._week34-bs025.html index 36ee70de7..0234a9bf9 100644 --- a/doc/pub/week34/html/._week34-bs025.html +++ b/doc/pub/week34/html/._week34-bs025.html @@ -232,16 +232,7 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('Fitting an Equation of State for Dense Nuclear Matter', - 2, - None, - 'fitting-an-equation-of-state-for-dense-nuclear-matter'), - ('The code', 2, None, 'the-code'), - ('Splitting our Data in Training and Test data', - 2, - None, - 'splitting-our-data-in-training-and-test-data')]} + ('The $\\chi^2$ function', 2, None, 'the-chi-2-function')]} end of tocinfo --> @@ -347,9 +338,6 @@ MathJax.Hub.Config({
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Fitting an Equation of State for Dense Nuclear Matter
  • -
  • The code
  • -
  • Splitting our Data in Training and Test data
  • @@ -396,7 +384,7 @@ MathJax.Hub.Config({
  • 34
  • 35
  • ...
  • -
  • 71
  • +
  • 68
  • »
  • diff --git a/doc/pub/week34/html/._week34-bs026.html b/doc/pub/week34/html/._week34-bs026.html index 9d897794d..3b2095ade 100644 --- a/doc/pub/week34/html/._week34-bs026.html +++ b/doc/pub/week34/html/._week34-bs026.html @@ -232,16 +232,7 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('Fitting an Equation of State for Dense Nuclear Matter', - 2, - None, - 'fitting-an-equation-of-state-for-dense-nuclear-matter'), - ('The code', 2, None, 'the-code'), - ('Splitting our Data in Training and Test data', - 2, - None, - 'splitting-our-data-in-training-and-test-data')]} + ('The $\\chi^2$ function', 2, None, 'the-chi-2-function')]} end of tocinfo --> @@ -347,9 +338,6 @@ MathJax.Hub.Config({
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Fitting an Equation of State for Dense Nuclear Matter
  • -
  • The code
  • -
  • Splitting our Data in Training and Test data
  • @@ -403,7 +391,7 @@ dataset.
  • 35
  • 36
  • ...
  • -
  • 71
  • +
  • 68
  • »
  • diff --git a/doc/pub/week34/html/._week34-bs027.html b/doc/pub/week34/html/._week34-bs027.html index e45c840a7..a8b6ee84f 100644 --- a/doc/pub/week34/html/._week34-bs027.html +++ b/doc/pub/week34/html/._week34-bs027.html @@ -232,16 +232,7 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('Fitting an Equation of State for Dense Nuclear Matter', - 2, - None, - 'fitting-an-equation-of-state-for-dense-nuclear-matter'), - ('The code', 2, None, 'the-code'), - ('Splitting our Data in Training and Test data', - 2, - None, - 'splitting-our-data-in-training-and-test-data')]} + ('The $\\chi^2$ function', 2, None, 'the-chi-2-function')]} end of tocinfo --> @@ -347,9 +338,6 @@ MathJax.Hub.Config({
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Fitting an Equation of State for Dense Nuclear Matter
  • -
  • The code
  • -
  • Splitting our Data in Training and Test data
  • @@ -394,7 +382,7 @@ MathJax.Hub.Config({
  • 36
  • 37
  • ...
  • -
  • 71
  • +
  • 68
  • »
  • diff --git a/doc/pub/week34/html/._week34-bs028.html b/doc/pub/week34/html/._week34-bs028.html index 75d857558..0cd34e0ba 100644 --- a/doc/pub/week34/html/._week34-bs028.html +++ b/doc/pub/week34/html/._week34-bs028.html @@ -232,16 +232,7 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('Fitting an Equation of State for Dense Nuclear Matter', - 2, - None, - 'fitting-an-equation-of-state-for-dense-nuclear-matter'), - ('The code', 2, None, 'the-code'), - ('Splitting our Data in Training and Test data', - 2, - None, - 'splitting-our-data-in-training-and-test-data')]} + ('The $\\chi^2$ function', 2, None, 'the-chi-2-function')]} end of tocinfo --> @@ -347,9 +338,6 @@ MathJax.Hub.Config({
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Fitting an Equation of State for Dense Nuclear Matter
  • -
  • The code
  • -
  • Splitting our Data in Training and Test data
  • @@ -395,7 +383,7 @@ discriminative in nature.
  • 37
  • 38
  • ...
  • -
  • 71
  • +
  • 68
  • »
  • diff --git a/doc/pub/week34/html/._week34-bs029.html b/doc/pub/week34/html/._week34-bs029.html index e5c0ad740..6d9db85d6 100644 --- a/doc/pub/week34/html/._week34-bs029.html +++ b/doc/pub/week34/html/._week34-bs029.html @@ -232,16 +232,7 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('Fitting an Equation of State for Dense Nuclear Matter', - 2, - None, - 'fitting-an-equation-of-state-for-dense-nuclear-matter'), - ('The code', 2, None, 'the-code'), - ('Splitting our Data in Training and Test data', - 2, - None, - 'splitting-our-data-in-training-and-test-data')]} + ('The $\\chi^2$ function', 2, None, 'the-chi-2-function')]} end of tocinfo --> @@ -347,9 +338,6 @@ MathJax.Hub.Config({
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Fitting an Equation of State for Dense Nuclear Matter
  • -
  • The code
  • -
  • Splitting our Data in Training and Test data
  • @@ -394,7 +382,7 @@ MathJax.Hub.Config({
  • 38
  • 39
  • ...
  • -
  • 71
  • +
  • 68
  • »
  • diff --git a/doc/pub/week34/html/._week34-bs030.html b/doc/pub/week34/html/._week34-bs030.html index 472385eb1..e8e183c89 100644 --- a/doc/pub/week34/html/._week34-bs030.html +++ b/doc/pub/week34/html/._week34-bs030.html @@ -232,16 +232,7 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('Fitting an Equation of State for Dense Nuclear Matter', - 2, - None, - 'fitting-an-equation-of-state-for-dense-nuclear-matter'), - ('The code', 2, None, 'the-code'), - ('Splitting our Data in Training and Test data', - 2, - None, - 'splitting-our-data-in-training-and-test-data')]} + ('The $\\chi^2$ function', 2, None, 'the-chi-2-function')]} end of tocinfo --> @@ -347,9 +338,6 @@ MathJax.Hub.Config({
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Fitting an Equation of State for Dense Nuclear Matter
  • -
  • The code
  • -
  • Splitting our Data in Training and Test data
  • @@ -400,7 +388,7 @@ data (for example an image), rather than trying to predict a label for say a gi
  • 39
  • 40
  • ...
  • -
  • 71
  • +
  • 68
  • »
  • diff --git a/doc/pub/week34/html/._week34-bs031.html b/doc/pub/week34/html/._week34-bs031.html index 1913cae6c..12fde3e5a 100644 --- a/doc/pub/week34/html/._week34-bs031.html +++ b/doc/pub/week34/html/._week34-bs031.html @@ -232,16 +232,7 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('Fitting an Equation of State for Dense Nuclear Matter', - 2, - None, - 'fitting-an-equation-of-state-for-dense-nuclear-matter'), - ('The code', 2, None, 'the-code'), - ('Splitting our Data in Training and Test data', - 2, - None, - 'splitting-our-data-in-training-and-test-data')]} + ('The $\\chi^2$ function', 2, None, 'the-chi-2-function')]} end of tocinfo --> @@ -347,9 +338,6 @@ MathJax.Hub.Config({
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Fitting an Equation of State for Dense Nuclear Matter
  • -
  • The code
  • -
  • Splitting our Data in Training and Test data
  • @@ -416,7 +404,7 @@ what is the likelihood of finding \( B \).
  • 40
  • 41
  • ...
  • -
  • 71
  • +
  • 68
  • »
  • diff --git a/doc/pub/week34/html/._week34-bs032.html b/doc/pub/week34/html/._week34-bs032.html index 3a718f049..635fe3188 100644 --- a/doc/pub/week34/html/._week34-bs032.html +++ b/doc/pub/week34/html/._week34-bs032.html @@ -232,16 +232,7 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('Fitting an Equation of State for Dense Nuclear Matter', - 2, - None, - 'fitting-an-equation-of-state-for-dense-nuclear-matter'), - ('The code', 2, None, 'the-code'), - ('Splitting our Data in Training and Test data', - 2, - None, - 'splitting-our-data-in-training-and-test-data')]} + ('The $\\chi^2$ function', 2, None, 'the-chi-2-function')]} end of tocinfo --> @@ -347,9 +338,6 @@ MathJax.Hub.Config({
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Fitting an Equation of State for Dense Nuclear Matter
  • -
  • The code
  • -
  • Splitting our Data in Training and Test data
  • @@ -413,7 +401,7 @@ could easily be many different models that fit the given data set equally we
  • 41
  • 42
  • ...
  • -
  • 71
  • +
  • 68
  • »
  • diff --git a/doc/pub/week34/html/._week34-bs033.html b/doc/pub/week34/html/._week34-bs033.html index 5e425a325..5c991b4ce 100644 --- a/doc/pub/week34/html/._week34-bs033.html +++ b/doc/pub/week34/html/._week34-bs033.html @@ -232,16 +232,7 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('Fitting an Equation of State for Dense Nuclear Matter', - 2, - None, - 'fitting-an-equation-of-state-for-dense-nuclear-matter'), - ('The code', 2, None, 'the-code'), - ('Splitting our Data in Training and Test data', - 2, - None, - 'splitting-our-data-in-training-and-test-data')]} + ('The $\\chi^2$ function', 2, None, 'the-chi-2-function')]} end of tocinfo --> @@ -347,9 +338,6 @@ MathJax.Hub.Config({
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Fitting an Equation of State for Dense Nuclear Matter
  • -
  • The code
  • -
  • Splitting our Data in Training and Test data
  • @@ -411,7 +399,7 @@ may first try the simplest class of models, namely linear models, followed obvio
  • 42
  • 43
  • ...
  • -
  • 71
  • +
  • 68
  • »
  • diff --git a/doc/pub/week34/html/._week34-bs034.html b/doc/pub/week34/html/._week34-bs034.html index 9745f102e..aa5378a3e 100644 --- a/doc/pub/week34/html/._week34-bs034.html +++ b/doc/pub/week34/html/._week34-bs034.html @@ -232,16 +232,7 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('Fitting an Equation of State for Dense Nuclear Matter', - 2, - None, - 'fitting-an-equation-of-state-for-dense-nuclear-matter'), - ('The code', 2, None, 'the-code'), - ('Splitting our Data in Training and Test data', - 2, - None, - 'splitting-our-data-in-training-and-test-data')]} + ('The $\\chi^2$ function', 2, None, 'the-chi-2-function')]} end of tocinfo --> @@ -347,9 +338,6 @@ MathJax.Hub.Config({
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Fitting an Equation of State for Dense Nuclear Matter
  • -
  • The code
  • -
  • Splitting our Data in Training and Test data
  • @@ -424,7 +412,7 @@ you can use pip as well and simply install Python as
  • 43
  • 44
  • ...
  • -
  • 71
  • +
  • 68
  • »
  • diff --git a/doc/pub/week34/html/._week34-bs035.html b/doc/pub/week34/html/._week34-bs035.html index 04896d51f..ff67c1af2 100644 --- a/doc/pub/week34/html/._week34-bs035.html +++ b/doc/pub/week34/html/._week34-bs035.html @@ -232,16 +232,7 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('Fitting an Equation of State for Dense Nuclear Matter', - 2, - None, - 'fitting-an-equation-of-state-for-dense-nuclear-matter'), - ('The code', 2, None, 'the-code'), - ('Splitting our Data in Training and Test data', - 2, - None, - 'splitting-our-data-in-training-and-test-data')]} + ('The $\\chi^2$ function', 2, None, 'the-chi-2-function')]} end of tocinfo --> @@ -347,9 +338,6 @@ MathJax.Hub.Config({
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Fitting an Equation of State for Dense Nuclear Matter
  • -
  • The code
  • -
  • Splitting our Data in Training and Test data
  • @@ -417,7 +405,7 @@ no setup and runs entirely in the cloud. Try it out!
  • 44
  • 45
  • ...
  • -
  • 71
  • +
  • 68
  • »
  • diff --git a/doc/pub/week34/html/._week34-bs036.html b/doc/pub/week34/html/._week34-bs036.html index db1c2a75c..fa7878371 100644 --- a/doc/pub/week34/html/._week34-bs036.html +++ b/doc/pub/week34/html/._week34-bs036.html @@ -232,16 +232,7 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('Fitting an Equation of State for Dense Nuclear Matter', - 2, - None, - 'fitting-an-equation-of-state-for-dense-nuclear-matter'), - ('The code', 2, None, 'the-code'), - ('Splitting our Data in Training and Test data', - 2, - None, - 'splitting-our-data-in-training-and-test-data')]} + ('The $\\chi^2$ function', 2, None, 'the-chi-2-function')]} end of tocinfo --> @@ -347,9 +338,6 @@ MathJax.Hub.Config({
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Fitting an Equation of State for Dense Nuclear Matter
  • -
  • The code
  • -
  • Splitting our Data in Training and Test data
  • @@ -404,7 +392,7 @@ MathJax.Hub.Config({
  • 45
  • 46
  • ...
  • -
  • 71
  • +
  • 68
  • »
  • diff --git a/doc/pub/week34/html/._week34-bs037.html b/doc/pub/week34/html/._week34-bs037.html index 8fac8c6aa..b5930c2f7 100644 --- a/doc/pub/week34/html/._week34-bs037.html +++ b/doc/pub/week34/html/._week34-bs037.html @@ -232,16 +232,7 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('Fitting an Equation of State for Dense Nuclear Matter', - 2, - None, - 'fitting-an-equation-of-state-for-dense-nuclear-matter'), - ('The code', 2, None, 'the-code'), - ('Splitting our Data in Training and Test data', - 2, - None, - 'splitting-our-data-in-training-and-test-data')]} + ('The $\\chi^2$ function', 2, None, 'the-chi-2-function')]} end of tocinfo --> @@ -347,9 +338,6 @@ MathJax.Hub.Config({
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Fitting an Equation of State for Dense Nuclear Matter
  • -
  • The code
  • -
  • Splitting our Data in Training and Test data
  • @@ -404,7 +392,7 @@ lectures.
  • 46
  • 47
  • ...
  • -
  • 71
  • +
  • 68
  • »
  • diff --git a/doc/pub/week34/html/._week34-bs038.html b/doc/pub/week34/html/._week34-bs038.html index c019e7f84..3c9dc6321 100644 --- a/doc/pub/week34/html/._week34-bs038.html +++ b/doc/pub/week34/html/._week34-bs038.html @@ -232,16 +232,7 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('Fitting an Equation of State for Dense Nuclear Matter', - 2, - None, - 'fitting-an-equation-of-state-for-dense-nuclear-matter'), - ('The code', 2, None, 'the-code'), - ('Splitting our Data in Training and Test data', - 2, - None, - 'splitting-our-data-in-training-and-test-data')]} + ('The $\\chi^2$ function', 2, None, 'the-chi-2-function')]} end of tocinfo --> @@ -347,9 +338,6 @@ MathJax.Hub.Config({
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Fitting an Equation of State for Dense Nuclear Matter
  • -
  • The code
  • -
  • Splitting our Data in Training and Test data
  • @@ -434,7 +422,7 @@ further processing. For example, convert to latex as
  • 47
  • 48
  • ...
  • -
  • 71
  • +
  • 68
  • »
  • diff --git a/doc/pub/week34/html/._week34-bs039.html b/doc/pub/week34/html/._week34-bs039.html index 043131a60..5f8747c63 100644 --- a/doc/pub/week34/html/._week34-bs039.html +++ b/doc/pub/week34/html/._week34-bs039.html @@ -232,16 +232,7 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('Fitting an Equation of State for Dense Nuclear Matter', - 2, - None, - 'fitting-an-equation-of-state-for-dense-nuclear-matter'), - ('The code', 2, None, 'the-code'), - ('Splitting our Data in Training and Test data', - 2, - None, - 'splitting-our-data-in-training-and-test-data')]} + ('The $\\chi^2$ function', 2, None, 'the-chi-2-function')]} end of tocinfo --> @@ -347,9 +338,6 @@ MathJax.Hub.Config({
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Fitting an Equation of State for Dense Nuclear Matter
  • -
  • The code
  • -
  • Splitting our Data in Training and Test data
  • @@ -399,7 +387,7 @@ developed in the 1970s, namely EISPACK and LINPACK. We describe them shortly he
  • 48
  • 49
  • ...
  • -
  • 71
  • +
  • 68
  • »
  • diff --git a/doc/pub/week34/html/._week34-bs040.html b/doc/pub/week34/html/._week34-bs040.html index 611618728..93da02c35 100644 --- a/doc/pub/week34/html/._week34-bs040.html +++ b/doc/pub/week34/html/._week34-bs040.html @@ -232,16 +232,7 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('Fitting an Equation of State for Dense Nuclear Matter', - 2, - None, - 'fitting-an-equation-of-state-for-dense-nuclear-matter'), - ('The code', 2, None, 'the-code'), - ('Splitting our Data in Training and Test data', - 2, - None, - 'splitting-our-data-in-training-and-test-data')]} + ('The $\\chi^2$ function', 2, None, 'the-chi-2-function')]} end of tocinfo --> @@ -347,9 +338,6 @@ MathJax.Hub.Config({
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Fitting an Equation of State for Dense Nuclear Matter
  • -
  • The code
  • -
  • Splitting our Data in Training and Test data
  • @@ -612,7 +600,7 @@ x = np.l
  • 49
  • 50
  • ...
  • -
  • 71
  • +
  • 68
  • »
  • diff --git a/doc/pub/week34/html/._week34-bs041.html b/doc/pub/week34/html/._week34-bs041.html index cb47042bd..00365ef6b 100644 --- a/doc/pub/week34/html/._week34-bs041.html +++ b/doc/pub/week34/html/._week34-bs041.html @@ -232,16 +232,7 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('Fitting an Equation of State for Dense Nuclear Matter', - 2, - None, - 'fitting-an-equation-of-state-for-dense-nuclear-matter'), - ('The code', 2, None, 'the-code'), - ('Splitting our Data in Training and Test data', - 2, - None, - 'splitting-our-data-in-training-and-test-data')]} + ('The $\\chi^2$ function', 2, None, 'the-chi-2-function')]} end of tocinfo --> @@ -347,9 +338,6 @@ MathJax.Hub.Config({
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Fitting an Equation of State for Dense Nuclear Matter
  • -
  • The code
  • -
  • Splitting our Data in Training and Test data
  • @@ -657,7 +645,7 @@ plt.show()
  • 50
  • 51
  • ...
  • -
  • 71
  • +
  • 68
  • »
  • diff --git a/doc/pub/week34/html/._week34-bs042.html b/doc/pub/week34/html/._week34-bs042.html index ff9011ddf..07731fbbc 100644 --- a/doc/pub/week34/html/._week34-bs042.html +++ b/doc/pub/week34/html/._week34-bs042.html @@ -232,16 +232,7 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('Fitting an Equation of State for Dense Nuclear Matter', - 2, - None, - 'fitting-an-equation-of-state-for-dense-nuclear-matter'), - ('The code', 2, None, 'the-code'), - ('Splitting our Data in Training and Test data', - 2, - None, - 'splitting-our-data-in-training-and-test-data')]} + ('The $\\chi^2$ function', 2, None, 'the-chi-2-function')]} end of tocinfo --> @@ -347,9 +338,6 @@ MathJax.Hub.Config({
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Fitting an Equation of State for Dense Nuclear Matter
  • -
  • The code
  • -
  • Splitting our Data in Training and Test data
  • @@ -634,7 +622,7 @@ For multidimensional arrays, we recommend strongly 51
  • 52
  • ...
  • -
  • 71
  • +
  • 68
  • »
  • diff --git a/doc/pub/week34/html/._week34-bs043.html b/doc/pub/week34/html/._week34-bs043.html index a0a2e6805..ddd3f3c99 100644 --- a/doc/pub/week34/html/._week34-bs043.html +++ b/doc/pub/week34/html/._week34-bs043.html @@ -232,16 +232,7 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('Fitting an Equation of State for Dense Nuclear Matter', - 2, - None, - 'fitting-an-equation-of-state-for-dense-nuclear-matter'), - ('The code', 2, None, 'the-code'), - ('Splitting our Data in Training and Test data', - 2, - None, - 'splitting-our-data-in-training-and-test-data')]} + ('The $\\chi^2$ function', 2, None, 'the-chi-2-function')]} end of tocinfo --> @@ -347,9 +338,6 @@ MathJax.Hub.Config({
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Fitting an Equation of State for Dense Nuclear Matter
  • -
  • The code
  • -
  • Splitting our Data in Training and Test data
  • @@ -390,7 +378,7 @@ MathJax.Hub.Config({
  • 52
  • 53
  • ...
  • -
  • 71
  • +
  • 68
  • »
  • diff --git a/doc/pub/week34/html/._week34-bs044.html b/doc/pub/week34/html/._week34-bs044.html index 8bcba6119..71cb160b4 100644 --- a/doc/pub/week34/html/._week34-bs044.html +++ b/doc/pub/week34/html/._week34-bs044.html @@ -232,16 +232,7 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('Fitting an Equation of State for Dense Nuclear Matter', - 2, - None, - 'fitting-an-equation-of-state-for-dense-nuclear-matter'), - ('The code', 2, None, 'the-code'), - ('Splitting our Data in Training and Test data', - 2, - None, - 'splitting-our-data-in-training-and-test-data')]} + ('The $\\chi^2$ function', 2, None, 'the-chi-2-function')]} end of tocinfo --> @@ -347,9 +338,6 @@ MathJax.Hub.Config({
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Fitting an Equation of State for Dense Nuclear Matter
  • -
  • The code
  • -
  • Splitting our Data in Training and Test data
  • @@ -833,40 +821,6 @@ infile = open -

    Before we proceed, we define also a function for making our plots. You can obviously avoid this and simply set up various matplotlib commands every time you need them. You may however find it convenient to collect all such commands in one function and simply call this function.

    - - -
    -
    -
    -
    -
    -
    from pylab import plt, mpl
    -plt.style.use('seaborn')
    -mpl.rcParams['font.family'] = 'serif'
    -
    -def MakePlot(x,y, styles, labels, axlabels):
    -    plt.figure(figsize=(10,6))
    -    for i in range(len(x)):
    -        plt.plot(x[i], y[i], styles[i], label = labels[i])
    -        plt.xlabel(axlabels[0])
    -        plt.ylabel(axlabels[1])
    -    plt.legend(loc=0)
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -

    Our next step is to read the data on experimental binding energies and reorganize them as functions of the mass number \( A \), the number of protons \( Z \) and neutrons \( N \) using pandas. Before we do this it is @@ -1192,7 +1146,7 @@ Now it is time to dive more into the details of various methods. We will start w

  • 53
  • 54
  • ...
  • -
  • 71
  • +
  • 68
  • »
  • diff --git a/doc/pub/week34/html/._week34-bs045.html b/doc/pub/week34/html/._week34-bs045.html index 52ff566c7..c2efea41a 100644 --- a/doc/pub/week34/html/._week34-bs045.html +++ b/doc/pub/week34/html/._week34-bs045.html @@ -232,16 +232,7 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('Fitting an Equation of State for Dense Nuclear Matter', - 2, - None, - 'fitting-an-equation-of-state-for-dense-nuclear-matter'), - ('The code', 2, None, 'the-code'), - ('Splitting our Data in Training and Test data', - 2, - None, - 'splitting-our-data-in-training-and-test-data')]} + ('The $\\chi^2$ function', 2, None, 'the-chi-2-function')]} end of tocinfo --> @@ -347,9 +338,6 @@ MathJax.Hub.Config({
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Fitting an Equation of State for Dense Nuclear Matter
  • -
  • The code
  • -
  • Splitting our Data in Training and Test data
  • @@ -363,11 +351,11 @@ MathJax.Hub.Config({

    Why Linear Regression (aka Ordinary Least Squares and family)

    -

    Fitting a continuous function with linear parameterization in terms of the parameters \( \boldsymbol{\beta} \).

    +

    Fitting a continuous function with linear parameterization in terms of the parameters \( \boldsymbol{\theta} \).

    • Method of choice for fitting a continuous function!
    • Gives an excellent introduction to central Machine Learning features with understandable pedagogical links to other methods like Neural Networks, Support Vector Machines etc
    • -
    • Analytical expression for the fitting parameters \( \boldsymbol{\beta} \)
    • +
    • Analytical expression for the fitting parameters \( \boldsymbol{\theta} \)
    • Analytical expressions for statistical propertiers like mean values, variances, confidence intervals and more
    • Analytical relation with probabilistic interpretations
    • Easy to introduce basic concepts like bias-variance tradeoff, cross-validation, resampling and regularization techniques and many other ML topics
    • @@ -404,7 +392,7 @@ Similarly, Mehta et al
    • 54
    • 55
    • ...
    • -
    • 71
    • +
    • 68
    • »
    diff --git a/doc/pub/week34/html/._week34-bs046.html b/doc/pub/week34/html/._week34-bs046.html index ddd27c066..e21b3fcf9 100644 --- a/doc/pub/week34/html/._week34-bs046.html +++ b/doc/pub/week34/html/._week34-bs046.html @@ -232,16 +232,7 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('Fitting an Equation of State for Dense Nuclear Matter', - 2, - None, - 'fitting-an-equation-of-state-for-dense-nuclear-matter'), - ('The code', 2, None, 'the-code'), - ('Splitting our Data in Training and Test data', - 2, - None, - 'splitting-our-data-in-training-and-test-data')]} + ('The $\\chi^2$ function', 2, None, 'the-chi-2-function')]} end of tocinfo --> @@ -347,9 +338,6 @@ MathJax.Hub.Config({
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Fitting an Equation of State for Dense Nuclear Matter
  • -
  • The code
  • -
  • Splitting our Data in Training and Test data
  • @@ -367,14 +355,16 @@ MathJax.Hub.Config({

    Regression modeling deals with the description of the sampling distribution of a given random variable \( y \) and how it varies as function of another variable or a set of such variables \( \boldsymbol{x} =[x_0, x_1,\dots, x_{n-1}]^T \). -The first variable is called the dependent, the outcome or the response variable while the set of variables \( \boldsymbol{x} \) is called the independent variable, or the predictor variable or the explanatory variable, or simply just the inputs. +The first variable \( y \) is called the the outcome or the response variable, or simply just the outputs.

    +

    The set of variables \( \boldsymbol{x} \) is called the independent variable, or the predictor variable or the explanatory variable, or simply just the inputs. We will throughout the course just use inputs and outputs as names.

    +

    A regression model aims at finding a likelihood function \( p(\boldsymbol{y}\vert \boldsymbol{x}) \) or in the more traditional sense a function \( \boldsymbol{y}(\boldsymbol{x}) \), that is the conditional distribution for \( \boldsymbol{y} \) with a given \( \boldsymbol{x} \). The estimation of \( p(\boldsymbol{y}\vert \boldsymbol{x}) \) is made using a data set with

    • \( n \) cases \( i = 0, 1, 2, \dots, n-1 \)
    • -
    • Response (target, dependent or outcome) variable \( y_i \) with \( i = 0, 1, 2, \dots, n-1 \)
    • -
    • \( p \) so-called explanatory (independent or predictor or feature) variables \( \boldsymbol{x}_i=[x_{i0}, x_{i1}, \dots, x_{ip-1}] \) with \( i = 0, 1, 2, \dots, n-1 \) and explanatory variables running from \( 0 \) to \( p-1 \). See below for more explicit examples.
    • +
    • Response (our output) variable \( y_i \) with \( i = 0, 1, 2, \dots, n-1 \)
    • +
    • \( p \) so-called explanatory (independent or predictor or feature) variables \( \boldsymbol{x}_i=[x_{i0}, x_{i1}, \dots, x_{ip-1}] \) with \( i = 0, 1, 2, \dots, n-1 \) and explanatory variables running from \( 0 \) to \( p-1 \). These are the inputs. See below for more explicit examples.

    The goal of the regression analysis is to extract/exploit relationship between \( \boldsymbol{y} \) and \( \boldsymbol{x} \) in order to infer specific dependencies, approximations to the likelihood functions, functional relationships and to make predictions, making fits and many other things.

    @@ -406,7 +396,7 @@ The first variable is called the dependent, the outcome or the
  • 55
  • 56
  • ...
  • -
  • 71
  • +
  • 68
  • »
  • diff --git a/doc/pub/week34/html/._week34-bs047.html b/doc/pub/week34/html/._week34-bs047.html index 83876fd7c..ac50460c0 100644 --- a/doc/pub/week34/html/._week34-bs047.html +++ b/doc/pub/week34/html/._week34-bs047.html @@ -232,16 +232,7 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('Fitting an Equation of State for Dense Nuclear Matter', - 2, - None, - 'fitting-an-equation-of-state-for-dense-nuclear-matter'), - ('The code', 2, None, 'the-code'), - ('Splitting our Data in Training and Test data', - 2, - None, - 'splitting-our-data-in-training-and-test-data')]} + ('The $\\chi^2$ function', 2, None, 'the-chi-2-function')]} end of tocinfo --> @@ -347,9 +338,6 @@ MathJax.Hub.Config({
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Fitting an Equation of State for Dense Nuclear Matter
  • -
  • The code
  • -
  • Splitting our Data in Training and Test data
  • @@ -380,11 +368,11 @@ regression analysis is to explain \( \boldsymbol{y} \) in terms of f(\mathbf{X}_{i,\ast}) \). When no prior knowledge on the form of \( f(\cdot) \) is available, it is common to assume a linear relationship between \( \boldsymbol{X} \) and \( \boldsymbol{y} \). This assumption gives rise to -the linear regression model where \( \boldsymbol{\beta} = [\beta_0, \ldots, -\beta_{p-1}]^{T} \) are the regression parameters. +the linear regression model where \( \boldsymbol{\theta} = [\theta_0, \ldots, +\theta_{p-1}]^{T} \) are the regression parameters.

    -

    Linear regression gives us a set of analytical equations for the parameters \( \beta_j \).

    +

    Linear regression gives us a set of analytical equations for the parameters \( \theta_j \).

    @@ -414,7 +402,7 @@ the linear regression model where \( \boldsymbol{\beta} = [\beta_0, \ld
  • 56
  • 57
  • ...
  • -
  • 71
  • +
  • 68
  • »
  • diff --git a/doc/pub/week34/html/._week34-bs048.html b/doc/pub/week34/html/._week34-bs048.html index 0d4357866..797c7d11d 100644 --- a/doc/pub/week34/html/._week34-bs048.html +++ b/doc/pub/week34/html/._week34-bs048.html @@ -232,16 +232,7 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('Fitting an Equation of State for Dense Nuclear Matter', - 2, - None, - 'fitting-an-equation-of-state-for-dense-nuclear-matter'), - ('The code', 2, None, 'the-code'), - ('Splitting our Data in Training and Test data', - 2, - None, - 'splitting-our-data-in-training-and-test-data')]} + ('The $\\chi^2$ function', 2, None, 'the-chi-2-function')]} end of tocinfo --> @@ -347,9 +338,6 @@ MathJax.Hub.Config({
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Fitting an Equation of State for Dense Nuclear Matter
  • -
  • The code
  • -
  • Splitting our Data in Training and Test data
  • @@ -413,7 +401,7 @@ so-called 57
  • 58
  • ...
  • -
  • 71
  • +
  • 68
  • »
  • diff --git a/doc/pub/week34/html/._week34-bs049.html b/doc/pub/week34/html/._week34-bs049.html index 47b64c43d..422d600f1 100644 --- a/doc/pub/week34/html/._week34-bs049.html +++ b/doc/pub/week34/html/._week34-bs049.html @@ -232,16 +232,7 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('Fitting an Equation of State for Dense Nuclear Matter', - 2, - None, - 'fitting-an-equation-of-state-for-dense-nuclear-matter'), - ('The code', 2, None, 'the-code'), - ('Splitting our Data in Training and Test data', - 2, - None, - 'splitting-our-data-in-training-and-test-data')]} + ('The $\\chi^2$ function', 2, None, 'the-chi-2-function')]} end of tocinfo --> @@ -347,9 +338,6 @@ MathJax.Hub.Config({
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Fitting an Equation of State for Dense Nuclear Matter
  • -
  • The code
  • -
  • Splitting our Data in Training and Test data
  • @@ -369,7 +357,7 @@ MathJax.Hub.Config({

    Since obtaining these data points may not be trivial, we want to use these data to fit a function which can allow us to make predictions for values of \( y \) which are not in the present set. The perhaps simplest approach is to assume we can parametrize our function in terms of a polynomial of degree \( n-1 \) with \( n \) points, that is

    $$ -y=y(x) \rightarrow y(x_i)=\tilde{y}_i+\epsilon_i=\sum_{j=0}^{n-1} \beta_j x_i^j+\epsilon_i, +y=y(x) \rightarrow y(x_i)=\tilde{y}_i+\epsilon_i=\sum_{j=0}^{n-1} \theta_j x_i^j+\epsilon_i, $$

    where \( \epsilon_i \) is the error in our approximation.

    @@ -402,7 +390,7 @@ $$
  • 58
  • 59
  • ...
  • -
  • 71
  • +
  • 68
  • »
  • diff --git a/doc/pub/week34/html/._week34-bs050.html b/doc/pub/week34/html/._week34-bs050.html index 89bb8a8f9..a447adea8 100644 --- a/doc/pub/week34/html/._week34-bs050.html +++ b/doc/pub/week34/html/._week34-bs050.html @@ -232,16 +232,7 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('Fitting an Equation of State for Dense Nuclear Matter', - 2, - None, - 'fitting-an-equation-of-state-for-dense-nuclear-matter'), - ('The code', 2, None, 'the-code'), - ('Splitting our Data in Training and Test data', - 2, - None, - 'splitting-our-data-in-training-and-test-data')]} + ('The $\\chi^2$ function', 2, None, 'the-chi-2-function')]} end of tocinfo --> @@ -347,9 +338,6 @@ MathJax.Hub.Config({
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Fitting an Equation of State for Dense Nuclear Matter
  • -
  • The code
  • -
  • Splitting our Data in Training and Test data
  • @@ -368,11 +356,11 @@ MathJax.Hub.Config({

    For every set of values \( y_i,x_i \) we have thus the corresponding set of equations

    $$ \begin{align*} -y_0&=\beta_0+\beta_1x_0^1+\beta_2x_0^2+\dots+\beta_{n-1}x_0^{n-1}+\epsilon_0\\ -y_1&=\beta_0+\beta_1x_1^1+\beta_2x_1^2+\dots+\beta_{n-1}x_1^{n-1}+\epsilon_1\\ -y_2&=\beta_0+\beta_1x_2^1+\beta_2x_2^2+\dots+\beta_{n-1}x_2^{n-1}+\epsilon_2\\ +y_0&=\theta_0+\theta_1x_0^1+\theta_2x_0^2+\dots+\theta_{n-1}x_0^{n-1}+\epsilon_0\\ +y_1&=\theta_0+\theta_1x_1^1+\theta_2x_1^2+\dots+\theta_{n-1}x_1^{n-1}+\epsilon_1\\ +y_2&=\theta_0+\theta_1x_2^1+\theta_2x_2^2+\dots+\theta_{n-1}x_2^{n-1}+\epsilon_2\\ \dots & \dots \\ -y_{n-1}&=\beta_0+\beta_1x_{n-1}^1+\beta_2x_{n-1}^2+\dots+\beta_{n-1}x_{n-1}^{n-1}+\epsilon_{n-1}.\\ +y_{n-1}&=\theta_0+\theta_1x_{n-1}^1+\theta_2x_{n-1}^2+\dots+\theta_{n-1}x_{n-1}^{n-1}+\epsilon_{n-1}.\\ \end{align*} $$ @@ -404,7 +392,7 @@ $$
  • 59
  • 60
  • ...
  • -
  • 71
  • +
  • 68
  • »
  • diff --git a/doc/pub/week34/html/._week34-bs051.html b/doc/pub/week34/html/._week34-bs051.html index a6e586225..796a467a3 100644 --- a/doc/pub/week34/html/._week34-bs051.html +++ b/doc/pub/week34/html/._week34-bs051.html @@ -232,16 +232,7 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('Fitting an Equation of State for Dense Nuclear Matter', - 2, - None, - 'fitting-an-equation-of-state-for-dense-nuclear-matter'), - ('The code', 2, None, 'the-code'), - ('Splitting our Data in Training and Test data', - 2, - None, - 'splitting-our-data-in-training-and-test-data')]} + ('The $\\chi^2$ function', 2, None, 'the-chi-2-function')]} end of tocinfo --> @@ -347,9 +338,6 @@ MathJax.Hub.Config({
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Fitting an Equation of State for Dense Nuclear Matter
  • -
  • The code
  • -
  • Splitting our Data in Training and Test data
  • @@ -372,7 +360,7 @@ $$

    and

    $$ -\boldsymbol{\beta} = [\beta_0,\beta_1, \beta_2,\dots, \beta_{n-1}]^T, +\boldsymbol{\theta} = [\theta_0,\theta_1, \theta_2,\dots, \theta_{n-1}]^T, $$

    and

    @@ -394,7 +382,7 @@ $$

    we can rewrite our equations as

    $$ -\boldsymbol{y} = \boldsymbol{X}\boldsymbol{\beta}+\boldsymbol{\epsilon}. +\boldsymbol{y} = \boldsymbol{X}\boldsymbol{\theta}+\boldsymbol{\epsilon}. $$

    The above design matrix is called a Vandermonde matrix.

    @@ -427,7 +415,7 @@ $$
  • 60
  • 61
  • ...
  • -
  • 71
  • +
  • 68
  • »
  • diff --git a/doc/pub/week34/html/._week34-bs052.html b/doc/pub/week34/html/._week34-bs052.html index 6d5022f0a..eb6168281 100644 --- a/doc/pub/week34/html/._week34-bs052.html +++ b/doc/pub/week34/html/._week34-bs052.html @@ -232,16 +232,7 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('Fitting an Equation of State for Dense Nuclear Matter', - 2, - None, - 'fitting-an-equation-of-state-for-dense-nuclear-matter'), - ('The code', 2, None, 'the-code'), - ('Splitting our Data in Training and Test data', - 2, - None, - 'splitting-our-data-in-training-and-test-data')]} + ('The $\\chi^2$ function', 2, None, 'the-chi-2-function')]} end of tocinfo --> @@ -347,9 +338,6 @@ MathJax.Hub.Config({
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Fitting an Equation of State for Dense Nuclear Matter
  • -
  • The code
  • -
  • Splitting our Data in Training and Test data
  • @@ -375,13 +363,13 @@ of values \( y_i,x_i \) we can then generalize the equations to $$ \begin{align*} -y_0&=\beta_0x_{00}+\beta_1x_{01}+\beta_2x_{02}+\dots+\beta_{n-1}x_{0n-1}+\epsilon_0\\ -y_1&=\beta_0x_{10}+\beta_1x_{11}+\beta_2x_{12}+\dots+\beta_{n-1}x_{1n-1}+\epsilon_1\\ -y_2&=\beta_0x_{20}+\beta_1x_{21}+\beta_2x_{22}+\dots+\beta_{n-1}x_{2n-1}+\epsilon_2\\ +y_0&=\theta_0x_{00}+\theta_1x_{01}+\theta_2x_{02}+\dots+\theta_{n-1}x_{0n-1}+\epsilon_0\\ +y_1&=\theta_0x_{10}+\theta_1x_{11}+\theta_2x_{12}+\dots+\theta_{n-1}x_{1n-1}+\epsilon_1\\ +y_2&=\theta_0x_{20}+\theta_1x_{21}+\theta_2x_{22}+\dots+\theta_{n-1}x_{2n-1}+\epsilon_2\\ \dots & \dots \\ -y_{i}&=\beta_0x_{i0}+\beta_1x_{i1}+\beta_2x_{i2}+\dots+\beta_{n-1}x_{in-1}+\epsilon_i\\ +y_{i}&=\theta_0x_{i0}+\theta_1x_{i1}+\theta_2x_{i2}+\dots+\theta_{n-1}x_{in-1}+\epsilon_i\\ \dots & \dots \\ -y_{n-1}&=\beta_0x_{n-1,0}+\beta_1x_{n-1,2}+\beta_2x_{n-1,2}+\dots+\beta_{n-1}x_{n-1,n-1}+\epsilon_{n-1}.\\ +y_{n-1}&=\theta_0x_{n-1,0}+\theta_1x_{n-1,2}+\theta_2x_{n-1,2}+\dots+\theta_{n-1}x_{n-1,n-1}+\epsilon_{n-1}.\\ \end{align*} $$ @@ -416,7 +404,7 @@ $$
  • 61
  • 62
  • ...
  • -
  • 71
  • +
  • 68
  • »
  • diff --git a/doc/pub/week34/html/._week34-bs053.html b/doc/pub/week34/html/._week34-bs053.html index 8d28e31d5..8f15c729f 100644 --- a/doc/pub/week34/html/._week34-bs053.html +++ b/doc/pub/week34/html/._week34-bs053.html @@ -232,16 +232,7 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('Fitting an Equation of State for Dense Nuclear Matter', - 2, - None, - 'fitting-an-equation-of-state-for-dense-nuclear-matter'), - ('The code', 2, None, 'the-code'), - ('Splitting our Data in Training and Test data', - 2, - None, - 'splitting-our-data-in-training-and-test-data')]} + ('The $\\chi^2$ function', 2, None, 'the-chi-2-function')]} end of tocinfo --> @@ -347,9 +338,6 @@ MathJax.Hub.Config({
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Fitting an Equation of State for Dense Nuclear Matter
  • -
  • The code
  • -
  • Splitting our Data in Training and Test data
  • @@ -379,10 +367,10 @@ $$

    and without loss of generality we rewrite again our equations as

    $$ -\boldsymbol{y} = \boldsymbol{X}\boldsymbol{\beta}+\boldsymbol{\epsilon}. +\boldsymbol{y} = \boldsymbol{X}\boldsymbol{\theta}+\boldsymbol{\epsilon}. $$ -

    The left-hand side of this equation is kwown. Our error vector \( \boldsymbol{\epsilon} \) and the parameter vector \( \boldsymbol{\beta} \) are our unknow quantities. How can we obtain the optimal set of \( \beta_i \) values?

    +

    The left-hand side of this equation is kwown. Our error vector \( \boldsymbol{\epsilon} \) and the parameter vector \( \boldsymbol{\theta} \) are our unknow quantities. How can we obtain the optimal set of \( \theta_i \) values?

    @@ -412,7 +400,7 @@ $$
  • 62
  • 63
  • ...
  • -
  • 71
  • +
  • 68
  • »
  • diff --git a/doc/pub/week34/html/._week34-bs054.html b/doc/pub/week34/html/._week34-bs054.html index 7a3783fa0..8be3309ea 100644 --- a/doc/pub/week34/html/._week34-bs054.html +++ b/doc/pub/week34/html/._week34-bs054.html @@ -232,16 +232,7 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('Fitting an Equation of State for Dense Nuclear Matter', - 2, - None, - 'fitting-an-equation-of-state-for-dense-nuclear-matter'), - ('The code', 2, None, 'the-code'), - ('Splitting our Data in Training and Test data', - 2, - None, - 'splitting-our-data-in-training-and-test-data')]} + ('The $\\chi^2$ function', 2, None, 'the-chi-2-function')]} end of tocinfo --> @@ -347,9 +338,6 @@ MathJax.Hub.Config({
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Fitting an Equation of State for Dense Nuclear Matter
  • -
  • The code
  • -
  • Splitting our Data in Training and Test data
  • @@ -368,13 +356,13 @@ MathJax.Hub.Config({

    We have defined the matrix \( \boldsymbol{X} \) via the equations

    $$ \begin{align*} -y_0&=\beta_0x_{00}+\beta_1x_{01}+\beta_2x_{02}+\dots+\beta_{n-1}x_{0n-1}+\epsilon_0\\ -y_1&=\beta_0x_{10}+\beta_1x_{11}+\beta_2x_{12}+\dots+\beta_{n-1}x_{1n-1}+\epsilon_1\\ -y_2&=\beta_0x_{20}+\beta_1x_{21}+\beta_2x_{22}+\dots+\beta_{n-1}x_{2n-1}+\epsilon_1\\ +y_0&=\theta_0x_{00}+\theta_1x_{01}+\theta_2x_{02}+\dots+\theta_{n-1}x_{0n-1}+\epsilon_0\\ +y_1&=\theta_0x_{10}+\theta_1x_{11}+\theta_2x_{12}+\dots+\theta_{n-1}x_{1n-1}+\epsilon_1\\ +y_2&=\theta_0x_{20}+\theta_1x_{21}+\theta_2x_{22}+\dots+\theta_{n-1}x_{2n-1}+\epsilon_1\\ \dots & \dots \\ -y_{i}&=\beta_0x_{i0}+\beta_1x_{i1}+\beta_2x_{i2}+\dots+\beta_{n-1}x_{in-1}+\epsilon_1\\ +y_{i}&=\theta_0x_{i0}+\theta_1x_{i1}+\theta_2x_{i2}+\dots+\theta_{n-1}x_{in-1}+\epsilon_1\\ \dots & \dots \\ -y_{n-1}&=\beta_0x_{n-1,0}+\beta_1x_{n-1,2}+\beta_2x_{n-1,2}+\dots+\beta_{n-1}x_{n-1,n-1}+\epsilon_{n-1}.\\ +y_{n-1}&=\theta_0x_{n-1,0}+\theta_1x_{n-1,2}+\theta_2x_{n-1,2}+\dots+\theta_{n-1}x_{n-1,n-1}+\epsilon_{n-1}.\\ \end{align*} $$ @@ -411,7 +399,7 @@ our matrix as \( \boldsymbol{X}\in {\mathbb{R}}^{n\times p} \), with the predict
  • 63
  • 64
  • ...
  • -
  • 71
  • +
  • 68
  • »
  • diff --git a/doc/pub/week34/html/._week34-bs055.html b/doc/pub/week34/html/._week34-bs055.html index 2e3ef0f7c..f67ac1b56 100644 --- a/doc/pub/week34/html/._week34-bs055.html +++ b/doc/pub/week34/html/._week34-bs055.html @@ -232,16 +232,7 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('Fitting an Equation of State for Dense Nuclear Matter', - 2, - None, - 'fitting-an-equation-of-state-for-dense-nuclear-matter'), - ('The code', 2, None, 'the-code'), - ('Splitting our Data in Training and Test data', - 2, - None, - 'splitting-our-data-in-training-and-test-data')]} + ('The $\\chi^2$ function', 2, None, 'the-chi-2-function')]} end of tocinfo --> @@ -347,9 +338,6 @@ MathJax.Hub.Config({
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Fitting an Equation of State for Dense Nuclear Matter
  • -
  • The code
  • -
  • Splitting our Data in Training and Test data
  • @@ -457,9 +445,9 @@ display(DesignMatrix) -

    With \( \boldsymbol{\beta}\in {\mathbb{R}}^{p\times 1} \), it means that we will hereafter write our equations for the approximation as

    +

    With \( \boldsymbol{\theta}\in {\mathbb{R}}^{p\times 1} \), it means that we will hereafter write our equations for the approximation as

    $$ -\boldsymbol{\tilde{y}}= \boldsymbol{X}\boldsymbol{\beta}, +\boldsymbol{\tilde{y}}= \boldsymbol{X}\boldsymbol{\theta}, $$

    throughout these lectures.

    @@ -489,7 +477,7 @@ $$
  • 64
  • 65
  • ...
  • -
  • 71
  • +
  • 68
  • »
  • diff --git a/doc/pub/week34/html/._week34-bs056.html b/doc/pub/week34/html/._week34-bs056.html index c9068de46..1a7022964 100644 --- a/doc/pub/week34/html/._week34-bs056.html +++ b/doc/pub/week34/html/._week34-bs056.html @@ -232,16 +232,7 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('Fitting an Equation of State for Dense Nuclear Matter', - 2, - None, - 'fitting-an-equation-of-state-for-dense-nuclear-matter'), - ('The code', 2, None, 'the-code'), - ('Splitting our Data in Training and Test data', - 2, - None, - 'splitting-our-data-in-training-and-test-data')]} + ('The $\\chi^2$ function', 2, None, 'the-chi-2-function')]} end of tocinfo --> @@ -347,9 +338,6 @@ MathJax.Hub.Config({
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Fitting an Equation of State for Dense Nuclear Matter
  • -
  • The code
  • -
  • Splitting our Data in Training and Test data
  • @@ -365,19 +353,19 @@ MathJax.Hub.Config({
    -

    With the above we use the design matrix to define the approximation \( \boldsymbol{\tilde{y}} \) via the unknown quantity \( \boldsymbol{\beta} \) as

    +

    With the above we use the design matrix to define the approximation \( \boldsymbol{\tilde{y}} \) via the unknown quantity \( \boldsymbol{\theta} \) as

    $$ -\boldsymbol{\tilde{y}}= \boldsymbol{X}\boldsymbol{\beta}, +\boldsymbol{\tilde{y}}= \boldsymbol{X}\boldsymbol{\theta}, $$ -

    and in order to find the optimal parameters \( \beta_i \) instead of solving the above linear algebra problem, we define a function which gives a measure of the spread between the values \( y_i \) (which represent hopefully the exact values) and the parameterized values \( \tilde{y}_i \), namely

    +

    and in order to find the optimal parameters \( \theta_i \) instead of solving the above linear algebra problem, we define a function which gives a measure of the spread between the values \( y_i \) (which represent hopefully the exact values) and the parameterized values \( \tilde{y}_i \), namely

    $$ -C(\boldsymbol{\beta})=\frac{1}{n}\sum_{i=0}^{n-1}\left(y_i-\tilde{y}_i\right)^2=\frac{1}{n}\left\{\left(\boldsymbol{y}-\boldsymbol{\tilde{y}}\right)^T\left(\boldsymbol{y}-\boldsymbol{\tilde{y}}\right)\right\}, +C(\boldsymbol{\theta})=\frac{1}{n}\sum_{i=0}^{n-1}\left(y_i-\tilde{y}_i\right)^2=\frac{1}{n}\left\{\left(\boldsymbol{y}-\boldsymbol{\tilde{y}}\right)^T\left(\boldsymbol{y}-\boldsymbol{\tilde{y}}\right)\right\}, $$

    or using the matrix \( \boldsymbol{X} \) and in a more compact matrix-vector notation as

    $$ -C(\boldsymbol{\beta})=\frac{1}{n}\left\{\left(\boldsymbol{y}-\boldsymbol{X}\boldsymbol{\beta}\right)^T\left(\boldsymbol{y}-\boldsymbol{X}\boldsymbol{\beta}\right)\right\}. +C(\boldsymbol{\theta})=\frac{1}{n}\left\{\left(\boldsymbol{y}-\boldsymbol{X}\boldsymbol{\theta}\right)^T\left(\boldsymbol{y}-\boldsymbol{X}\boldsymbol{\theta}\right)\right\}. $$

    This function is one possible way to define the so-called cost function.

    @@ -387,10 +375,10 @@ the function \( C \) as

    $$ -C(\boldsymbol{\beta})=\frac{1}{2n}\sum_{i=0}^{n-1}\left(y_i-\tilde{y}_i\right)^2, +C(\boldsymbol{\theta})=\frac{1}{2n}\sum_{i=0}^{n-1}\left(y_i-\tilde{y}_i\right)^2, $$ -

    since when taking the first derivative with respect to the unknown parameters \( \beta \), the factor of \( 2 \) cancels out.

    +

    since when taking the first derivative with respect to the unknown parameters \( \theta \), the factor of \( 2 \) cancels out.

    @@ -420,7 +408,7 @@ $$
  • 65
  • 66
  • ...
  • -
  • 71
  • +
  • 68
  • »
  • diff --git a/doc/pub/week34/html/._week34-bs057.html b/doc/pub/week34/html/._week34-bs057.html index 49a652e8f..649d6a9a6 100644 --- a/doc/pub/week34/html/._week34-bs057.html +++ b/doc/pub/week34/html/._week34-bs057.html @@ -232,16 +232,7 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('Fitting an Equation of State for Dense Nuclear Matter', - 2, - None, - 'fitting-an-equation-of-state-for-dense-nuclear-matter'), - ('The code', 2, None, 'the-code'), - ('Splitting our Data in Training and Test data', - 2, - None, - 'splitting-our-data-in-training-and-test-data')]} + ('The $\\chi^2$ function', 2, None, 'the-chi-2-function')]} end of tocinfo --> @@ -347,9 +338,6 @@ MathJax.Hub.Config({
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Fitting an Equation of State for Dense Nuclear Matter
  • -
  • The code
  • -
  • Splitting our Data in Training and Test data
  • @@ -368,14 +356,14 @@ MathJax.Hub.Config({

    The function

    $$ -C(\boldsymbol{\beta})=\frac{1}{n}\left\{\left(\boldsymbol{y}-\boldsymbol{X}\boldsymbol{\beta}\right)^T\left(\boldsymbol{y}-\boldsymbol{X}\boldsymbol{\beta}\right)\right\}, +C(\boldsymbol{\theta})=\frac{1}{n}\left\{\left(\boldsymbol{y}-\boldsymbol{X}\boldsymbol{\theta}\right)^T\left(\boldsymbol{y}-\boldsymbol{X}\boldsymbol{\theta}\right)\right\}, $$

    can be linked to the variance of the quantity \( y_i \) if we interpret the latter as the mean value. When linking (see the discussion below) with the maximum likelihood approach below, we will indeed interpret \( y_i \) as a mean value

    $$ -y_{i}=\langle y_i \rangle = \beta_0x_{i,0}+\beta_1x_{i,1}+\beta_2x_{i,2}+\dots+\beta_{n-1}x_{i,n-1}+\epsilon_i, +y_{i}=\langle y_i \rangle = \theta_0x_{i,0}+\theta_1x_{i,1}+\theta_2x_{i,2}+\dots+\theta_{n-1}x_{i,n-1}+\epsilon_i, $$

    where \( \langle y_i \rangle \) is the mean value. Keep in mind also that @@ -388,25 +376,25 @@ the standard deviation discussed earlier. In the discussion here we will treat \( y_i \) as our exact value for the response variable.

    -

    In order to find the parameters \( \beta_i \) we will then minimize the spread of \( C(\boldsymbol{\beta}) \), that is we are going to solve the problem

    +

    In order to find the parameters \( \theta_i \) we will then minimize the spread of \( C(\boldsymbol{\theta}) \), that is we are going to solve the problem

    $$ -{\displaystyle \min_{\boldsymbol{\beta}\in -{\mathbb{R}}^{p}}}\frac{1}{n}\left\{\left(\boldsymbol{y}-\boldsymbol{X}\boldsymbol{\beta}\right)^T\left(\boldsymbol{y}-\boldsymbol{X}\boldsymbol{\beta}\right)\right\}. +{\displaystyle \min_{\boldsymbol{\theta}\in +{\mathbb{R}}^{p}}}\frac{1}{n}\left\{\left(\boldsymbol{y}-\boldsymbol{X}\boldsymbol{\theta}\right)^T\left(\boldsymbol{y}-\boldsymbol{X}\boldsymbol{\theta}\right)\right\}. $$

    In practical terms it means we will require

    $$ -\frac{\partial C(\boldsymbol{\beta})}{\partial \beta_j} = \frac{\partial }{\partial \beta_j}\left[ \frac{1}{n}\sum_{i=0}^{n-1}\left(y_i-\beta_0x_{i,0}-\beta_1x_{i,1}-\beta_2x_{i,2}-\dots-\beta_{n-1}x_{i,n-1}\right)^2\right]=0, +\frac{\partial C(\boldsymbol{\theta})}{\partial \theta_j} = \frac{\partial }{\partial \theta_j}\left[ \frac{1}{n}\sum_{i=0}^{n-1}\left(y_i-\theta_0x_{i,0}-\theta_1x_{i,1}-\theta_2x_{i,2}-\dots-\theta_{n-1}x_{i,n-1}\right)^2\right]=0, $$

    which results in

    $$ -\frac{\partial C(\boldsymbol{\beta})}{\partial \beta_j} = -\frac{2}{n}\left[ \sum_{i=0}^{n-1}x_{ij}\left(y_i-\beta_0x_{i,0}-\beta_1x_{i,1}-\beta_2x_{i,2}-\dots-\beta_{n-1}x_{i,n-1}\right)\right]=0, +\frac{\partial C(\boldsymbol{\theta})}{\partial \theta_j} = -\frac{2}{n}\left[ \sum_{i=0}^{n-1}x_{ij}\left(y_i-\theta_0x_{i,0}-\theta_1x_{i,1}-\theta_2x_{i,2}-\dots-\theta_{n-1}x_{i,n-1}\right)\right]=0, $$

    or in a matrix-vector form as

    $$ -\frac{\partial C(\boldsymbol{\beta})}{\partial \boldsymbol{\beta}} = 0 = \boldsymbol{X}^T\left( \boldsymbol{y}-\boldsymbol{X}\boldsymbol{\beta}\right). +\frac{\partial C(\boldsymbol{\theta})}{\partial \boldsymbol{\theta}} = 0 = \boldsymbol{X}^T\left( \boldsymbol{y}-\boldsymbol{X}\boldsymbol{\theta}\right). $$ @@ -437,7 +425,7 @@ $$
  • 66
  • 67
  • ...
  • -
  • 71
  • +
  • 68
  • »
  • diff --git a/doc/pub/week34/html/._week34-bs058.html b/doc/pub/week34/html/._week34-bs058.html index e27c542d2..7c9f6f8b6 100644 --- a/doc/pub/week34/html/._week34-bs058.html +++ b/doc/pub/week34/html/._week34-bs058.html @@ -232,16 +232,7 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('Fitting an Equation of State for Dense Nuclear Matter', - 2, - None, - 'fitting-an-equation-of-state-for-dense-nuclear-matter'), - ('The code', 2, None, 'the-code'), - ('Splitting our Data in Training and Test data', - 2, - None, - 'splitting-our-data-in-training-and-test-data')]} + ('The $\\chi^2$ function', 2, None, 'the-chi-2-function')]} end of tocinfo --> @@ -347,9 +338,6 @@ MathJax.Hub.Config({
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Fitting an Equation of State for Dense Nuclear Matter
  • -
  • The code
  • -
  • Splitting our Data in Training and Test data
  • @@ -367,17 +355,17 @@ MathJax.Hub.Config({

    We can rewrite

    $$ -\frac{\partial C(\boldsymbol{\beta})}{\partial \boldsymbol{\beta}} = 0 = \boldsymbol{X}^T\left( \boldsymbol{y}-\boldsymbol{X}\boldsymbol{\beta}\right), +\frac{\partial C(\boldsymbol{\theta})}{\partial \boldsymbol{\theta}} = 0 = \boldsymbol{X}^T\left( \boldsymbol{y}-\boldsymbol{X}\boldsymbol{\theta}\right), $$

    as

    $$ -\boldsymbol{X}^T\boldsymbol{y} = \boldsymbol{X}^T\boldsymbol{X}\boldsymbol{\beta}, +\boldsymbol{X}^T\boldsymbol{y} = \boldsymbol{X}^T\boldsymbol{X}\boldsymbol{\theta}, $$

    and if the matrix \( \boldsymbol{X}^T\boldsymbol{X} \) is invertible we have the solution

    $$ -\boldsymbol{\beta} =\left(\boldsymbol{X}^T\boldsymbol{X}\right)^{-1}\boldsymbol{X}^T\boldsymbol{y}. +\boldsymbol{\theta} =\left(\boldsymbol{X}^T\boldsymbol{X}\right)^{-1}\boldsymbol{X}^T\boldsymbol{y}. $$

    We note also that since our design matrix is defined as \( \boldsymbol{X}\in @@ -427,8 +415,6 @@ allow for the usage of direct linear algebra methods such as LU decomposi

  • 66
  • 67
  • 68
  • -
  • ...
  • -
  • 71
  • »
  • diff --git a/doc/pub/week34/html/._week34-bs059.html b/doc/pub/week34/html/._week34-bs059.html index f4a0f39aa..41ec66197 100644 --- a/doc/pub/week34/html/._week34-bs059.html +++ b/doc/pub/week34/html/._week34-bs059.html @@ -232,16 +232,7 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('Fitting an Equation of State for Dense Nuclear Matter', - 2, - None, - 'fitting-an-equation-of-state-for-dense-nuclear-matter'), - ('The code', 2, None, 'the-code'), - ('Splitting our Data in Training and Test data', - 2, - None, - 'splitting-our-data-in-training-and-test-data')]} + ('The $\\chi^2$ function', 2, None, 'the-chi-2-function')]} end of tocinfo --> @@ -347,9 +338,6 @@ MathJax.Hub.Config({
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Fitting an Equation of State for Dense Nuclear Matter
  • -
  • The code
  • -
  • Splitting our Data in Training and Test data
  • @@ -367,20 +355,20 @@ MathJax.Hub.Config({

    The residuals \( \boldsymbol{\epsilon} \) are in turn given by

    $$ -\boldsymbol{\epsilon} = \boldsymbol{y}-\boldsymbol{\tilde{y}} = \boldsymbol{y}-\boldsymbol{X}\boldsymbol{\beta}, +\boldsymbol{\epsilon} = \boldsymbol{y}-\boldsymbol{\tilde{y}} = \boldsymbol{y}-\boldsymbol{X}\boldsymbol{\theta}, $$

    and with

    $$ -\boldsymbol{X}^T\left( \boldsymbol{y}-\boldsymbol{X}\boldsymbol{\beta}\right)= 0, +\boldsymbol{X}^T\left( \boldsymbol{y}-\boldsymbol{X}\boldsymbol{\theta}\right)= 0, $$

    we have

    $$ -\boldsymbol{X}^T\boldsymbol{\epsilon}=\boldsymbol{X}^T\left( \boldsymbol{y}-\boldsymbol{X}\boldsymbol{\beta}\right)= 0, +\boldsymbol{X}^T\boldsymbol{\epsilon}=\boldsymbol{X}^T\left( \boldsymbol{y}-\boldsymbol{X}\boldsymbol{\theta}\right)= 0, $$ -

    meaning that the solution for \( \boldsymbol{\beta} \) is the one which minimizes the residuals. Later we will link this with the maximum likelihood approach.

    +

    meaning that the solution for \( \boldsymbol{\theta} \) is the one which minimizes the residuals. Later we will link this with the maximum likelihood approach.

    @@ -410,9 +398,6 @@ $$
  • 66
  • 67
  • 68
  • -
  • 69
  • -
  • ...
  • -
  • 71
  • »
  • diff --git a/doc/pub/week34/html/._week34-bs060.html b/doc/pub/week34/html/._week34-bs060.html index 41fb1573d..48a727173 100644 --- a/doc/pub/week34/html/._week34-bs060.html +++ b/doc/pub/week34/html/._week34-bs060.html @@ -232,16 +232,7 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('Fitting an Equation of State for Dense Nuclear Matter', - 2, - None, - 'fitting-an-equation-of-state-for-dense-nuclear-matter'), - ('The code', 2, None, 'the-code'), - ('Splitting our Data in Training and Test data', - 2, - None, - 'splitting-our-data-in-training-and-test-data')]} + ('The $\\chi^2$ function', 2, None, 'the-chi-2-function')]} end of tocinfo --> @@ -347,9 +338,6 @@ MathJax.Hub.Config({
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Fitting an Equation of State for Dense Nuclear Matter
  • -
  • The code
  • -
  • Splitting our Data in Training and Test data
  • @@ -363,7 +351,7 @@ MathJax.Hub.Config({

    Own code for Ordinary Least Squares

    -

    It is rather straightforward to implement the matrix inversion and obtain the parameters \( \boldsymbol{\beta} \). After having defined the matrix \( \boldsymbol{X} \) we simply need to +

    It is rather straightforward to implement the matrix inversion and obtain the parameters \( \boldsymbol{\theta} \). After having defined the matrix \( \boldsymbol{X} \) we simply need to write

    @@ -475,10 +463,6 @@ plt.show()
  • 66
  • 67
  • 68
  • -
  • 69
  • -
  • 70
  • -
  • ...
  • -
  • 71
  • »
  • diff --git a/doc/pub/week34/html/._week34-bs061.html b/doc/pub/week34/html/._week34-bs061.html index 8ced8dbff..0c797367b 100644 --- a/doc/pub/week34/html/._week34-bs061.html +++ b/doc/pub/week34/html/._week34-bs061.html @@ -232,16 +232,7 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('Fitting an Equation of State for Dense Nuclear Matter', - 2, - None, - 'fitting-an-equation-of-state-for-dense-nuclear-matter'), - ('The code', 2, None, 'the-code'), - ('Splitting our Data in Training and Test data', - 2, - None, - 'splitting-our-data-in-training-and-test-data')]} + ('The $\\chi^2$ function', 2, None, 'the-chi-2-function')]} end of tocinfo --> @@ -347,9 +338,6 @@ MathJax.Hub.Config({
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Fitting an Equation of State for Dense Nuclear Matter
  • -
  • The code
  • -
  • Splitting our Data in Training and Test data
  • @@ -490,9 +478,6 @@ Since we are not using Scikit-Learn here we can define our own \( R2 \) f
  • 66
  • 67
  • 68
  • -
  • 69
  • -
  • 70
  • -
  • 71
  • »
  • diff --git a/doc/pub/week34/html/._week34-bs062.html b/doc/pub/week34/html/._week34-bs062.html index 1b6294a4e..91c21378d 100644 --- a/doc/pub/week34/html/._week34-bs062.html +++ b/doc/pub/week34/html/._week34-bs062.html @@ -232,16 +232,7 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('Fitting an Equation of State for Dense Nuclear Matter', - 2, - None, - 'fitting-an-equation-of-state-for-dense-nuclear-matter'), - ('The code', 2, None, 'the-code'), - ('Splitting our Data in Training and Test data', - 2, - None, - 'splitting-our-data-in-training-and-test-data')]} + ('The $\\chi^2$ function', 2, None, 'the-chi-2-function')]} end of tocinfo --> @@ -347,9 +338,6 @@ MathJax.Hub.Config({
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Fitting an Equation of State for Dense Nuclear Matter
  • -
  • The code
  • -
  • Splitting our Data in Training and Test data
  • @@ -381,7 +369,7 @@ as

    $$ -\chi^2(\boldsymbol{\beta})=\frac{1}{n}\sum_{i=0}^{n-1}\frac{\left(y_i-\tilde{y}_i\right)^2}{\sigma_i^2}=\frac{1}{n}\left\{\left(\boldsymbol{y}-\boldsymbol{\tilde{y}}\right)^T\frac{1}{\boldsymbol{\Sigma^2}}\left(\boldsymbol{y}-\boldsymbol{\tilde{y}}\right)\right\}, +\chi^2(\boldsymbol{\theta})=\frac{1}{n}\sum_{i=0}^{n-1}\frac{\left(y_i-\tilde{y}_i\right)^2}{\sigma_i^2}=\frac{1}{n}\left\{\left(\boldsymbol{y}-\boldsymbol{\tilde{y}}\right)^T\frac{1}{\boldsymbol{\Sigma^2}}\left(\boldsymbol{y}-\boldsymbol{\tilde{y}}\right)\right\}, $$

    where the matrix \( \boldsymbol{\Sigma} \) is a diagonal matrix with \( \sigma_i \) as matrix elements.

    @@ -409,9 +397,6 @@ $$
  • 66
  • 67
  • 68
  • -
  • 69
  • -
  • 70
  • -
  • 71
  • »
  • diff --git a/doc/pub/week34/html/._week34-bs063.html b/doc/pub/week34/html/._week34-bs063.html index 27e506234..df0b61a10 100644 --- a/doc/pub/week34/html/._week34-bs063.html +++ b/doc/pub/week34/html/._week34-bs063.html @@ -232,16 +232,7 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('Fitting an Equation of State for Dense Nuclear Matter', - 2, - None, - 'fitting-an-equation-of-state-for-dense-nuclear-matter'), - ('The code', 2, None, 'the-code'), - ('Splitting our Data in Training and Test data', - 2, - None, - 'splitting-our-data-in-training-and-test-data')]} + ('The $\\chi^2$ function', 2, None, 'the-chi-2-function')]} end of tocinfo --> @@ -347,9 +338,6 @@ MathJax.Hub.Config({
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Fitting an Equation of State for Dense Nuclear Matter
  • -
  • The code
  • -
  • Splitting our Data in Training and Test data
  • @@ -366,19 +354,19 @@ MathJax.Hub.Config({
    -

    In order to find the parameters \( \beta_i \) we will then minimize the spread of \( \chi^2(\boldsymbol{\beta}) \) by requiring

    +

    In order to find the parameters \( \theta_i \) we will then minimize the spread of \( \chi^2(\boldsymbol{\theta}) \) by requiring

    $$ -\frac{\partial \chi^2(\boldsymbol{\beta})}{\partial \beta_j} = \frac{\partial }{\partial \beta_j}\left[ \frac{1}{n}\sum_{i=0}^{n-1}\left(\frac{y_i-\beta_0x_{i,0}-\beta_1x_{i,1}-\beta_2x_{i,2}-\dots-\beta_{n-1}x_{i,n-1}}{\sigma_i}\right)^2\right]=0, +\frac{\partial \chi^2(\boldsymbol{\theta})}{\partial \theta_j} = \frac{\partial }{\partial \theta_j}\left[ \frac{1}{n}\sum_{i=0}^{n-1}\left(\frac{y_i-\theta_0x_{i,0}-\theta_1x_{i,1}-\theta_2x_{i,2}-\dots-\theta_{n-1}x_{i,n-1}}{\sigma_i}\right)^2\right]=0, $$

    which results in

    $$ -\frac{\partial \chi^2(\boldsymbol{\beta})}{\partial \beta_j} = -\frac{2}{n}\left[ \sum_{i=0}^{n-1}\frac{x_{ij}}{\sigma_i}\left(\frac{y_i-\beta_0x_{i,0}-\beta_1x_{i,1}-\beta_2x_{i,2}-\dots-\beta_{n-1}x_{i,n-1}}{\sigma_i}\right)\right]=0, +\frac{\partial \chi^2(\boldsymbol{\theta})}{\partial \theta_j} = -\frac{2}{n}\left[ \sum_{i=0}^{n-1}\frac{x_{ij}}{\sigma_i}\left(\frac{y_i-\theta_0x_{i,0}-\theta_1x_{i,1}-\theta_2x_{i,2}-\dots-\theta_{n-1}x_{i,n-1}}{\sigma_i}\right)\right]=0, $$

    or in a matrix-vector form as

    $$ -\frac{\partial \chi^2(\boldsymbol{\beta})}{\partial \boldsymbol{\beta}} = 0 = \boldsymbol{A}^T\left( \boldsymbol{b}-\boldsymbol{A}\boldsymbol{\beta}\right). +\frac{\partial \chi^2(\boldsymbol{\theta})}{\partial \boldsymbol{\theta}} = 0 = \boldsymbol{A}^T\left( \boldsymbol{b}-\boldsymbol{A}\boldsymbol{\theta}\right). $$

    where we have defined the matrix \( \boldsymbol{A} =\boldsymbol{X}/\boldsymbol{\Sigma} \) with matrix elements \( a_{ij} = x_{ij}/\sigma_i \) and the vector \( \boldsymbol{b} \) with elements \( b_i = y_i/\sigma_i \).

    @@ -405,9 +393,6 @@ $$
  • 66
  • 67
  • 68
  • -
  • 69
  • -
  • 70
  • -
  • 71
  • »
  • diff --git a/doc/pub/week34/html/._week34-bs064.html b/doc/pub/week34/html/._week34-bs064.html index 4e651fb5f..0c1768328 100644 --- a/doc/pub/week34/html/._week34-bs064.html +++ b/doc/pub/week34/html/._week34-bs064.html @@ -232,16 +232,7 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('Fitting an Equation of State for Dense Nuclear Matter', - 2, - None, - 'fitting-an-equation-of-state-for-dense-nuclear-matter'), - ('The code', 2, None, 'the-code'), - ('Splitting our Data in Training and Test data', - 2, - None, - 'splitting-our-data-in-training-and-test-data')]} + ('The $\\chi^2$ function', 2, None, 'the-chi-2-function')]} end of tocinfo --> @@ -347,9 +338,6 @@ MathJax.Hub.Config({
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Fitting an Equation of State for Dense Nuclear Matter
  • -
  • The code
  • -
  • Splitting our Data in Training and Test data
  • @@ -368,17 +356,17 @@ MathJax.Hub.Config({

    We can rewrite

    $$ -\frac{\partial \chi^2(\boldsymbol{\beta})}{\partial \boldsymbol{\beta}} = 0 = \boldsymbol{A}^T\left( \boldsymbol{b}-\boldsymbol{A}\boldsymbol{\beta}\right), +\frac{\partial \chi^2(\boldsymbol{\theta})}{\partial \boldsymbol{\theta}} = 0 = \boldsymbol{A}^T\left( \boldsymbol{b}-\boldsymbol{A}\boldsymbol{\theta}\right), $$

    as

    $$ -\boldsymbol{A}^T\boldsymbol{b} = \boldsymbol{A}^T\boldsymbol{A}\boldsymbol{\beta}, +\boldsymbol{A}^T\boldsymbol{b} = \boldsymbol{A}^T\boldsymbol{A}\boldsymbol{\theta}, $$

    and if the matrix \( \boldsymbol{A}^T\boldsymbol{A} \) is invertible we have the solution

    $$ -\boldsymbol{\beta} =\left(\boldsymbol{A}^T\boldsymbol{A}\right)^{-1}\boldsymbol{A}^T\boldsymbol{b}. +\boldsymbol{\theta} =\left(\boldsymbol{A}^T\boldsymbol{A}\right)^{-1}\boldsymbol{A}^T\boldsymbol{b}. $$
    @@ -402,9 +390,6 @@ $$
  • 66
  • 67
  • 68
  • -
  • 69
  • -
  • 70
  • -
  • 71
  • »
  • diff --git a/doc/pub/week34/html/._week34-bs065.html b/doc/pub/week34/html/._week34-bs065.html index 72d3eda47..b4ab00b48 100644 --- a/doc/pub/week34/html/._week34-bs065.html +++ b/doc/pub/week34/html/._week34-bs065.html @@ -232,16 +232,7 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('Fitting an Equation of State for Dense Nuclear Matter', - 2, - None, - 'fitting-an-equation-of-state-for-dense-nuclear-matter'), - ('The code', 2, None, 'the-code'), - ('Splitting our Data in Training and Test data', - 2, - None, - 'splitting-our-data-in-training-and-test-data')]} + ('The $\\chi^2$ function', 2, None, 'the-chi-2-function')]} end of tocinfo --> @@ -347,9 +338,6 @@ MathJax.Hub.Config({
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Fitting an Equation of State for Dense Nuclear Matter
  • -
  • The code
  • -
  • Splitting our Data in Training and Test data
  • @@ -371,19 +359,19 @@ $$ \boldsymbol{H} = \left(\boldsymbol{A}^T\boldsymbol{A}\right)^{-1}, $$ -

    we have then the following expression for the parameters \( \beta_j \) (the matrix elements of \( \boldsymbol{H} \) are \( h_{ij} \))

    +

    we have then the following expression for the parameters \( \theta_j \) (the matrix elements of \( \boldsymbol{H} \) are \( h_{ij} \))

    $$ -\beta_j = \sum_{k=0}^{p-1}h_{jk}\sum_{i=0}^{n-1}\frac{y_i}{\sigma_i}\frac{x_{ik}}{\sigma_i} = \sum_{k=0}^{p-1}h_{jk}\sum_{i=0}^{n-1}b_ia_{ik} +\theta_j = \sum_{k=0}^{p-1}h_{jk}\sum_{i=0}^{n-1}\frac{y_i}{\sigma_i}\frac{x_{ik}}{\sigma_i} = \sum_{k=0}^{p-1}h_{jk}\sum_{i=0}^{n-1}b_ia_{ik} $$ -

    We state without proof the expression for the uncertainty in the parameters \( \beta_j \) as (we leave this as an exercise)

    +

    We state without proof the expression for the uncertainty in the parameters \( \theta_j \) as (we leave this as an exercise)

    $$ -\sigma^2(\beta_j) = \sum_{i=0}^{n-1}\sigma_i^2\left( \frac{\partial \beta_j}{\partial y_i}\right)^2, +\sigma^2(\theta_j) = \sum_{i=0}^{n-1}\sigma_i^2\left( \frac{\partial \theta_j}{\partial y_i}\right)^2, $$

    resulting in

    $$ -\sigma^2(\beta_j) = \left(\sum_{k=0}^{p-1}h_{jk}\sum_{i=0}^{n-1}a_{ik}\right)\left(\sum_{l=0}^{p-1}h_{jl}\sum_{m=0}^{n-1}a_{ml}\right) = h_{jj}! +\sigma^2(\theta_j) = \left(\sum_{k=0}^{p-1}h_{jk}\sum_{i=0}^{n-1}a_{ik}\right)\left(\sum_{l=0}^{p-1}h_{jl}\sum_{m=0}^{n-1}a_{ml}\right) = h_{jj}! $$ @@ -406,9 +394,6 @@ $$
  • 66
  • 67
  • 68
  • -
  • 69
  • -
  • 70
  • -
  • 71
  • »
  • diff --git a/doc/pub/week34/html/._week34-bs066.html b/doc/pub/week34/html/._week34-bs066.html index dfdc4cb09..d8d1c5817 100644 --- a/doc/pub/week34/html/._week34-bs066.html +++ b/doc/pub/week34/html/._week34-bs066.html @@ -232,16 +232,7 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('Fitting an Equation of State for Dense Nuclear Matter', - 2, - None, - 'fitting-an-equation-of-state-for-dense-nuclear-matter'), - ('The code', 2, None, 'the-code'), - ('Splitting our Data in Training and Test data', - 2, - None, - 'splitting-our-data-in-training-and-test-data')]} + ('The $\\chi^2$ function', 2, None, 'the-chi-2-function')]} end of tocinfo --> @@ -347,9 +338,6 @@ MathJax.Hub.Config({
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Fitting an Equation of State for Dense Nuclear Matter
  • -
  • The code
  • -
  • Splitting our Data in Training and Test data
  • @@ -367,17 +355,17 @@ MathJax.Hub.Config({

    The first step here is to approximate the function \( y \) with a first-order polynomial, that is we write

    $$ -y=y(x) \rightarrow y(x_i) \approx \beta_0+\beta_1 x_i. +y=y(x) \rightarrow y(x_i) \approx \theta_0+\theta_1 x_i. $$ -

    By computing the derivatives of \( \chi^2 \) with respect to \( \beta_0 \) and \( \beta_1 \) show that these are given by

    +

    By computing the derivatives of \( \chi^2 \) with respect to \( \theta_0 \) and \( \theta_1 \) show that these are given by

    $$ -\frac{\partial \chi^2(\boldsymbol{\beta})}{\partial \beta_0} = -2\left[ \frac{1}{n}\sum_{i=0}^{n-1}\left(\frac{y_i-\beta_0-\beta_1x_{i}}{\sigma_i^2}\right)\right]=0, +\frac{\partial \chi^2(\boldsymbol{\theta})}{\partial \theta_0} = -2\left[ \frac{1}{n}\sum_{i=0}^{n-1}\left(\frac{y_i-\theta_0-\theta_1x_{i}}{\sigma_i^2}\right)\right]=0, $$

    and

    $$ -\frac{\partial \chi^2(\boldsymbol{\beta})}{\partial \beta_1} = -\frac{2}{n}\left[ \sum_{i=0}^{n-1}x_i\left(\frac{y_i-\beta_0-\beta_1x_{i}}{\sigma_i^2}\right)\right]=0. +\frac{\partial \chi^2(\boldsymbol{\theta})}{\partial \theta_1} = -\frac{2}{n}\left[ \sum_{i=0}^{n-1}x_i\left(\frac{y_i-\theta_0-\theta_1x_{i}}{\sigma_i^2}\right)\right]=0. $$ @@ -399,9 +387,6 @@ $$
  • 66
  • 67
  • 68
  • -
  • 69
  • -
  • 70
  • -
  • 71
  • »
  • diff --git a/doc/pub/week34/html/week34-bs.html b/doc/pub/week34/html/week34-bs.html index 69699453d..eb43b71be 100644 --- a/doc/pub/week34/html/week34-bs.html +++ b/doc/pub/week34/html/week34-bs.html @@ -232,16 +232,7 @@ doconce format html week34.do.txt --html_style=bootstrap --pygments_html_style=d ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('Fitting an Equation of State for Dense Nuclear Matter', - 2, - None, - 'fitting-an-equation-of-state-for-dense-nuclear-matter'), - ('The code', 2, None, 'the-code'), - ('Splitting our Data in Training and Test data', - 2, - None, - 'splitting-our-data-in-training-and-test-data')]} + ('The $\\chi^2$ function', 2, None, 'the-chi-2-function')]} end of tocinfo --> @@ -347,9 +338,6 @@ MathJax.Hub.Config({
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Fitting an Equation of State for Dense Nuclear Matter
  • -
  • The code
  • -
  • Splitting our Data in Training and Test data
  • @@ -401,7 +389,7 @@ MathJax.Hub.Config({
  • 9
  • 10
  • ...
  • -
  • 71
  • +
  • 68
  • »
  • diff --git a/doc/pub/week34/html/week34-reveal.html b/doc/pub/week34/html/week34-reveal.html index 79e6aa4cd..7c88ebd18 100644 --- a/doc/pub/week34/html/week34-reveal.html +++ b/doc/pub/week34/html/week34-reveal.html @@ -2226,40 +2226,6 @@ infile = open(data_path( -
    -
    -
    -
    -
    -
    from pylab import plt, mpl
    -plt.style.use('seaborn')
    -mpl.rcParams['font.family'] = 'serif'
    -
    -def MakePlot(x,y, styles, labels, axlabels):
    -    plt.figure(figsize=(10,6))
    -    for i in range(len(x)):
    -        plt.plot(x[i], y[i], styles[i], label = labels[i])
    -        plt.xlabel(axlabels[0])
    -        plt.ylabel(axlabels[1])
    -    plt.legend(loc=0)
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -

    Our next step is to read the data on experimental binding energies and reorganize them as functions of the mass number \( A \), the number of protons \( Z \) and neutrons \( N \) using pandas. Before we do this it is @@ -2564,11 +2530,11 @@ Now it is time to dive more into the details of various methods. We will start w

    Why Linear Regression (aka Ordinary Least Squares and family)

    -

    Fitting a continuous function with linear parameterization in terms of the parameters \( \boldsymbol{\beta} \).

    +

    Fitting a continuous function with linear parameterization in terms of the parameters \( \boldsymbol{\theta} \).

    @@ -2670,7 +2638,7 @@ so-called

    -

    With the above we use the design matrix to define the approximation \( \boldsymbol{\tilde{y}} \) via the unknown quantity \( \boldsymbol{\beta} \) as

    +

    With the above we use the design matrix to define the approximation \( \boldsymbol{\tilde{y}} \) via the unknown quantity \( \boldsymbol{\theta} \) as

     
    $$ -\boldsymbol{\tilde{y}}= \boldsymbol{X}\boldsymbol{\beta}, +\boldsymbol{\tilde{y}}= \boldsymbol{X}\boldsymbol{\theta}, $$

     
    -

    and in order to find the optimal parameters \( \beta_i \) instead of solving the above linear algebra problem, we define a function which gives a measure of the spread between the values \( y_i \) (which represent hopefully the exact values) and the parameterized values \( \tilde{y}_i \), namely

    +

    and in order to find the optimal parameters \( \theta_i \) instead of solving the above linear algebra problem, we define a function which gives a measure of the spread between the values \( y_i \) (which represent hopefully the exact values) and the parameterized values \( \tilde{y}_i \), namely

     
    $$ -C(\boldsymbol{\beta})=\frac{1}{n}\sum_{i=0}^{n-1}\left(y_i-\tilde{y}_i\right)^2=\frac{1}{n}\left\{\left(\boldsymbol{y}-\boldsymbol{\tilde{y}}\right)^T\left(\boldsymbol{y}-\boldsymbol{\tilde{y}}\right)\right\}, +C(\boldsymbol{\theta})=\frac{1}{n}\sum_{i=0}^{n-1}\left(y_i-\tilde{y}_i\right)^2=\frac{1}{n}\left\{\left(\boldsymbol{y}-\boldsymbol{\tilde{y}}\right)^T\left(\boldsymbol{y}-\boldsymbol{\tilde{y}}\right)\right\}, $$

     

    or using the matrix \( \boldsymbol{X} \) and in a more compact matrix-vector notation as

     
    $$ -C(\boldsymbol{\beta})=\frac{1}{n}\left\{\left(\boldsymbol{y}-\boldsymbol{X}\boldsymbol{\beta}\right)^T\left(\boldsymbol{y}-\boldsymbol{X}\boldsymbol{\beta}\right)\right\}. +C(\boldsymbol{\theta})=\frac{1}{n}\left\{\left(\boldsymbol{y}-\boldsymbol{X}\boldsymbol{\theta}\right)^T\left(\boldsymbol{y}-\boldsymbol{X}\boldsymbol{\theta}\right)\right\}. $$

     
    @@ -2979,11 +2947,11 @@ the function \( C \) as

     
    $$ -C(\boldsymbol{\beta})=\frac{1}{2n}\sum_{i=0}^{n-1}\left(y_i-\tilde{y}_i\right)^2, +C(\boldsymbol{\theta})=\frac{1}{2n}\sum_{i=0}^{n-1}\left(y_i-\tilde{y}_i\right)^2, $$

     
    -

    since when taking the first derivative with respect to the unknown parameters \( \beta \), the factor of \( 2 \) cancels out.

    +

    since when taking the first derivative with respect to the unknown parameters \( \theta \), the factor of \( 2 \) cancels out.

    @@ -2996,7 +2964,7 @@ $$

    The function

     
    $$ -C(\boldsymbol{\beta})=\frac{1}{n}\left\{\left(\boldsymbol{y}-\boldsymbol{X}\boldsymbol{\beta}\right)^T\left(\boldsymbol{y}-\boldsymbol{X}\boldsymbol{\beta}\right)\right\}, +C(\boldsymbol{\theta})=\frac{1}{n}\left\{\left(\boldsymbol{y}-\boldsymbol{X}\boldsymbol{\theta}\right)^T\left(\boldsymbol{y}-\boldsymbol{X}\boldsymbol{\theta}\right)\right\}, $$

     
    @@ -3005,7 +2973,7 @@ When linking (see the discussion below) with the maximum likelihood approach bel

     
    $$ -y_{i}=\langle y_i \rangle = \beta_0x_{i,0}+\beta_1x_{i,1}+\beta_2x_{i,2}+\dots+\beta_{n-1}x_{i,n-1}+\epsilon_i, +y_{i}=\langle y_i \rangle = \theta_0x_{i,0}+\theta_1x_{i,1}+\theta_2x_{i,2}+\dots+\theta_{n-1}x_{i,n-1}+\epsilon_i, $$

     
    @@ -3019,32 +2987,32 @@ the standard deviation discussed earlier. In the discussion here we will treat \( y_i \) as our exact value for the response variable.

    -

    In order to find the parameters \( \beta_i \) we will then minimize the spread of \( C(\boldsymbol{\beta}) \), that is we are going to solve the problem

    +

    In order to find the parameters \( \theta_i \) we will then minimize the spread of \( C(\boldsymbol{\theta}) \), that is we are going to solve the problem

     
    $$ -{\displaystyle \min_{\boldsymbol{\beta}\in -{\mathbb{R}}^{p}}}\frac{1}{n}\left\{\left(\boldsymbol{y}-\boldsymbol{X}\boldsymbol{\beta}\right)^T\left(\boldsymbol{y}-\boldsymbol{X}\boldsymbol{\beta}\right)\right\}. +{\displaystyle \min_{\boldsymbol{\theta}\in +{\mathbb{R}}^{p}}}\frac{1}{n}\left\{\left(\boldsymbol{y}-\boldsymbol{X}\boldsymbol{\theta}\right)^T\left(\boldsymbol{y}-\boldsymbol{X}\boldsymbol{\theta}\right)\right\}. $$

     

    In practical terms it means we will require

     
    $$ -\frac{\partial C(\boldsymbol{\beta})}{\partial \beta_j} = \frac{\partial }{\partial \beta_j}\left[ \frac{1}{n}\sum_{i=0}^{n-1}\left(y_i-\beta_0x_{i,0}-\beta_1x_{i,1}-\beta_2x_{i,2}-\dots-\beta_{n-1}x_{i,n-1}\right)^2\right]=0, +\frac{\partial C(\boldsymbol{\theta})}{\partial \theta_j} = \frac{\partial }{\partial \theta_j}\left[ \frac{1}{n}\sum_{i=0}^{n-1}\left(y_i-\theta_0x_{i,0}-\theta_1x_{i,1}-\theta_2x_{i,2}-\dots-\theta_{n-1}x_{i,n-1}\right)^2\right]=0, $$

     

    which results in

     
    $$ -\frac{\partial C(\boldsymbol{\beta})}{\partial \beta_j} = -\frac{2}{n}\left[ \sum_{i=0}^{n-1}x_{ij}\left(y_i-\beta_0x_{i,0}-\beta_1x_{i,1}-\beta_2x_{i,2}-\dots-\beta_{n-1}x_{i,n-1}\right)\right]=0, +\frac{\partial C(\boldsymbol{\theta})}{\partial \theta_j} = -\frac{2}{n}\left[ \sum_{i=0}^{n-1}x_{ij}\left(y_i-\theta_0x_{i,0}-\theta_1x_{i,1}-\theta_2x_{i,2}-\dots-\theta_{n-1}x_{i,n-1}\right)\right]=0, $$

     

    or in a matrix-vector form as

     
    $$ -\frac{\partial C(\boldsymbol{\beta})}{\partial \boldsymbol{\beta}} = 0 = \boldsymbol{X}^T\left( \boldsymbol{y}-\boldsymbol{X}\boldsymbol{\beta}\right). +\frac{\partial C(\boldsymbol{\theta})}{\partial \boldsymbol{\theta}} = 0 = \boldsymbol{X}^T\left( \boldsymbol{y}-\boldsymbol{X}\boldsymbol{\theta}\right). $$

     
    @@ -3058,21 +3026,21 @@ $$

    We can rewrite

     
    $$ -\frac{\partial C(\boldsymbol{\beta})}{\partial \boldsymbol{\beta}} = 0 = \boldsymbol{X}^T\left( \boldsymbol{y}-\boldsymbol{X}\boldsymbol{\beta}\right), +\frac{\partial C(\boldsymbol{\theta})}{\partial \boldsymbol{\theta}} = 0 = \boldsymbol{X}^T\left( \boldsymbol{y}-\boldsymbol{X}\boldsymbol{\theta}\right), $$

     

    as

     
    $$ -\boldsymbol{X}^T\boldsymbol{y} = \boldsymbol{X}^T\boldsymbol{X}\boldsymbol{\beta}, +\boldsymbol{X}^T\boldsymbol{y} = \boldsymbol{X}^T\boldsymbol{X}\boldsymbol{\theta}, $$

     

    and if the matrix \( \boldsymbol{X}^T\boldsymbol{X} \) is invertible we have the solution

     
    $$ -\boldsymbol{\beta} =\left(\boldsymbol{X}^T\boldsymbol{X}\right)^{-1}\boldsymbol{X}^T\boldsymbol{y}. +\boldsymbol{\theta} =\left(\boldsymbol{X}^T\boldsymbol{X}\right)^{-1}\boldsymbol{X}^T\boldsymbol{y}. $$

     
    @@ -3105,25 +3073,25 @@ allow for the usage of direct linear algebra methods such as LU decomposi

    The residuals \( \boldsymbol{\epsilon} \) are in turn given by

     
    $$ -\boldsymbol{\epsilon} = \boldsymbol{y}-\boldsymbol{\tilde{y}} = \boldsymbol{y}-\boldsymbol{X}\boldsymbol{\beta}, +\boldsymbol{\epsilon} = \boldsymbol{y}-\boldsymbol{\tilde{y}} = \boldsymbol{y}-\boldsymbol{X}\boldsymbol{\theta}, $$

     

    and with

     
    $$ -\boldsymbol{X}^T\left( \boldsymbol{y}-\boldsymbol{X}\boldsymbol{\beta}\right)= 0, +\boldsymbol{X}^T\left( \boldsymbol{y}-\boldsymbol{X}\boldsymbol{\theta}\right)= 0, $$

     

    we have

     
    $$ -\boldsymbol{X}^T\boldsymbol{\epsilon}=\boldsymbol{X}^T\left( \boldsymbol{y}-\boldsymbol{X}\boldsymbol{\beta}\right)= 0, +\boldsymbol{X}^T\boldsymbol{\epsilon}=\boldsymbol{X}^T\left( \boldsymbol{y}-\boldsymbol{X}\boldsymbol{\theta}\right)= 0, $$

     
    -

    meaning that the solution for \( \boldsymbol{\beta} \) is the one which minimizes the residuals. Later we will link this with the maximum likelihood approach.

    +

    meaning that the solution for \( \boldsymbol{\theta} \) is the one which minimizes the residuals. Later we will link this with the maximum likelihood approach.

    Let us now return to our nuclear binding energies and simply code the above equations.

    @@ -3132,7 +3100,7 @@ $$

    Own code for Ordinary Least Squares

    -

    It is rather straightforward to implement the matrix inversion and obtain the parameters \( \boldsymbol{\beta} \). After having defined the matrix \( \boldsymbol{X} \) we simply need to +

    It is rather straightforward to implement the matrix inversion and obtain the parameters \( \boldsymbol{\theta} \). After having defined the matrix \( \boldsymbol{X} \) we simply need to write

    @@ -3353,7 +3321,7 @@ as

     
    $$ -\chi^2(\boldsymbol{\beta})=\frac{1}{n}\sum_{i=0}^{n-1}\frac{\left(y_i-\tilde{y}_i\right)^2}{\sigma_i^2}=\frac{1}{n}\left\{\left(\boldsymbol{y}-\boldsymbol{\tilde{y}}\right)^T\frac{1}{\boldsymbol{\Sigma^2}}\left(\boldsymbol{y}-\boldsymbol{\tilde{y}}\right)\right\}, +\chi^2(\boldsymbol{\theta})=\frac{1}{n}\sum_{i=0}^{n-1}\frac{\left(y_i-\tilde{y}_i\right)^2}{\sigma_i^2}=\frac{1}{n}\left\{\left(\boldsymbol{y}-\boldsymbol{\tilde{y}}\right)^T\frac{1}{\boldsymbol{\Sigma^2}}\left(\boldsymbol{y}-\boldsymbol{\tilde{y}}\right)\right\}, $$

     
    @@ -3367,24 +3335,24 @@ $$

    -

    In order to find the parameters \( \beta_i \) we will then minimize the spread of \( \chi^2(\boldsymbol{\beta}) \) by requiring

    +

    In order to find the parameters \( \theta_i \) we will then minimize the spread of \( \chi^2(\boldsymbol{\theta}) \) by requiring

     
    $$ -\frac{\partial \chi^2(\boldsymbol{\beta})}{\partial \beta_j} = \frac{\partial }{\partial \beta_j}\left[ \frac{1}{n}\sum_{i=0}^{n-1}\left(\frac{y_i-\beta_0x_{i,0}-\beta_1x_{i,1}-\beta_2x_{i,2}-\dots-\beta_{n-1}x_{i,n-1}}{\sigma_i}\right)^2\right]=0, +\frac{\partial \chi^2(\boldsymbol{\theta})}{\partial \theta_j} = \frac{\partial }{\partial \theta_j}\left[ \frac{1}{n}\sum_{i=0}^{n-1}\left(\frac{y_i-\theta_0x_{i,0}-\theta_1x_{i,1}-\theta_2x_{i,2}-\dots-\theta_{n-1}x_{i,n-1}}{\sigma_i}\right)^2\right]=0, $$

     

    which results in

     
    $$ -\frac{\partial \chi^2(\boldsymbol{\beta})}{\partial \beta_j} = -\frac{2}{n}\left[ \sum_{i=0}^{n-1}\frac{x_{ij}}{\sigma_i}\left(\frac{y_i-\beta_0x_{i,0}-\beta_1x_{i,1}-\beta_2x_{i,2}-\dots-\beta_{n-1}x_{i,n-1}}{\sigma_i}\right)\right]=0, +\frac{\partial \chi^2(\boldsymbol{\theta})}{\partial \theta_j} = -\frac{2}{n}\left[ \sum_{i=0}^{n-1}\frac{x_{ij}}{\sigma_i}\left(\frac{y_i-\theta_0x_{i,0}-\theta_1x_{i,1}-\theta_2x_{i,2}-\dots-\theta_{n-1}x_{i,n-1}}{\sigma_i}\right)\right]=0, $$

     

    or in a matrix-vector form as

     
    $$ -\frac{\partial \chi^2(\boldsymbol{\beta})}{\partial \boldsymbol{\beta}} = 0 = \boldsymbol{A}^T\left( \boldsymbol{b}-\boldsymbol{A}\boldsymbol{\beta}\right). +\frac{\partial \chi^2(\boldsymbol{\theta})}{\partial \boldsymbol{\theta}} = 0 = \boldsymbol{A}^T\left( \boldsymbol{b}-\boldsymbol{A}\boldsymbol{\theta}\right). $$

     
    @@ -3401,21 +3369,21 @@ $$

    We can rewrite

     
    $$ -\frac{\partial \chi^2(\boldsymbol{\beta})}{\partial \boldsymbol{\beta}} = 0 = \boldsymbol{A}^T\left( \boldsymbol{b}-\boldsymbol{A}\boldsymbol{\beta}\right), +\frac{\partial \chi^2(\boldsymbol{\theta})}{\partial \boldsymbol{\theta}} = 0 = \boldsymbol{A}^T\left( \boldsymbol{b}-\boldsymbol{A}\boldsymbol{\theta}\right), $$

     

    as

     
    $$ -\boldsymbol{A}^T\boldsymbol{b} = \boldsymbol{A}^T\boldsymbol{A}\boldsymbol{\beta}, +\boldsymbol{A}^T\boldsymbol{b} = \boldsymbol{A}^T\boldsymbol{A}\boldsymbol{\theta}, $$

     

    and if the matrix \( \boldsymbol{A}^T\boldsymbol{A} \) is invertible we have the solution

     
    $$ -\boldsymbol{\beta} =\left(\boldsymbol{A}^T\boldsymbol{A}\right)^{-1}\boldsymbol{A}^T\boldsymbol{b}. +\boldsymbol{\theta} =\left(\boldsymbol{A}^T\boldsymbol{A}\right)^{-1}\boldsymbol{A}^T\boldsymbol{b}. $$

     
    @@ -3434,24 +3402,24 @@ $$ $$

     
    -

    we have then the following expression for the parameters \( \beta_j \) (the matrix elements of \( \boldsymbol{H} \) are \( h_{ij} \))

    +

    we have then the following expression for the parameters \( \theta_j \) (the matrix elements of \( \boldsymbol{H} \) are \( h_{ij} \))

     
    $$ -\beta_j = \sum_{k=0}^{p-1}h_{jk}\sum_{i=0}^{n-1}\frac{y_i}{\sigma_i}\frac{x_{ik}}{\sigma_i} = \sum_{k=0}^{p-1}h_{jk}\sum_{i=0}^{n-1}b_ia_{ik} +\theta_j = \sum_{k=0}^{p-1}h_{jk}\sum_{i=0}^{n-1}\frac{y_i}{\sigma_i}\frac{x_{ik}}{\sigma_i} = \sum_{k=0}^{p-1}h_{jk}\sum_{i=0}^{n-1}b_ia_{ik} $$

     
    -

    We state without proof the expression for the uncertainty in the parameters \( \beta_j \) as (we leave this as an exercise)

    +

    We state without proof the expression for the uncertainty in the parameters \( \theta_j \) as (we leave this as an exercise)

     
    $$ -\sigma^2(\beta_j) = \sum_{i=0}^{n-1}\sigma_i^2\left( \frac{\partial \beta_j}{\partial y_i}\right)^2, +\sigma^2(\theta_j) = \sum_{i=0}^{n-1}\sigma_i^2\left( \frac{\partial \theta_j}{\partial y_i}\right)^2, $$

     

    resulting in

     
    $$ -\sigma^2(\beta_j) = \left(\sum_{k=0}^{p-1}h_{jk}\sum_{i=0}^{n-1}a_{ik}\right)\left(\sum_{l=0}^{p-1}h_{jl}\sum_{m=0}^{n-1}a_{ml}\right) = h_{jj}! +\sigma^2(\theta_j) = \left(\sum_{k=0}^{p-1}h_{jk}\sum_{i=0}^{n-1}a_{ik}\right)\left(\sum_{l=0}^{p-1}h_{jl}\sum_{m=0}^{n-1}a_{ml}\right) = h_{jj}! $$

     
    @@ -3465,21 +3433,21 @@ $$

    The first step here is to approximate the function \( y \) with a first-order polynomial, that is we write

     
    $$ -y=y(x) \rightarrow y(x_i) \approx \beta_0+\beta_1 x_i. +y=y(x) \rightarrow y(x_i) \approx \theta_0+\theta_1 x_i. $$

     
    -

    By computing the derivatives of \( \chi^2 \) with respect to \( \beta_0 \) and \( \beta_1 \) show that these are given by

    +

    By computing the derivatives of \( \chi^2 \) with respect to \( \theta_0 \) and \( \theta_1 \) show that these are given by

     
    $$ -\frac{\partial \chi^2(\boldsymbol{\beta})}{\partial \beta_0} = -2\left[ \frac{1}{n}\sum_{i=0}^{n-1}\left(\frac{y_i-\beta_0-\beta_1x_{i}}{\sigma_i^2}\right)\right]=0, +\frac{\partial \chi^2(\boldsymbol{\theta})}{\partial \theta_0} = -2\left[ \frac{1}{n}\sum_{i=0}^{n-1}\left(\frac{y_i-\theta_0-\theta_1x_{i}}{\sigma_i^2}\right)\right]=0, $$

     

    and

     
    $$ -\frac{\partial \chi^2(\boldsymbol{\beta})}{\partial \beta_1} = -\frac{2}{n}\left[ \sum_{i=0}^{n-1}x_i\left(\frac{y_i-\beta_0-\beta_1x_{i}}{\sigma_i^2}\right)\right]=0. +\frac{\partial \chi^2(\boldsymbol{\theta})}{\partial \theta_1} = -\frac{2}{n}\left[ \sum_{i=0}^{n-1}x_i\left(\frac{y_i-\theta_0-\theta_1x_{i}}{\sigma_i^2}\right)\right]=0. $$

     
    @@ -3528,270 +3496,24 @@ $$

     
    $$ -\beta_0 = \frac{\gamma_{xx}\gamma_y-\gamma_x\gamma_y}{\gamma\gamma_{xx}-\gamma_x^2}, +\theta_0 = \frac{\gamma_{xx}\gamma_y-\gamma_x\gamma_y}{\gamma\gamma_{xx}-\gamma_x^2}, $$

     

     
    $$ -\beta_1 = \frac{\gamma_{xy}\gamma-\gamma_x\gamma_y}{\gamma\gamma_{xx}-\gamma_x^2}. +\theta_1 = \frac{\gamma_{xy}\gamma-\gamma_x\gamma_y}{\gamma\gamma_{xx}-\gamma_x^2}. $$

     

    This approach (different linear and non-linear regression) suffers often from both being underdetermined and overdetermined in the -unknown coefficients \( \beta_i \). A better approach is to use the +unknown coefficients \( \theta_i \). A better approach is to use the Singular Value Decomposition (SVD) method discussed next week.

    -
    -

    Fitting an Equation of State for Dense Nuclear Matter

    - -

    Before we continue, let us introduce yet another example. We are going to fit the -nuclear equation of state using results from many-body calculations. -The equation of state we have made available here, as function of -density, has been derived using modern nucleon-nucleon potentials with -the addition of three-body -forces. This -time the file is presented as a standard csv file. -

    - -

    The beginning of the Python code here is similar to what you have seen -before, with the same initializations and declarations. We use also -pandas again, rather extensively in order to organize our data. -

    - -

    The difference now is that we use Scikit-Learn's regression tools -instead of our own matrix inversion implementation. Furthermore, we -sneak in Ridge regression (to be discussed below) which includes a -hyperparameter \( \lambda \), also to be explained below. -

    -
    - -
    -

    The code

    - - - -
    -
    -
    -
    -
    -
    # Common imports
    -import os
    -import numpy as np
    -import pandas as pd
    -import matplotlib.pyplot as plt
    -import matplotlib.pyplot as plt
    -import sklearn.linear_model as skl
    -from sklearn.metrics import mean_squared_error, r2_score, mean_absolute_error
    -
    -# Where to save the figures and data files
    -PROJECT_ROOT_DIR = "Results"
    -FIGURE_ID = "Results/FigureFiles"
    -DATA_ID = "DataFiles/"
    -
    -if not os.path.exists(PROJECT_ROOT_DIR):
    -    os.mkdir(PROJECT_ROOT_DIR)
    -
    -if not os.path.exists(FIGURE_ID):
    -    os.makedirs(FIGURE_ID)
    -
    -if not os.path.exists(DATA_ID):
    -    os.makedirs(DATA_ID)
    -
    -def image_path(fig_id):
    -    return os.path.join(FIGURE_ID, fig_id)
    -
    -def data_path(dat_id):
    -    return os.path.join(DATA_ID, dat_id)
    -
    -def save_fig(fig_id):
    -    plt.savefig(image_path(fig_id) + ".png", format='png')
    -
    -infile = open(data_path("EoS.csv"),'r')
    -
    -# Read the EoS data as  csv file and organize the data into two arrays with density and energies
    -EoS = pd.read_csv(infile, names=('Density', 'Energy'))
    -EoS['Energy'] = pd.to_numeric(EoS['Energy'], errors='coerce')
    -EoS = EoS.dropna()
    -Energies = EoS['Energy']
    -Density = EoS['Density']
    -#  The design matrix now as function of various polytrops
    -X = np.zeros((len(Density),4))
    -X[:,3] = Density**(4.0/3.0)
    -X[:,2] = Density
    -X[:,1] = Density**(2.0/3.0)
    -X[:,0] = 1
    -
    -# We use now Scikit-Learn's linear regressor and ridge regressor
    -# OLS part
    -clf = skl.LinearRegression().fit(X, Energies)
    -ytilde = clf.predict(X)
    -EoS['Eols']  = ytilde
    -# The mean squared error                               
    -print("Mean squared error: %.2f" % mean_squared_error(Energies, ytilde))
    -# Explained variance score: 1 is perfect prediction                                 
    -print('Variance score: %.2f' % r2_score(Energies, ytilde))
    -# Mean absolute error                                                           
    -print('Mean absolute error: %.2f' % mean_absolute_error(Energies, ytilde))
    -print(clf.coef_, clf.intercept_)
    -
    -# The Ridge regression with a hyperparameter lambda = 0.1
    -_lambda = 0.1
    -clf_ridge = skl.Ridge(alpha=_lambda).fit(X, Energies)
    -yridge = clf_ridge.predict(X)
    -EoS['Eridge']  = yridge
    -# The mean squared error                               
    -print("Mean squared error: %.2f" % mean_squared_error(Energies, yridge))
    -# Explained variance score: 1 is perfect prediction                                 
    -print('Variance score: %.2f' % r2_score(Energies, yridge))
    -# Mean absolute error                                                           
    -print('Mean absolute error: %.2f' % mean_absolute_error(Energies, yridge))
    -print(clf_ridge.coef_, clf_ridge.intercept_)
    -
    -fig, ax = plt.subplots()
    -ax.set_xlabel(r'$\rho[\mathrm{fm}^{-3}]$')
    -ax.set_ylabel(r'Energy per particle')
    -ax.plot(EoS['Density'], EoS['Energy'], alpha=0.7, lw=2,
    -            label='Theoretical data')
    -ax.plot(EoS['Density'], EoS['Eols'], alpha=0.7, lw=2, c='m',
    -            label='OLS')
    -ax.plot(EoS['Density'], EoS['Eridge'], alpha=0.7, lw=2, c='g',
    -            label='Ridge $\lambda = 0.1$')
    -ax.legend()
    -save_fig("EoSfitting")
    -plt.show()
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    - -

    The above simple polynomial in density \( \rho \) gives an excellent fit -to the data. -

    - -

    We note also that there is a small deviation between the -standard OLS and the Ridge regression at higher densities. We discuss this in more detail -below. -

    -
    - -
    -

    Splitting our Data in Training and Test data

    - -

    It is normal in essentially all Machine Learning studies to split the -data in a training set and a test set (sometimes also an additional -validation set). Scikit-Learn has an own function for this. There -is no explicit recipe for how much data should be included as training -data and say test data. An accepted rule of thumb is to use -approximately \( 2/3 \) to \( 4/5 \) of the data as training data. We will -postpone a discussion of this splitting to the end of these notes and -our discussion of the so-called bias-variance tradeoff. Here we -limit ourselves to repeat the above equation of state fitting example -but now splitting the data into a training set and a test set. -

    - - - -
    -
    -
    -
    -
    -
    import os
    -import numpy as np
    -import pandas as pd
    -import matplotlib.pyplot as plt
    -from sklearn.model_selection import train_test_split
    -# Where to save the figures and data files
    -PROJECT_ROOT_DIR = "Results"
    -FIGURE_ID = "Results/FigureFiles"
    -DATA_ID = "DataFiles/"
    -
    -if not os.path.exists(PROJECT_ROOT_DIR):
    -    os.mkdir(PROJECT_ROOT_DIR)
    -
    -if not os.path.exists(FIGURE_ID):
    -    os.makedirs(FIGURE_ID)
    -
    -if not os.path.exists(DATA_ID):
    -    os.makedirs(DATA_ID)
    -
    -def image_path(fig_id):
    -    return os.path.join(FIGURE_ID, fig_id)
    -
    -def data_path(dat_id):
    -    return os.path.join(DATA_ID, dat_id)
    -
    -def save_fig(fig_id):
    -    plt.savefig(image_path(fig_id) + ".png", format='png')
    -
    -def R2(y_data, y_model):
    -    return 1 - np.sum((y_data - y_model) ** 2) / np.sum((y_data - np.mean(y_data)) ** 2)
    -def MSE(y_data,y_model):
    -    n = np.size(y_model)
    -    return np.sum((y_data-y_model)**2)/n
    -
    -infile = open(data_path("EoS.csv"),'r')
    -
    -# Read the EoS data as  csv file and organized into two arrays with density and energies
    -EoS = pd.read_csv(infile, names=('Density', 'Energy'))
    -EoS['Energy'] = pd.to_numeric(EoS['Energy'], errors='coerce')
    -EoS = EoS.dropna()
    -Energies = EoS['Energy']
    -Density = EoS['Density']
    -#  The design matrix now as function of various polytrops
    -X = np.zeros((len(Density),5))
    -X[:,0] = 1
    -X[:,1] = Density**(2.0/3.0)
    -X[:,2] = Density
    -X[:,3] = Density**(4.0/3.0)
    -X[:,4] = Density**(5.0/3.0)
    -# We split the data in test and training data
    -X_train, X_test, y_train, y_test = train_test_split(X, Energies, test_size=0.2)
    -# matrix inversion to find beta
    -beta = np.linalg.inv(X_train.T.dot(X_train)).dot(X_train.T).dot(y_train)
    -# and then make the prediction
    -ytilde = X_train @ beta
    -print("Training R2")
    -print(R2(y_train,ytilde))
    -print("Training MSE")
    -print(MSE(y_train,ytilde))
    -ypredict = X_test @ beta
    -print("Test R2")
    -print(R2(y_test,ypredict))
    -print("Test MSE")
    -print(MSE(y_test,ypredict))
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    - diff --git a/doc/pub/week34/html/week34-solarized.html b/doc/pub/week34/html/week34-solarized.html index dbdbc9744..22292ecf3 100644 --- a/doc/pub/week34/html/week34-solarized.html +++ b/doc/pub/week34/html/week34-solarized.html @@ -259,16 +259,7 @@ div.toc p,a { ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('The $\\chi^2$ function', 2, None, 'the-chi-2-function'), - ('Fitting an Equation of State for Dense Nuclear Matter', - 2, - None, - 'fitting-an-equation-of-state-for-dense-nuclear-matter'), - ('The code', 2, None, 'the-code'), - ('Splitting our Data in Training and Test data', - 2, - None, - 'splitting-our-data-in-training-and-test-data')]} + ('The $\\chi^2$ function', 2, None, 'the-chi-2-function')]} end of tocinfo --> @@ -2207,40 +2198,6 @@ infile = open(data_path( -
    -
    -
    -
    -
    -
    from pylab import plt, mpl
    -plt.style.use('seaborn')
    -mpl.rcParams['font.family'] = 'serif'
    -
    -def MakePlot(x,y, styles, labels, axlabels):
    -    plt.figure(figsize=(10,6))
    -    for i in range(len(x)):
    -        plt.plot(x[i], y[i], styles[i], label = labels[i])
    -        plt.xlabel(axlabels[0])
    -        plt.ylabel(axlabels[1])
    -    plt.legend(loc=0)
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -

    Our next step is to read the data on experimental binding energies and reorganize them as functions of the mass number \( A \), the number of protons \( Z \) and neutrons \( N \) using pandas. Before we do this it is @@ -2544,11 +2501,11 @@ Now it is time to dive more into the details of various methods. We will start w









    Why Linear Regression (aka Ordinary Least Squares and family)

    -

    Fitting a continuous function with linear parameterization in terms of the parameters \( \boldsymbol{\beta} \).

    +

    Fitting a continuous function with linear parameterization in terms of the parameters \( \boldsymbol{\theta} \).