This commit is contained in:
Morten Hjorth-Jensen
2023-08-31 07:41:43 +02:00
parent bbdb9b6dc6
commit d06f4b6b38
16 changed files with 1801 additions and 1788 deletions
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
+33 -33
View File
@@ -1611,7 +1611,7 @@ Since we are not using <strong>Scikit-Learn</strong> here we can define our own
</div>
</div>
<div class="cell_output docutils container">
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>0.9963202597920238
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>0.99541140030306
</pre></div>
</div>
</div>
@@ -1628,7 +1628,7 @@ Since we are not using <strong>Scikit-Learn</strong> here we can define our own
</div>
</div>
<div class="cell_output docutils container">
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>0.008550594684081035
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>0.009710035292693498
</pre></div>
</div>
</div>
@@ -1643,31 +1643,31 @@ Since we are not using <strong>Scikit-Learn</strong> here we can define our own
</div>
</div>
<div class="cell_output docutils container">
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>[1.09846636e-02 2.39074222e-02 4.94861749e-03 4.55640387e-02
1.31193395e-02 1.62470815e-03 2.46575843e-02 7.80638926e-02
2.19677483e-02 3.99901131e-02 2.68626148e-03 3.97731700e-02
4.79285683e-02 6.69363975e-02 1.02951554e-02 3.69826476e-02
6.29115152e-03 8.12289498e-02 3.11909685e-03 7.77144798e-04
8.15320771e-03 2.45720968e-02 5.12803365e-02 2.34378387e-02
2.33645986e-02 1.17796101e-02 2.80344720e-02 8.92995253e-02
1.24844778e-02 4.21582995e-02 1.89591553e-02 2.75357959e-02
2.44906236e-02 1.84031027e-02 2.09739330e-02 5.70421972e-03
2.55914617e-02 4.10427270e-02 6.55907387e-04 4.63734811e-03
8.42882114e-03 1.00851638e-04 5.19264104e-02 1.94917559e-05
6.96542994e-03 4.08924325e-03 4.08743287e-03 9.75853556e-03
4.04075841e-02 2.70473799e-02 1.72199579e-02 4.24501973e-02
7.08373167e-04 4.25201286e-02 5.69487891e-03 3.18217743e-03
1.85979474e-02 4.82250097e-02 8.96735081e-02 5.53952664e-02
5.51900727e-02 4.98842948e-03 1.30232456e-02 3.45220770e-02
4.12394241e-02 1.46400080e-02 2.27932015e-02 1.16054190e-03
1.53971260e-02 3.77533038e-02 8.53502096e-03 1.82404007e-02
1.86014003e-02 2.93792215e-02 3.66950317e-02 2.15456415e-02
2.21576737e-02 8.38730917e-03 2.98005862e-02 2.03932541e-03
4.60083846e-03 7.02160095e-03 5.76598941e-03 9.56807589e-03
3.49730046e-02 1.61899355e-02 1.47158029e-02 6.09404851e-04
5.14724135e-03 3.92916438e-02 2.88352503e-02 5.61520194e-02
4.33646268e-02 3.26506981e-03 1.51400374e-02 1.10235180e-02
7.63332882e-03 2.93229640e-02 6.85071429e-03 2.29148545e-03]
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>[3.79190435e-03 8.55070893e-03 3.86058560e-02 3.45643708e-02
1.28500583e-02 5.10712245e-02 1.17764878e-02 1.13687085e-02
1.74592114e-02 1.33939645e-03 2.27552531e-02 2.28284417e-02
5.61536670e-02 6.48783370e-03 1.69356940e-02 7.00289406e-02
2.45571233e-02 5.79106527e-02 7.31138734e-02 4.08448544e-02
6.91811160e-03 4.97200305e-02 2.45268835e-02 1.97467734e-02
5.60268567e-03 9.32784259e-04 7.08066746e-03 3.19910037e-03
3.26521761e-02 1.36227629e-02 2.26896710e-02 3.55936475e-04
2.49887949e-02 2.39417707e-05 2.39614347e-03 4.07789772e-02
2.71075825e-02 6.82771329e-04 9.78018374e-03 8.87532289e-03
2.42190899e-02 2.79827506e-02 1.34852463e-02 2.10441496e-02
2.51850390e-02 4.86387759e-02 7.96257580e-03 2.40828861e-02
3.60164827e-02 1.21503438e-01 4.62451626e-02 2.73628359e-02
5.69981939e-03 6.30984244e-02 2.51054961e-03 3.86597540e-02
3.69313663e-02 9.77836133e-03 5.43007002e-02 8.49862065e-03
9.34037032e-03 2.08910476e-02 2.52606351e-02 5.07087395e-03
4.11276576e-02 3.72904541e-02 2.13618516e-02 1.98880065e-02
3.82975422e-02 1.18603611e-02 1.05236797e-02 4.00183687e-02
6.56447742e-03 2.50173752e-02 3.42790075e-02 1.52902847e-02
4.92169784e-02 3.50733669e-02 8.97665553e-03 4.56542321e-02
3.57807896e-02 4.65359027e-03 1.02430520e-02 1.09480900e-03
2.99948754e-02 1.60056803e-02 9.14266332e-02 2.21171751e-02
2.21266166e-02 2.39548035e-02 1.67236038e-02 2.92337385e-02
5.68040392e-02 3.33819480e-02 1.59981487e-02 3.13006658e-02
3.20098424e-02 6.45146007e-03 3.82092612e-03 2.25724702e-02]
</pre></div>
</div>
</div>
@@ -1736,15 +1736,15 @@ but now splitting the data into a training set and a test set.</p>
</div>
</div>
<div class="cell_output docutils container">
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>[ 1.90813514 0.65746064 4.09759873 -0.08945041 0.46023985]
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>[ 1.95079224 0.81447915 1.26265627 5.0771079 -2.04184782]
Training R2
0.9965048209369255
0.9966080206050006
Training MSE
0.008089688732934681
0.008334493024006613
Test R2
0.9963525271588923
0.9954205504035075
Test MSE
0.0072559952738542694
0.012501013881387798
</pre></div>
</div>
</div>
@@ -3974,7 +3974,7 @@ the columns of <span class="math notranslate nohighlight">\(\boldsymbol{V}\)</sp
<span class="math notranslate nohighlight">\(\boldsymbol{v}_i\)</span> are hierarchically ordered by how much correlation they
encode from the columns of <span class="math notranslate nohighlight">\(\boldsymbol{X}\)</span>.</p>
<p>Note that these are also the eigenvectors and eigenvalues of the
Hessian matrix.</p>
Hessian matrix. Note also that the Hessian matrix we are discussing here is from a cost function defined by the mean squared error only.</p>
<p>If we now recall the definition of the covariance matrix (not using
Bessels correction) we have</p>
<div class="math notranslate nohighlight">
File diff suppressed because it is too large Load Diff
@@ -2392,7 +2392,7 @@ print(covariance_matrix)
# encode from the columns of $\boldsymbol{X}$.
#
# Note that these are also the eigenvectors and eigenvalues of the
# Hessian matrix.
# Hessian matrix. Note also that the Hessian matrix we are discussing here is from a cost function defined by the mean squared error only.
#
# If we now recall the definition of the covariance matrix (not using
# Bessel's correction) we have
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -388,7 +388,7 @@ encode from the columns of \( \boldsymbol{X} \).
</p>
<p>Note that these are also the eigenvectors and eigenvalues of the
Hessian matrix.
Hessian matrix. Note also that the Hessian matrix we are discussing here is from a cost function defined by the mean squared error only.
</p>
<p>If we now recall the definition of the covariance matrix (not using
+1 -1
View File
@@ -3489,7 +3489,7 @@ encode from the columns of \( \boldsymbol{X} \).
</p>
<p>Note that these are also the eigenvectors and eigenvalues of the
Hessian matrix.
Hessian matrix. Note also that the Hessian matrix we are discussing here is from a cost function defined by the mean squared error only.
</p>
<p>If we now recall the definition of the covariance matrix (not using
+1 -1
View File
@@ -3306,7 +3306,7 @@ encode from the columns of \( \boldsymbol{X} \).
</p>
<p>Note that these are also the eigenvectors and eigenvalues of the
Hessian matrix.
Hessian matrix. Note also that the Hessian matrix we are discussing here is from a cost function defined by the mean squared error only.
</p>
<p>If we now recall the definition of the covariance matrix (not using
+1 -1
View File
@@ -3383,7 +3383,7 @@ encode from the columns of \( \boldsymbol{X} \).
</p>
<p>Note that these are also the eigenvectors and eigenvalues of the
Hessian matrix.
Hessian matrix. Note also that the Hessian matrix we are discussing here is from a cost function defined by the mean squared error only.
</p>
<p>If we now recall the definition of the covariance matrix (not using
Binary file not shown.
File diff suppressed because it is too large Load Diff
+13
View File
@@ -49,6 +49,19 @@ system doconce split_html $html.html --method=split --pagination --nav_button=bo
# IPython notebook
system doconce format ipynb $name $opt
# Ordinary plain LaTeX document
rm -f *.aux # important after beamer
system doconce format pdflatex $name --minted_latex_style=trac --latex_admon=paragraph $opt
system doconce ptex2tex $name envir=minted
# Add special packages
doconce subst "% Add user's preamble" "\g<1>\n\\usepackage{simplewick}" $name.tex
doconce replace 'section{' 'section*{' $name.tex
pdflatex -shell-escape $name
pdflatex -shell-escape $name
mv -f $name.pdf ${name}-minted.pdf
cp $name.tex ${name}-plain-minted.tex
# Publish
dest=../../pub
+1 -1
View File
@@ -2561,7 +2561,7 @@ encode from the columns of $\bm{X}$.
Note that these are also the eigenvectors and eigenvalues of the
Hessian matrix.
Hessian matrix. Note also that the Hessian matrix we are discussing here is from a cost function defined by the mean squared error only.
If we now recall the definition of the covariance matrix (not using
Bessel's correction) we have