From 9ac005c0047249ebb5a87fd36870aa6475939a14 Mon Sep 17 00:00:00 2001 From: Morten Hjorth-Jensen Date: Mon, 28 Aug 2023 08:38:54 +0200 Subject: [PATCH] added exercices --- .../_build/.doctrees/environment.pickle | Bin 208281 -> 245892 bytes .../_build/.doctrees/exercisesweek35.doctree | Bin 0 -> 35295 bytes .../_build/.doctrees/intro.doctree | Bin 52578 -> 52621 bytes .../_build/.doctrees/week35.doctree | Bin 0 -> 432838 bytes .../html/_sources/exercisesweek35.ipynb | 398 ++ .../_build/html/_sources/week35.ipynb | 6002 ++++++++++++++++ .../_build/html/exercisesweek35.html | 588 ++ doc/LectureNotes/_build/html/genindex.html | 10 + doc/LectureNotes/_build/html/intro.html | 10 + doc/LectureNotes/_build/html/objects.inv | Bin 873 -> 907 bytes doc/LectureNotes/_build/html/search.html | 10 + doc/LectureNotes/_build/html/searchindex.js | 2 +- doc/LectureNotes/_build/html/week35.html | 3588 ++++++++++ .../jupyter_execute/exercisesweek35.ipynb | 411 ++ .../_build/jupyter_execute/exercisesweek35.py | 147 + .../_build/jupyter_execute/week35.ipynb | 6027 +++++++++++++++++ .../_build/jupyter_execute/week35.py | 2619 +++++++ doc/LectureNotes/_toc.yml | 2 + doc/src/week35/exercisesweek35.ipynb | 352 + 19 files changed, 20165 insertions(+), 1 deletion(-) create mode 100644 doc/LectureNotes/_build/.doctrees/exercisesweek35.doctree create mode 100644 doc/LectureNotes/_build/.doctrees/week35.doctree create mode 100644 doc/LectureNotes/_build/html/_sources/exercisesweek35.ipynb create mode 100644 doc/LectureNotes/_build/html/_sources/week35.ipynb create mode 100644 doc/LectureNotes/_build/html/exercisesweek35.html create mode 100644 doc/LectureNotes/_build/html/week35.html create mode 100644 doc/LectureNotes/_build/jupyter_execute/exercisesweek35.ipynb create mode 100644 doc/LectureNotes/_build/jupyter_execute/exercisesweek35.py create mode 100644 doc/LectureNotes/_build/jupyter_execute/week35.ipynb create mode 100644 doc/LectureNotes/_build/jupyter_execute/week35.py create mode 100644 doc/src/week35/exercisesweek35.ipynb diff --git a/doc/LectureNotes/_build/.doctrees/environment.pickle b/doc/LectureNotes/_build/.doctrees/environment.pickle index f0f45fe81e440d65a4967d3b4b7855e4106d844e..a4e09dc13a102d39b744ff8c9fe1a1c586981e34 100644 GIT binary patch literal 245892 zcmd?S3z!^7buVtqvfhu?`{7qxV_Pd*vnxxsvE}FLX?gWRE8Bo&FTFFpJ2RS{8P7wj zwK3ss8wM~iKnQt30wE-X{7J}#gb)%E5(0q>At7)>av>oh$<6(TB$trK7w+%W>F%oT z>e=lo&FG)+Z@v$YwyXN|srsEdb?VfqQ?I!E?Mp7X^b-1Cdu^juC|1r7d6jd;dbKj` zRhpglz`j=|ah? zG`!02Y0u4p>eTQt@#`J++$X=Dmh!-jcFgnQFOH9@@C7HakWA(HL(u zXUiV3Ci<$=URG#Mm&cn0ZyHb6@YC^$YV~aJY^|&?Uad8Y)e4he-9S&|3gZ)QeZ1+N zM^~>K6HlCGq1bSU#L&=Cr@gA|wklMw)ocduuC1WQ#7ByirdOYIbNKk;T-j|jiaE4& zqFBj$^+Ic6yj3rE+UpC=X05SzczAl2ONOd-bjYewt2T?*!+Mu=+Lxmx6JF=p_R?In z?DG4CZLRi-n%gXlH>=}7r_m{FYp<$%wQ8f-tk!4wBM$~2$yKLowZbeoX$(yjo1i{a ztfq#adTW^2KR-nOM4u`jny9x-cI}Olhqlo?&Y0{S?4a-Db&5mySD}W`n@1J9R0HGo(H&FoPB`cu3`6{PC#z5 zif*qH{eePt+8eJyIL3<=bW5)DOnXDC;f<@z3c%2n>!|?4qscEYka)g^o);U9me=sn z?L6CRZxr&dXdY z(5>Vhf7m*~xJBo?t!AN$UR{5zT5oz4=l&9Y3)u(6fbWpx)Mo3&sRBfL;qG0#Z^k3h zrgC+v+G#JLpP^a>0yyBE&y`zw>c}QK7JNMlwX*)k8;6Ru*~-LtuHfa))~b+kD1)U# z2gb(7AaCGz>FGjidZICup8z|oH#%PXN`MY3E{0<@Hy+T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> zORg=;KK+oCYwoJ9r7=pcx;zm7S|!Dz z(!wRyWjinUl@zP(q3>pIe5&v56l=8dzDe|T$nOMWv@HZ&G)@2BfYk4?2|x`RuwU90ZAUTX8|bsH}KZM^ulyn5D8M=-7-0gRcw4doTYG2{i9k;!*<()RFod;7b zmW_o`yqMw=gf%8zE*QMuEYajdh&(`gC z=(+xtk3I6jxf_;v*E2S;DAi5nkO)yVozy*=6zqrC&n()!)|^YBzF8|CU;p{UkIi|c z>3sS*20x?b0{mK+PONl1r-X$nTl18<89I2VbA~EbGx3n?-_bmFguq#Y!^i=;W3+NM zE*h{sd$Wnk;Elitv1A#VbPV`XiKY@k`9*Qt^-wfFSbmpKrfe*|^GmYw? zXa$IBY>8^)qTfv%FTpLMXth;0$9XrE-HZOQT!A_ZtYe%{sM(Z2bHMR@WpvPV u;=gLS1vFnaiVc1;1}s>_Mgwuf`MitTD_HM~<^XEtXiwxT$$uyhEdL+U^K<6_ diff --git a/doc/LectureNotes/_build/.doctrees/exercisesweek35.doctree b/doc/LectureNotes/_build/.doctrees/exercisesweek35.doctree new file mode 100644 index 0000000000000000000000000000000000000000..36073236c4de52d8c98b2411430ed1295aa16d8a GIT binary patch literal 35295 zcmeHQd#oH+dAEIiuYK3{jcvebnuHADhTOaH?tM6c)JYng#8K?TH)-sI3vsfY-JQKN zduL~sdHC+dECSR5X-BOfONvxfwUkO!sG_2+kopghN`3uB5&Y4I`hY^EQXv(!r4Q8h z_nn#ZnAzFg`&b9_K*V?F%z1pT^PTVe&Uendck-iOd2tW>Uvz`tHZ7-9*6Vf0ts8zX zI#_pWVasrW-b=mt_w~BHxoFzcH+(nrYDO>GgBmr{vg@AV^q$Ad8LA&xwqH&mThQy7`QDxuxh$(Z)$6XV|aRC)U}4^wzNmw+LKPr(Bk2= zIWq{_{^^B zBJNCBbswCF4%BSj2g3Aw($QP-uY>ilEg!0SZQU~(tj<(Su3ogC2-b_HJ1zUP-`0uC z2ius(YtW`PVF7C;Em9ZZPoZtL`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vQW1g&!mXBMha9at!^A*rNEhsPDv3NJgGUGLBnPI3z4)Z2H z4CyeEymiAXTSm}`2XkxjwIUF_K(Asl)NwB8@q^K=5Uo~4%rb#Ug>5?G^NuGNT-b!9 zuY9`>WRIv-he#jt^bPTdDR|W1bOImhw>at2xm-z5N{;)(wv#Ko;yP6JHmn&3F; z20yH(>m4@mk;-}n7WEoHcoEXUp8a4GW1EH%pzL)u+tt@AMoYKs3i7UDwUe&+P;`vC zB;|)3$rp`!Bo#~L9*qf zZ#;D|X?}r>(>bgS)##W63?FgBk!Ziy{32e9OsKtgb0ZhO(xZQQ(C9gx4j4a-j;E;L z;QMt0DAxQuhRcQbF9;4|O@lXQH@R3KbGH{Apu+g~T=Qp9wfP+VbISz&xrzRHA5u4( z@1cL5r56`jZ`0I@uE$`|uy!k~%?hi(!s@Ps=1t%(>(IQP^=7^lcSQ#rSXWIlWy0u) zI_(%-M`{)(FG(5zk4s2N@_Ml}sU>ke$QULceQj3EWLEXHnL<%}I@RMeAC)yap6Va# zofpso`?_pj$(ud6O{z}IVq9$ozA`i)IOemN2GEWRO`R$}B#PP0Db#84Nc1daRYgY| Nt%@oLM31mq{(nZw_Tm5l literal 0 HcmV?d00001 diff --git a/doc/LectureNotes/_build/.doctrees/intro.doctree b/doc/LectureNotes/_build/.doctrees/intro.doctree index 73315c098f8b2021ef7dd6a352ee11491a3f18fc..14c241e50938a44a258d9cb02480f98bc7c8c194 100644 GIT binary patch delta 214 zcmaDfi@A3;GfM;O)TWIr>4&WSdiYZ-Qj3x^i&KlsQ&Y2zO{cU?@#|rOvs1Gsb1^W) zPSMD+%F;;En zJobi}WgAfWWI4yYTvnF#fFvL#L$g<^TV92tc9B@!%@~%TVj82o~4@gaB zJnRN!H6DHBIfd)=aJSEC_aI*SoEw%uV`QDSmPiHU&Og?bhj?sJb|I>Yp0FN{{Q~&?~ diff --git a/doc/LectureNotes/_build/.doctrees/week35.doctree b/doc/LectureNotes/_build/.doctrees/week35.doctree new file mode 100644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@oswj^0|2YB0ZMQ$77KmS8l=M3VQtURy_WY9)*kW_cyH5EzdiG3>0K2DE;aXc=h$20VJH$6rs@VJ&9rAa*I=&^Ap9vkR!;s!jH>2d8%cns2G`Bpqy z^!VZ1@c0lta<}7gKRqVzz+(qJuDA=2%jogc-FQ^#@%U~$4$H~O zJasP~ReBuUhsVS8_?!Fi_}}#SM-Slf59#sl2k|&Tk8jcAoAh`#hsO`l<5%8=#~0}F zmk;6bKj|@c0FUeF@$V1f@ghAA;QpfWL-aU^Ahq(t^q6=Yk1=`-;UrSNnjV)N#$y1F zRrrF;?UlBXW!lImQIM2Lj|619H6jIbQi3uX>JGJjbh@Kfu+%&vBA!(Ys<8pN}hUHuyU#q4Sj2&UN8$BBC}yP6roU(Bxlb{Ky# zyZRI2Ud*ln;#thDK1qKuySjvU7PG7O(qGK3Mu~edyQ&cPVs>@bPW;8}>fOY>m|cw! z_hNQ+;#T~{?CSr#4SzAadYHJ^Wq09m192~AS69+cW>?L-@fWkJCwJp7W>;S(?#1kC zZ7=>}cGU#(Dt2{fAO2!?^6=OGsLr)U45JWVs`aD;$F6=O1aU8BS6?LV#q5eQtSELxVQ7k7k&hI!t1>AUTEV$eZskq=T!dY*tWL7BdPAoS zT~3K(@{KA7Aq~g|kPWw11)|+%Ry*S!d_~o?VES!PD zAE)Cyk+0+E0CA_mqAG^A)f{!4*Jqp8EP7^U>GTyIR7eXDTrjsdEu|=eM{8#6{|EG> BPAmWb literal 0 HcmV?d00001 diff --git a/doc/LectureNotes/_build/html/_sources/exercisesweek35.ipynb b/doc/LectureNotes/_build/html/_sources/exercisesweek35.ipynb new file mode 100644 index 000000000..3612d41ab --- /dev/null +++ b/doc/LectureNotes/_build/html/_sources/exercisesweek35.ipynb @@ -0,0 +1,398 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "053b96d5", + "metadata": { + "editable": true + }, + "source": [ + "\n", + "" + ] + }, + { + "cell_type": "markdown", + "id": "a09cb811", + "metadata": { + "editable": true + }, + "source": [ + "# Exercises week 35\n", + "**August 28-September 1, 2023**\n", + "\n", + "Date: **Deadline is Friday September 1 at midnight**" + ] + }, + { + "cell_type": "markdown", + "id": "8e83839e", + "metadata": { + "editable": true + }, + "source": [ + "## Exercise 1: Analytical exercises\n", + "\n", + "In this exercise we derive the expressions for various derivatives of\n", + "products of vectors and matrices. Such derivatives are central to the\n", + "optimization of various cost functions. Although we will often use\n", + "automatic differentiation in actual calculations, to be able to have\n", + "analytical expressions is extremely helpful in case we have simpler\n", + "derivatives as well as when we analyze various properties (like second\n", + "derivatives) of the chosen cost functions. Vectors are always written\n", + "as boldfaced lower case letters and matrices as upper case boldfaced\n", + "letters. You will find useful the notes from week 35 on derivatives of vectors and matrices.\n", + "\n", + "Show that" + ] + }, + { + "cell_type": "markdown", + "id": "fe2b1c49", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\frac{\\partial (\\boldsymbol{b}^T\\boldsymbol{a})}{\\partial \\boldsymbol{a}} = \\boldsymbol{b},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "259f2ad1", + "metadata": { + "editable": true + }, + "source": [ + "and" + ] + }, + { + "cell_type": "markdown", + "id": "5ac63202", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\frac{\\partial (\\boldsymbol{a}^T\\boldsymbol{A}\\boldsymbol{a})}{\\partial \\boldsymbol{a}} = \\boldsymbol{a}^T(\\boldsymbol{A}+\\boldsymbol{A}^T),\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "a52c6353", + "metadata": { + "editable": true + }, + "source": [ + "and" + ] + }, + { + "cell_type": "markdown", + "id": "910282dd", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\frac{\\partial \\left(\\boldsymbol{x}-\\boldsymbol{A}\\boldsymbol{s}\\right)^T\\left(\\boldsymbol{x}-\\boldsymbol{A}\\boldsymbol{s}\\right)}{\\partial \\boldsymbol{s}} = -2\\left(\\boldsymbol{x}-\\boldsymbol{A}\\boldsymbol{s}\\right)^T\\boldsymbol{A},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "f3d0f2f5", + "metadata": { + "editable": true + }, + "source": [ + "and finally find the second derivative of this function with respect to the vector $\\boldsymbol{s}$. If we replace the vector $\\boldsymbol{s}$ with the unknown parameters $\\boldsymbol{\\beta}$ used to define the ordinary least squares method, we end up with the equations that determine these parameters. The matrix $\\boldsymbol{A}$ is then the design matrix $\\boldsymbol{X}$ and $\\boldsymbol{x}$ here has to be replaced with the outputs $\\boldsymbol{y}$.\n", + "\n", + "The second derivative of the mean squared error is then proportional to the so-called Hessian matrix $\\boldsymbol{H}=\\boldsymbol{X}^T\\boldsymbol{X}$.\n", + "\n", + "**Hint**: In these exercises it is always useful to write out with summation indices the various quantities.\n", + "As an example, consider the function" + ] + }, + { + "cell_type": "markdown", + "id": "5fe4bc49", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "f(\\boldsymbol{x}) =\\boldsymbol{A}\\boldsymbol{x},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "55fee214", + "metadata": { + "editable": true + }, + "source": [ + "which reads for a specific component $f_i$ (we define the matrix $\\boldsymbol{A}$ to have dimension $n\\times n$ and the vector $\\boldsymbol{x}$ to have length $n$)" + ] + }, + { + "cell_type": "markdown", + "id": "92b0b614", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "f_i =\\sum_{j=0}^{n-1}a_{ij}x_j,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "6b68973e", + "metadata": { + "editable": true + }, + "source": [ + "which leads to" + ] + }, + { + "cell_type": "markdown", + "id": "89e679e8", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\frac{\\partial f_i}{\\partial x_j}= a_{ij},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "a35b6ab2", + "metadata": { + "editable": true + }, + "source": [ + "and written out in terms of the vector $\\boldsymbol{x}$ we have" + ] + }, + { + "cell_type": "markdown", + "id": "747d2724", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\frac{\\partial f(\\boldsymbol{x})}{\\partial \\boldsymbol{x}}= \\boldsymbol{A}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "911dc89a", + "metadata": { + "editable": true + }, + "source": [ + "## Exercise 2: making your own data and exploring scikit-learn\n", + "\n", + "We will generate our own dataset for a function $y(x)$ where $x \\in\n", + "[0,1]$ and defined by random numbers computed with the uniform\n", + "distribution. The function $y$ is a quadratic polynomial in $x$ with\n", + "added stochastic noise according to the normal distribution $\\cal\n", + "{N}(0,1)$. The following simple Python instructions define our $x$\n", + "and $y$ values (with 100 data points)." + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "id": "09971906", + "metadata": { + "collapsed": false, + "editable": true + }, + "outputs": [], + "source": [ + "import numpy as np\n", + "x = np.random.rand(100,1)\n", + "y = 2.0+5*x*x+0.1*np.random.randn(100,1)" + ] + }, + { + "cell_type": "markdown", + "id": "de82ebe8", + "metadata": { + "editable": true + }, + "source": [ + "1. Write your own code (following the examples under the [regression notes](https://compphysics.github.io/MachineLearning/doc/LectureNotes/_build/html/chapter1.html)) for computing the parametrization of the data set fitting a second-order polynomial. \n", + "\n", + "2. Use thereafter **scikit-learn** (see again the examples in the slides for week 35) and compare with your own code. Note here that **scikit-learn** does not include, by default, the intercept. See the discussions on scaling your data in the slides for this week. This type of problems appear in particular if we fit a polynomial with an intercept. \n", + "\n", + "3. Using scikit-learn, compute also the mean squared error, a risk metric corresponding to the expected value of the squared (quadratic) error defined as" + ] + }, + { + "cell_type": "markdown", + "id": "21b2c91f", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "MSE(\\boldsymbol{y},\\boldsymbol{\\tilde{y}}) = \\frac{1}{n}\n", + "\\sum_{i=0}^{n-1}(y_i-\\tilde{y}_i)^2,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "3b542aa1", + "metadata": { + "editable": true + }, + "source": [ + "and the $R^2$ score function.\n", + "If $\\tilde{\\boldsymbol{y}}_i$ is the predicted value of the $i-th$ sample and $y_i$ is the corresponding true value, then the score $R^2$ is defined as" + ] + }, + { + "cell_type": "markdown", + "id": "5393a93f", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "R^2(\\boldsymbol{y}, \\tilde{\\boldsymbol{y}}) = 1 - \\frac{\\sum_{i=0}^{n - 1} (y_i - \\tilde{y}_i)^2}{\\sum_{i=0}^{n - 1} (y_i - \\bar{y})^2},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "df1b8e23", + "metadata": { + "editable": true + }, + "source": [ + "where we have defined the mean value of $\\boldsymbol{y}$ as" + ] + }, + { + "cell_type": "markdown", + "id": "30ad9bb6", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\bar{y} = \\frac{1}{n} \\sum_{i=0}^{n - 1} y_i.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "0e2c0d15", + "metadata": { + "editable": true + }, + "source": [ + "You can use the functionality included in scikit-learn. If you feel for it, you can use your own program and define functions which compute the above two functions. \n", + "Discuss the meaning of these results. Try also to vary the coefficient in front of the added stochastic noise term and discuss the quality of the fits." + ] + }, + { + "cell_type": "markdown", + "id": "80eab896", + "metadata": { + "editable": true + }, + "source": [ + "## Exercise 3: Split data in test and training data\n", + "\n", + "In this exercise we want you to to compute the MSE for the training\n", + "data and the test data as function of the complexity of a polynomial,\n", + "that is the degree of a given polynomial. \n", + "\n", + "The aim is to reproduce Figure 2.11 of [Hastie et al](https://github.com/CompPhysics/MLErasmus/blob/master/doc/Textbooks/elementsstat.pdf).\n", + "Feel free to read the discussions leading to figure 2.11 of Hastie et al. \n", + "\n", + "Our data is defined by $x\\in [-3,3]$ with a total of for example $n=100$ data points. You should try to vary the number of data points $n$ in your analysis." + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "887378fa", + "metadata": { + "collapsed": false, + "editable": true + }, + "outputs": [], + "source": [ + "np.random.seed()\n", + "n = 100\n", + "# Make data set.\n", + "x = np.linspace(-3, 3, n).reshape(-1, 1)\n", + "y = np.exp(-x**2) + 1.5 * np.exp(-(x-2)**2)+ np.random.normal(0, 0.1, x.shape)" + ] + }, + { + "cell_type": "markdown", + "id": "a059a330", + "metadata": { + "editable": true + }, + "source": [ + "where $y$ is the function we want to fit with a given polynomial." + ] + }, + { + "cell_type": "markdown", + "id": "e2614fe9", + "metadata": { + "editable": true + }, + "source": [ + "**a)**\n", + "Write a first code which sets up a design matrix $X$ defined by a fifth-order polynomial and split your data set in training and test data." + ] + }, + { + "cell_type": "markdown", + "id": "8522c8f4", + "metadata": { + "editable": true + }, + "source": [ + "**b)**\n", + "Write thereafter (using either **scikit-learn** or your matrix inversion code using for example **numpy**)\n", + "and perform an ordinary least squares fitting and compute the mean squared error for the training data and the test data. These calculations should apply to a model given by a fifth-order polynomial. If you compare your own code with _scikit_learn_, not that the latter does not include by default the intercept. See the discussions on scaling your data in the slides for this week." + ] + }, + { + "cell_type": "markdown", + "id": "c4e99901", + "metadata": { + "editable": true + }, + "source": [ + "**c)**\n", + "Add now a model which allows you to make polynomials up to degree $15$. Perform a standard OLS fitting of the training data and compute the MSE for the training and test data and plot both test and training data MSE as functions of the polynomial degree. Compare what you see with Figure 2.11 of Hastie et al. Comment your results. For which polynomial degree do you find an optimal MSE (smallest value)?" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/doc/LectureNotes/_build/html/_sources/week35.ipynb b/doc/LectureNotes/_build/html/_sources/week35.ipynb new file mode 100644 index 000000000..a6f7e09a8 --- /dev/null +++ b/doc/LectureNotes/_build/html/_sources/week35.ipynb @@ -0,0 +1,6002 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "c02138a8", + "metadata": { + "editable": true + }, + "source": [ + "\n", + "" + ] + }, + { + "cell_type": "markdown", + "id": "919baf6d", + "metadata": { + "editable": true + }, + "source": [ + "# Week 35: From Ordinary Linear Regression to Ridge and Lasso Regression\n", + "**Morten Hjorth-Jensen**, Department of Physics, University of Oslo and Department of Physics and Astronomy and National Superconducting Cyclotron Laboratory, Michigan State University\n", + "\n", + "Date: **August 28-September 1**" + ] + }, + { + "cell_type": "markdown", + "id": "4d5e7179", + "metadata": { + "editable": true + }, + "source": [ + "## Plans for week 35\n", + "\n", + "The main topics are:\n", + "\n", + "1. Brief repetition from last week\n", + "\n", + "2. Derivation of the equations for ordinary least squares\n", + "\n", + "3. Discussion on how to prepare data and examples of applications of linear regression\n", + "\n", + "4. Material for the lecture on Thursday: Mathematical interpretations of linear regression\n", + "\n", + "5. Thursday: Ridge and Lasso regression and Singular Value Decomposition" + ] + }, + { + "cell_type": "markdown", + "id": "3b3f68ae", + "metadata": { + "editable": true + }, + "source": [ + "### Reading recommendations:\n", + "\n", + "1. See lecture notes for week 35 at \n", + "\n", + "2. Goodfellow, Bengio and Courville, Deep Learning, chapter 2 on linear algebra and sections 3.1-3.10 on elements of statistics\n", + "\n", + "3. Hastie, Tibshirani and Friedman, The elements of statistical learning, sections 3.1-3.4" + ] + }, + { + "cell_type": "markdown", + "id": "3dfade93", + "metadata": { + "editable": true + }, + "source": [ + "## Why Linear Regression (aka Ordinary Least Squares and family), repeat from last week\n", + "\n", + "We need first a reminder from last week about linear regression. \n", + "\n", + "Fitting a continuous function with linear parameterization in terms of the parameters $\\boldsymbol{\\beta}$.\n", + "* Method of choice for fitting a continuous function!\n", + "\n", + "* Gives an excellent introduction to central Machine Learning features with **understandable pedagogical** links to other methods like **Neural Networks**, **Support Vector Machines** etc\n", + "\n", + "* Analytical expression for the fitting parameters $\\boldsymbol{\\beta}$\n", + "\n", + "* Analytical expressions for statistical propertiers like mean values, variances, confidence intervals and more\n", + "\n", + "* Analytical relation with probabilistic interpretations \n", + "\n", + "* Easy to introduce basic concepts like bias-variance tradeoff, cross-validation, resampling and regularization techniques and many other ML topics\n", + "\n", + "* Easy to code! And links well with classification problems and logistic regression and neural networks\n", + "\n", + "* Allows for **easy** hands-on understanding of gradient descent methods\n", + "\n", + "* and many more features\n", + "\n", + "For more discussions of Ridge and Lasso regression, [Wessel van Wieringen's](https://arxiv.org/abs/1509.09169) article is highly recommended.\n", + "Similarly, [Mehta et al's article](https://arxiv.org/abs/1803.08823) is also recommended." + ] + }, + { + "cell_type": "markdown", + "id": "e7c3b1f5", + "metadata": { + "editable": true + }, + "source": [ + "## The equations for ordinary least squares\n", + "\n", + "Our data which we want to apply a machine learning method on, consist\n", + "of a set of inputs $\\boldsymbol{x}^T=[x_0,x_1,x_2,\\dots,x_{n-1}]$ and the\n", + "outputs we want to model $\\boldsymbol{y}^T=[y_0,y_1,y_2,\\dots,y_{n-1}]$.\n", + "We assume that the output data can be represented (for a regression case) by a continuous function $f$\n", + "through" + ] + }, + { + "cell_type": "markdown", + "id": "4b7ace0a", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "y_i=f(x_i)+\\epsilon_i,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "6fa41e5e", + "metadata": { + "editable": true + }, + "source": [ + "or in general" + ] + }, + { + "cell_type": "markdown", + "id": "86724624", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{y}=f(\\boldsymbol{x})+\\boldsymbol{\\epsilon},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "f4e16a64", + "metadata": { + "editable": true + }, + "source": [ + "where $\\boldsymbol{\\epsilon}$ represents some noise which is normally assumed to\n", + "be distributed via a normal probability distribution with zero mean\n", + "value and a variance $\\sigma^2$.\n", + "\n", + "In linear regression we approximate the unknown function with another\n", + "continuous function $\\tilde{\\boldsymbol{y}}(\\boldsymbol{x})$ which depends linearly on\n", + "some unknown parameters\n", + "$\\boldsymbol{\\beta}^T=[\\beta_0,\\beta_1,\\beta_2,\\dots,\\beta_{p-1}]$.\n", + "\n", + "Last week we introduced the so-called design matrix in order to define\n", + "the approximation $\\boldsymbol{\\tilde{y}}$ via the unknown quantity\n", + "$\\boldsymbol{\\beta}$ as" + ] + }, + { + "cell_type": "markdown", + "id": "00f70fc7", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{\\tilde{y}}= \\boldsymbol{X}\\boldsymbol{\\beta},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "859d4683", + "metadata": { + "editable": true + }, + "source": [ + "and in order to find the optimal parameters $\\beta_i$ we defined a function which\n", + "gives a measure of the spread between the values $y_i$ (which\n", + "represent the output values we want to reproduce) and the parametrized\n", + "values $\\tilde{y}_i$, namely the so-called cost/loss function." + ] + }, + { + "cell_type": "markdown", + "id": "ab473c08", + "metadata": { + "editable": true + }, + "source": [ + "## The cost/loss function\n", + "\n", + "We used the mean squared error to define the way we measure the quality of our model" + ] + }, + { + "cell_type": "markdown", + "id": "a3ccaf3a", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "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\\},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "238df8ba", + "metadata": { + "editable": true + }, + "source": [ + "or using the matrix $\\boldsymbol{X}$ and in a more compact matrix-vector notation as" + ] + }, + { + "cell_type": "markdown", + "id": "e114bb77", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "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\\}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "67833b96", + "metadata": { + "editable": true + }, + "source": [ + "This function represents one of many possible ways to define the so-called cost function.\n", + "\n", + "It is also common to define\n", + "the function $C$ as" + ] + }, + { + "cell_type": "markdown", + "id": "68d1debe", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "C(\\boldsymbol{\\beta})=\\frac{1}{2n}\\sum_{i=0}^{n-1}\\left(y_i-\\tilde{y}_i\\right)^2,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "bd4914a7", + "metadata": { + "editable": true + }, + "source": [ + "since when taking the first derivative with respect to the unknown parameters $\\beta$, the factor of $2$ cancels out." + ] + }, + { + "cell_type": "markdown", + "id": "9d6509bf", + "metadata": { + "editable": true + }, + "source": [ + "## Interpretations and optimizing our parameters\n", + "\n", + "The function" + ] + }, + { + "cell_type": "markdown", + "id": "fa97bb74", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "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\\},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "fdc65871", + "metadata": { + "editable": true + }, + "source": [ + "can be linked to the variance of the quantity $y_i$ if we interpret the latter as the mean value. \n", + "When linking (see the discussions next week) with the maximum likelihood approach below, we will indeed interpret $y_i$ as a mean value" + ] + }, + { + "cell_type": "markdown", + "id": "6fe43d59", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "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,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "7f0f5fc2", + "metadata": { + "editable": true + }, + "source": [ + "where $\\langle y_i \\rangle$ is the mean value. Keep in mind also that\n", + "till now we have treated $y_i$ as the exact value. Normally, the\n", + "response (dependent or outcome) variable $y_i$ is the outcome of a\n", + "numerical experiment or another type of experiment and could thus be treated itself as an\n", + "approximation to the true value. It is then always accompanied by an\n", + "error estimate, often limited to a statistical error estimate given by\n", + "the standard deviation discussed earlier. In the discussion here we\n", + "will treat $y_i$ as our exact value for the response variable.\n", + "\n", + "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" + ] + }, + { + "cell_type": "markdown", + "id": "8c7ce425", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "{\\displaystyle \\min_{\\boldsymbol{\\beta}\\in\n", + "{\\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\\}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "23cd06a6", + "metadata": { + "editable": true + }, + "source": [ + "In practical terms it means we will require" + ] + }, + { + "cell_type": "markdown", + "id": "d40244fa", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\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,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "003814bc", + "metadata": { + "editable": true + }, + "source": [ + "which results in" + ] + }, + { + "cell_type": "markdown", + "id": "765cdab4", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\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,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "c10530e6", + "metadata": { + "editable": true + }, + "source": [ + "or in a matrix-vector form as (multiplying away the factor $-2/n$, see derivation below)" + ] + }, + { + "cell_type": "markdown", + "id": "b1ce0925", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\frac{\\partial C(\\boldsymbol{\\beta})}{\\partial \\boldsymbol{\\beta}^T} = 0 = \\boldsymbol{X}^T\\left( \\boldsymbol{y}-\\boldsymbol{X}\\boldsymbol{\\beta}\\right).\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "18e850a5", + "metadata": { + "editable": true + }, + "source": [ + "## Interpretations and optimizing our parameters\n", + "We can rewrite, see the derivations below," + ] + }, + { + "cell_type": "markdown", + "id": "9fe90791", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\frac{\\partial C(\\boldsymbol{\\beta})}{\\partial \\boldsymbol{\\beta}^T} = 0 = \\boldsymbol{X}^T\\left( \\boldsymbol{y}-\\boldsymbol{X}\\boldsymbol{\\beta}\\right),\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "320e1aef", + "metadata": { + "editable": true + }, + "source": [ + "as" + ] + }, + { + "cell_type": "markdown", + "id": "b6ea67f8", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{X}^T\\boldsymbol{y} = \\boldsymbol{X}^T\\boldsymbol{X}\\boldsymbol{\\beta},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "f374c3b2", + "metadata": { + "editable": true + }, + "source": [ + "and if the matrix $\\boldsymbol{X}^T\\boldsymbol{X}$ is invertible we have the solution" + ] + }, + { + "cell_type": "markdown", + "id": "4a879ff3", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{\\beta} =\\left(\\boldsymbol{X}^T\\boldsymbol{X}\\right)^{-1}\\boldsymbol{X}^T\\boldsymbol{y}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "71ca39b0", + "metadata": { + "editable": true + }, + "source": [ + "We note also that since our design matrix is defined as $\\boldsymbol{X}\\in\n", + "{\\mathbb{R}}^{n\\times p}$, the product $\\boldsymbol{X}^T\\boldsymbol{X} \\in\n", + "{\\mathbb{R}}^{p\\times p}$. In the above case we have that $p \\ll n$,\n", + "in our case $p=5$ meaning that we end up with inverting a small\n", + "$5\\times 5$ matrix. This is a rather common situation, in many cases we end up with low-dimensional\n", + "matrices to invert. The methods discussed here and for many other\n", + "supervised learning algorithms like classification with logistic\n", + "regression or support vector machines, exhibit dimensionalities which\n", + "allow for the usage of direct linear algebra methods such as **LU** decomposition or **Singular Value Decomposition** (SVD) for finding the inverse of the matrix\n", + "$\\boldsymbol{X}^T\\boldsymbol{X}$.\n", + "\n", + "**Small question**: Do you think the example we have at hand here (the nuclear binding energies) can lead to problems in inverting the matrix $\\boldsymbol{X}^T\\boldsymbol{X}$? What kind of problems can we expect?" + ] + }, + { + "cell_type": "markdown", + "id": "0228f656", + "metadata": { + "editable": true + }, + "source": [ + "## Some useful matrix and vector expressions\n", + "\n", + "The following matrix and vector relation will be useful here and for\n", + "the rest of the course. Vectors are always written as boldfaced lower\n", + "case letters and matrices as upper case boldfaced letters. In the\n", + "following we will discuss how to calculate derivatives of various\n", + "matrices relevant for machine learning. We will often represent our\n", + "data in terms of matrices and vectors.\n", + "\n", + "Let us introduce first some conventions. We assume that $\\boldsymbol{y}$ is a\n", + "vector of length $m$, that is it has $m$ elements $y_0,y_1,\\dots,\n", + "y_{m-1}$. By convention we start labeling vectors with the zeroth\n", + "element, as are arrays in Python and C++/C, for example. Similarly, we\n", + "have a vector $\\boldsymbol{x}$ of length $n$, that is\n", + "$\\boldsymbol{x}^T=[x_0,x_1,\\dots, x_{n-1}]$.\n", + "\n", + "We assume also that $\\boldsymbol{y}$ is a function of $\\boldsymbol{x}$ through some\n", + "given function $f$" + ] + }, + { + "cell_type": "markdown", + "id": "1a6493a2", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{y}=f(\\boldsymbol{x}).\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "48e5ce45", + "metadata": { + "editable": true + }, + "source": [ + "## The Jacobian\n", + "\n", + "We define the partial derivatives of the various components of $\\boldsymbol{y}$ as functions of $x_i$ in terms of the so-called [Jacobian matrix](https://en.wikipedia.org/wiki/Jacobian_matrix_and_determinant)" + ] + }, + { + "cell_type": "markdown", + "id": "2025325b", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{J}=\\frac{\\partial \\boldsymbol{y}}{\\partial \\boldsymbol{x}}=\\begin{bmatrix} \\frac{\\partial y_0}{\\partial x_0} & \\frac{\\partial y_0}{\\partial x_1} & \\frac{\\partial y_0}{\\partial x_2} & \\dots & \\dots & \\frac{\\partial y_0}{\\partial x_{n-1}} \\\\ \\frac{\\partial y_0}{\\partial x_0} & \\frac{\\partial y_1}{\\partial x_1} & \\frac{\\partial y_1}{\\partial x_2} & \\dots & \\dots & \\frac{\\partial y_1}{\\partial x_{n-1}} \\\\\n", + "\\frac{\\partial y_2}{\\partial x_0} & \\frac{\\partial y_2}{\\partial x_1} & \\frac{\\partial y_2}{\\partial x_2} & \\dots & \\dots & \\frac{\\partial y_2}{\\partial x_{n-1}} \\\\\n", + "\\dots & \\dots & \\dots & \\dots & \\dots & \\dots \\\\\n", + "\\dots & \\dots & \\dots & \\dots & \\dots & \\dots \\\\\n", + "\\frac{\\partial y_{m-1}}{\\partial x_0} & \\frac{\\partial y_{m-1}}{\\partial x_1} & \\frac{\\partial y_{m-1}}{\\partial x_2} & \\dots & \\dots & \\frac{\\partial y_{m-1}}{\\partial x_{n-1}} \\end{bmatrix},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "c4c51c01", + "metadata": { + "editable": true + }, + "source": [ + "which is an $m\\times n$ matrix. If $\\boldsymbol{x}$ is a scalar, then the\n", + "Jacobian is only a single-column vector, or an $m\\times 1$ matrix. If\n", + "on the other hand $\\boldsymbol{y}$ is a scalar, the Jacobian becomes a\n", + "$1\\times n$ matrix.\n", + "\n", + "When this matrix is a square matrix $m=n$, its determinant is often referred to as the Jacobian\n", + "determinant. Both the matrix and (if $m=n$) the determinant are\n", + "often referred to simply as the Jacobian. The Jacobian matrix represents the differential of $\\boldsymbol{y}$ at every point where the\n", + "vector is differentiable." + ] + }, + { + "cell_type": "markdown", + "id": "5e0ba978", + "metadata": { + "editable": true + }, + "source": [ + "## Derivatives, example 1\n", + "\n", + "Let now $\\boldsymbol{y}=\\boldsymbol{A}\\boldsymbol{x}$, where $\\boldsymbol{A}$ is an $m\\times n$ matrix and the matrix does not depend on $\\boldsymbol{x}$. If we write out the vector $\\boldsymbol{y}$ compoment by component we have" + ] + }, + { + "cell_type": "markdown", + "id": "4fd652f8", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "y_i = \\sum_{j=0}^{n-1}a_{ij}x_j,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "694f5db3", + "metadata": { + "editable": true + }, + "source": [ + "with $\\forall i=0,1,2,\\dots,m-1$. The individual matrix elements of $\\boldsymbol{A}$ are given by the symbol $a_{ij}$.\n", + "It follows that the partial derivatives of $y_i$ with respect to $x_k$" + ] + }, + { + "cell_type": "markdown", + "id": "52a90b73", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\frac{\\partial y_i }{\\partial x_k}= a_{ik} \\forall i=0,1,2,\\dots,m-1.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "afab9d50", + "metadata": { + "editable": true + }, + "source": [ + "From this we have, using the definition of the Jacobian" + ] + }, + { + "cell_type": "markdown", + "id": "3dd5ebc2", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\frac{\\partial \\boldsymbol{y} }{\\partial \\boldsymbol{x}}= \\boldsymbol{A}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "d8571fd8", + "metadata": { + "editable": true + }, + "source": [ + "## Example 2\n", + "\n", + "We define a scalar (our cost/loss functions are in general also scalars,\n", + "just think of the mean squared error) as the result of some matrix vector\n", + "multiplications" + ] + }, + { + "cell_type": "markdown", + "id": "50f37b40", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\alpha = \\boldsymbol{y}^T\\boldsymbol{A}\\boldsymbol{x},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "b4e94db7", + "metadata": { + "editable": true + }, + "source": [ + "with $\\boldsymbol{y}$ a vector of length $m$, $\\boldsymbol{A}$ an $m\\times n$ matrix and $\\boldsymbol{x}$ a vector of length $n$. We assume also that $\\boldsymbol{A}$ does not depend on any of the two vectors.\n", + "In order to find the derivative of $\\alpha$ with respect to the two vectors, we define an intermediate vector $\\boldsymbol{z}$. We define first\n", + "$\\boldsymbol{z}^T=\\boldsymbol{y}^T\\boldsymbol{A}$, a vector of length $n$. We have then" + ] + }, + { + "cell_type": "markdown", + "id": "328ce3c0", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\alpha = \\boldsymbol{z}^T\\boldsymbol{x},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "3c549113", + "metadata": { + "editable": true + }, + "source": [ + "which means that (using our previous example) we have" + ] + }, + { + "cell_type": "markdown", + "id": "62a61819", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\frac{\\partial \\alpha}{\\partial \\boldsymbol{x}} = \\boldsymbol{z}^T=\\boldsymbol{y}^T\\boldsymbol{A}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "0d8917d2", + "metadata": { + "editable": true + }, + "source": [ + "Since $\\alpha$ is a scalar we have $\\alpha =\\alpha^T=\\boldsymbol{x}^T\\boldsymbol{A}^T\\boldsymbol{y}$. Defining now $\\boldsymbol{z}=\\boldsymbol{x}^T\\boldsymbol{A}^T$ we find that" + ] + }, + { + "cell_type": "markdown", + "id": "d27089b7", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\frac{\\partial \\alpha}{\\partial \\boldsymbol{y}} = \\boldsymbol{z}^T=\\boldsymbol{x}^T\\boldsymbol{A}^T.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "efbc5228", + "metadata": { + "editable": true + }, + "source": [ + "## Example 3\n", + "\n", + "We start with a new scalar but where now the vector $\\boldsymbol{y}$ is\n", + "replaced by a vector $\\boldsymbol{x}$ and the matrix $\\boldsymbol{A}$ is a square\n", + "matrix with dimension $n\\times n$." + ] + }, + { + "cell_type": "markdown", + "id": "1539dfd3", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\alpha = \\boldsymbol{x}^T\\boldsymbol{A}\\boldsymbol{x},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "56942822", + "metadata": { + "editable": true + }, + "source": [ + "with $\\boldsymbol{x}$ a vector of length $n$.\n", + "\n", + "We write out the specific sums involved in the calculation of $\\alpha$" + ] + }, + { + "cell_type": "markdown", + "id": "444a2229", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\alpha = \\sum_{i=0}^{n-1}\\sum_{j=0}^{n-1}x_i a_{ij}x_j,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "c19b8e9a", + "metadata": { + "editable": true + }, + "source": [ + "taking the derivative of $\\alpha$ with respect to a given component $x_k$ we get the two sums" + ] + }, + { + "cell_type": "markdown", + "id": "c3da7629", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\frac{\\partial \\alpha}{\\partial x_k} = \\sum_{i=0}^{n-1}a_{ik}x_i+\\sum_{j=0}^{n-1}a_{kj}x_j,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "bc0bb616", + "metadata": { + "editable": true + }, + "source": [ + "for $\\forall k =0,1,2,\\dots,n-1$. We identify these sums as" + ] + }, + { + "cell_type": "markdown", + "id": "81f469c7", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\frac{\\partial \\alpha}{\\partial \\boldsymbol{x}} = \\boldsymbol{x}^T\\left(\\boldsymbol{A}^T+\\boldsymbol{A}\\right).\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "e7dbc066", + "metadata": { + "editable": true + }, + "source": [ + "If the matrix $\\boldsymbol{A}$ is symmetric, that is $\\boldsymbol{A}=\\boldsymbol{A}^T$, we have" + ] + }, + { + "cell_type": "markdown", + "id": "e15843da", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\frac{\\partial \\alpha}{\\partial \\boldsymbol{x}} = 2\\boldsymbol{x}^T\\boldsymbol{A}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "31a95917", + "metadata": { + "editable": true + }, + "source": [ + "## Example 4\n", + "\n", + "We let the scalar $\\alpha$ be defined by" + ] + }, + { + "cell_type": "markdown", + "id": "a3c00979", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\alpha = \\boldsymbol{y}^T\\boldsymbol{x},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "03321be3", + "metadata": { + "editable": true + }, + "source": [ + "where both $\\boldsymbol{y}$ and $\\boldsymbol{x}$ have the same length $n$, or if we\n", + "wish to think of them as column vectors, they have dimensions $n\\times\n", + "1$. We assume that both $\\boldsymbol{y}$ and $\\boldsymbol{x}$ depend on a vector\n", + "$\\boldsymbol{z}$ of the same length. To calculate the derivative of $\\alpha$\n", + "with respect to a given component $z_k$ we need first to write out the\n", + "inner product that defines $\\alpha$ as" + ] + }, + { + "cell_type": "markdown", + "id": "59854eb8", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\alpha = \\sum_{i=0}^{n-1}y_ix_i,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "1f475d05", + "metadata": { + "editable": true + }, + "source": [ + "and the partial derivative" + ] + }, + { + "cell_type": "markdown", + "id": "256476a9", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\frac{\\partial \\alpha}{\\partial z_k} = \\sum_{i=0}^{n-1}\\left(x_i\\frac{\\partial y_i}{\\partial z_k}+y_i\\frac{\\partial x_i}{\\partial z_k}\\right),\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "f23c2136", + "metadata": { + "editable": true + }, + "source": [ + "for $\\forall k =0,1,2,\\dots,n-1$. We can rewrite the partial derivative in a more compact form as" + ] + }, + { + "cell_type": "markdown", + "id": "afeafdcb", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\frac{\\partial \\alpha}{\\partial \\boldsymbol{z}} = \\boldsymbol{x}^T\\frac{\\partial \\boldsymbol{y}}{\\partial \\boldsymbol{z}}+\\boldsymbol{y}^T\\frac{\\partial \\boldsymbol{x}}{\\partial \\boldsymbol{z}},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "4ed3eead", + "metadata": { + "editable": true + }, + "source": [ + "and if $\\boldsymbol{y}=\\boldsymbol{x}$ we have" + ] + }, + { + "cell_type": "markdown", + "id": "9674c619", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\frac{\\partial \\alpha}{\\partial \\boldsymbol{z}} = 2\\boldsymbol{x}^T\\frac{\\partial \\boldsymbol{x}}{\\partial \\boldsymbol{z}}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "82ae15ae", + "metadata": { + "editable": true + }, + "source": [ + "## The mean squared error and its derivative\n", + "\n", + "We defined earlier a possible cost function using the mean squared error" + ] + }, + { + "cell_type": "markdown", + "id": "688a7168", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "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\\},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "01f03acf", + "metadata": { + "editable": true + }, + "source": [ + "or using the design/feature matrix $\\boldsymbol{X}$ we have the more compact matrix-vector" + ] + }, + { + "cell_type": "markdown", + "id": "a30bd0f2", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "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\\}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "5593e084", + "metadata": { + "editable": true + }, + "source": [ + "We note that the design matrix $\\boldsymbol{X}$ does not depend on the unknown parameters defined by the vector $\\boldsymbol{\\beta}$.\n", + "We are now interested in minimizing the cost function with respect to the unknown parameters $\\boldsymbol{\\beta}$.\n", + "\n", + "The mean squared error is a scalar and if we use the results from the last example, we define a new vector" + ] + }, + { + "cell_type": "markdown", + "id": "0ecc87b7", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{w}=\\boldsymbol{y}-\\boldsymbol{X}\\boldsymbol{\\beta},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "d87cf1be", + "metadata": { + "editable": true + }, + "source": [ + "which depends on $\\boldsymbol{\\beta}$. We rewrite the cost function as" + ] + }, + { + "cell_type": "markdown", + "id": "c8ac2b85", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "C(\\boldsymbol{\\beta})=\\frac{1}{n}\\boldsymbol{w}^T\\boldsymbol{w},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "2a1896de", + "metadata": { + "editable": true + }, + "source": [ + "with partial derivative" + ] + }, + { + "cell_type": "markdown", + "id": "f07be920", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\frac{\\partial C(\\boldsymbol{\\beta})}{\\partial \\boldsymbol{\\beta}}=\\frac{2}{n}\\boldsymbol{w}^T\\frac{\\partial \\boldsymbol{w}}{\\partial \\boldsymbol{\\beta}},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "8351f7a8", + "metadata": { + "editable": true + }, + "source": [ + "and using that" + ] + }, + { + "cell_type": "markdown", + "id": "b321536f", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\frac{\\partial \\boldsymbol{w}}{\\partial \\boldsymbol{\\beta}}=-\\boldsymbol{X},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "7dea2f6e", + "metadata": { + "editable": true + }, + "source": [ + "where we used the result from example two above. Inserting the last expression we obtain" + ] + }, + { + "cell_type": "markdown", + "id": "fc8335b3", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\frac{\\partial C(\\boldsymbol{\\beta})}{\\partial \\boldsymbol{\\beta}}=-\\frac{2}{n}\\left(\\boldsymbol{y}-\\boldsymbol{X}\\boldsymbol{\\beta}\\right)^T\\boldsymbol{X},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "690c48cc", + "metadata": { + "editable": true + }, + "source": [ + "or as" + ] + }, + { + "cell_type": "markdown", + "id": "dbf4e99e", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\frac{\\partial C(\\boldsymbol{\\beta})}{\\partial \\boldsymbol{\\beta}^T}=-\\frac{2}{n}\\boldsymbol{X}^T\\left(\\boldsymbol{y}-\\boldsymbol{X}\\boldsymbol{\\beta}\\right).\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "20066c64", + "metadata": { + "editable": true + }, + "source": [ + "## Other useful relations\n", + "\n", + "We list here some other useful relations we may encounter (recall that vectors are defined by boldfaced low-key letters)" + ] + }, + { + "cell_type": "markdown", + "id": "512705d5", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\frac{\\partial (\\boldsymbol{b}^T\\boldsymbol{a})}{\\partial \\boldsymbol{a}} = \\boldsymbol{b},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "898589c9", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\frac{\\partial tr(\\boldsymbol{B}\\boldsymbol{A})}{\\partial \\boldsymbol{A}} = \\boldsymbol{B}^T,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "04fdb8da", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\frac{\\partial \\log{\\vert\\boldsymbol{A}\\vert}}{\\partial \\boldsymbol{A}} = (\\boldsymbol{A}^{-1})^T.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "fb0d6555", + "metadata": { + "editable": true + }, + "source": [ + "## Meet the Hessian Matrix\n", + "\n", + "A very important matrix we will meet again and again in machine\n", + "learning is the Hessian. It is given by the second derivative of the\n", + "cost function with respect to the parameters $\\boldsymbol{\\beta}$. Using the above\n", + "expression for derivatives of vectors and matrices, we find that the\n", + "second derivative of the mean squared error as cost function is," + ] + }, + { + "cell_type": "markdown", + "id": "61ca107d", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\frac{\\partial}{\\partial \\boldsymbol{\\beta}}\\frac{\\partial C(\\boldsymbol{\\beta})}{\\partial \\boldsymbol{\\beta}^T} =\\frac{\\partial}{\\partial \\boldsymbol{\\beta}}\\left[-\\frac{2}{n}\\boldsymbol{X}^T\\left( \\boldsymbol{y}-\\boldsymbol{X}\\boldsymbol{\\beta}\\right)\\right]=\\frac{2}{n}\\boldsymbol{X}^T\\boldsymbol{X}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "71be4e48", + "metadata": { + "editable": true + }, + "source": [ + "The Hessian matrix plays an important role and is defined here as" + ] + }, + { + "cell_type": "markdown", + "id": "9fc474c3", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{H}=\\boldsymbol{X}^T\\boldsymbol{X}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "23a27406", + "metadata": { + "editable": true + }, + "source": [ + "For ordinary least squares, it is inversely proportional (derivation\n", + "next week) with the variance of the optimal parameters\n", + "$\\hat{\\boldsymbol{\\beta}}$. Furthermore, we will see later this week that it is\n", + "(aside the factor $1/n$) equal to the covariance matrix. It plays also a very\n", + "important role in optmization algorithms and Principal Component\n", + "Analysis as a way to reduce the dimensionality of a machine learning/data analysis\n", + "problem.\n", + "\n", + "**Linear algebra question:** Can we use the Hessian matrix to say something about properties of the cost function (our optmization problem)? (hint: think about convex or concave problems and how to relate these to a matrix!)." + ] + }, + { + "cell_type": "markdown", + "id": "9aa37656", + "metadata": { + "editable": true + }, + "source": [ + "## Interpretations and optimizing our parameters\n", + "\n", + "The residuals $\\boldsymbol{\\epsilon}$ are in turn given by" + ] + }, + { + "cell_type": "markdown", + "id": "1458e79a", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{\\epsilon} = \\boldsymbol{y}-\\boldsymbol{\\tilde{y}} = \\boldsymbol{y}-\\boldsymbol{X}\\boldsymbol{\\beta},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "c3fcfcdf", + "metadata": { + "editable": true + }, + "source": [ + "and with" + ] + }, + { + "cell_type": "markdown", + "id": "9f169fad", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{X}^T\\left( \\boldsymbol{y}-\\boldsymbol{X}\\boldsymbol{\\beta}\\right)= 0,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "81e7723a", + "metadata": { + "editable": true + }, + "source": [ + "we have" + ] + }, + { + "cell_type": "markdown", + "id": "b2551cd1", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{X}^T\\boldsymbol{\\epsilon}=\\boldsymbol{X}^T\\left( \\boldsymbol{y}-\\boldsymbol{X}\\boldsymbol{\\beta}\\right)= 0,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "601003c8", + "metadata": { + "editable": true + }, + "source": [ + "meaning that the solution for $\\boldsymbol{\\beta}$ is the one which minimizes the residuals." + ] + }, + { + "cell_type": "markdown", + "id": "1f2fdfa6", + "metadata": { + "editable": true + }, + "source": [ + "## Example relevant for the exercises\n", + "\n", + "In order to understand the relation among the predictors $p$, the set of data $n$ and the target (outcome, output etc) $\\boldsymbol{y}$,\n", + "we condiser a simple polynomial fit.\n", + "We assume our data can represented by a fourth-order polynomial. For the $i$th component we have" + ] + }, + { + "cell_type": "markdown", + "id": "ea1518ad", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\tilde{y}_i = \\beta_0+\\beta_1x_i+\\beta_2x_i^2+\\beta_3x_i^3+\\beta_4x_i^4.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "758b843b", + "metadata": { + "editable": true + }, + "source": [ + "we have five predictors/features. The first is the intercept $\\beta_0$. The other terms are $\\beta_i$ with $i=1,2,3,4$. Furthermore we have $n$ entries for each predictor. It means that our design matrix is a \n", + "$p\\times n$ matrix $\\boldsymbol{X}$." + ] + }, + { + "cell_type": "markdown", + "id": "24715db8", + "metadata": { + "editable": true + }, + "source": [ + "## Own code for Ordinary Least Squares\n", + "\n", + "It is rather straightforward to implement the matrix inversion and obtain the parameters $\\boldsymbol{\\beta}$. After having defined the matrix $\\boldsymbol{X}$ and the outputs $\\boldsymbol{y}$ we have" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "id": "f8b57463", + "metadata": { + "collapsed": false, + "editable": true + }, + "outputs": [], + "source": [ + "# matrix inversion to find beta\n", + "beta = (np.linalg.inv(X.T @ X) @ X.T ) @ y\n", + "# and then make the prediction\n", + "ytilde = X @ beta" + ] + }, + { + "cell_type": "markdown", + "id": "70c97572", + "metadata": { + "editable": true + }, + "source": [ + "Alternatively, you can use the least squares functionality in **Numpy** as" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "1aa95889", + "metadata": { + "collapsed": false, + "editable": true + }, + "outputs": [], + "source": [ + "fit = np.linalg.lstsq(X, Energies, rcond =None)[0]\n", + "ytildenp = np.dot(fit,X.T)" + ] + }, + { + "cell_type": "markdown", + "id": "e250b2e9", + "metadata": { + "editable": true + }, + "source": [ + "## Adding error analysis and training set up\n", + "\n", + "We can easily test our fit by computing the $R2$ score that we discussed in connection with the functionality of **Scikit-Learn** in the introductory slides.\n", + "Since we are not using **Scikit-Learn** here we can define our own $R2$ function as" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "id": "a86bd577", + "metadata": { + "collapsed": false, + "editable": true + }, + "outputs": [], + "source": [ + "def R2(y_data, y_model):\n", + " return 1 - np.sum((y_data - y_model) ** 2) / np.sum((y_data - np.mean(y_data)) ** 2)" + ] + }, + { + "cell_type": "markdown", + "id": "d6ccd7b8", + "metadata": { + "editable": true + }, + "source": [ + "and we would be using it as" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "id": "fb6f7c19", + "metadata": { + "collapsed": false, + "editable": true + }, + "outputs": [], + "source": [ + "print(R2(Energies,ytilde))" + ] + }, + { + "cell_type": "markdown", + "id": "eca18427", + "metadata": { + "editable": true + }, + "source": [ + "We can easily add our **MSE** score as" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "id": "0fd2b39c", + "metadata": { + "collapsed": false, + "editable": true + }, + "outputs": [], + "source": [ + "def MSE(y_data,y_model):\n", + " n = np.size(y_model)\n", + " return np.sum((y_data-y_model)**2)/n\n", + "\n", + "print(MSE(Energies,ytilde))" + ] + }, + { + "cell_type": "markdown", + "id": "db3fe7d9", + "metadata": { + "editable": true + }, + "source": [ + "and finally the relative error as" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "id": "9f59c14e", + "metadata": { + "collapsed": false, + "editable": true + }, + "outputs": [], + "source": [ + "def RelativeError(y_data,y_model):\n", + " return abs((y_data-y_model)/y_data)\n", + "print(RelativeError(Energies, ytilde))" + ] + }, + { + "cell_type": "markdown", + "id": "2fdd5915", + "metadata": { + "editable": true + }, + "source": [ + "## Splitting our Data in Training and Test data\n", + "\n", + "It is normal in essentially all Machine Learning studies to split the\n", + "data in a training set and a test set (sometimes also an additional\n", + "validation set). **Scikit-Learn** has an own function for this. There\n", + "is no explicit recipe for how much data should be included as training\n", + "data and say test data. An accepted rule of thumb is to use\n", + "approximately $2/3$ to $4/5$ of the data as training data. We will\n", + "postpone a discussion of this splitting to the end of these notes and\n", + "our discussion of the so-called **bias-variance** tradeoff. Here we\n", + "limit ourselves to repeat the above equation of state fitting example\n", + "but now splitting the data into a training set and a test set." + ] + }, + { + "cell_type": "markdown", + "id": "9863e063", + "metadata": { + "editable": true + }, + "source": [ + "## The complete code with a simple data set" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "id": "85fc6a78", + "metadata": { + "collapsed": false, + "editable": true + }, + "outputs": [], + "source": [ + "%matplotlib inline\n", + "\n", + "import os\n", + "import numpy as np\n", + "import pandas as pd\n", + "import matplotlib.pyplot as plt\n", + "from sklearn.model_selection import train_test_split\n", + "\n", + "\n", + "def R2(y_data, y_model):\n", + " return 1 - np.sum((y_data - y_model) ** 2) / np.sum((y_data - np.mean(y_data)) ** 2)\n", + "def MSE(y_data,y_model):\n", + " n = np.size(y_model)\n", + " return np.sum((y_data-y_model)**2)/n\n", + "\n", + "x = np.random.rand(100)\n", + "y = 2.0+5*x*x+0.1*np.random.randn(100)\n", + "\n", + "\n", + "# The design matrix now as function of a fourth-order polynomial\n", + "X = np.zeros((len(x),5))\n", + "X[:,0] = 1.0\n", + "X[:,1] = x\n", + "X[:,2] = x**2\n", + "X[:,3] = x**3\n", + "X[:,4] = x**4\n", + "# We split the data in test and training data\n", + "X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2)\n", + "# matrix inversion to find beta\n", + "beta = np.linalg.inv(X_train.T @ X_train) @ X_train.T @ y_train\n", + "print(beta)\n", + "# and then make the prediction\n", + "ytilde = X_train @ beta\n", + "print(\"Training R2\")\n", + "print(R2(y_train,ytilde))\n", + "print(\"Training MSE\")\n", + "print(MSE(y_train,ytilde))\n", + "ypredict = X_test @ beta\n", + "print(\"Test R2\")\n", + "print(R2(y_test,ypredict))\n", + "print(\"Test MSE\")\n", + "print(MSE(y_test,ypredict))" + ] + }, + { + "cell_type": "markdown", + "id": "6671297c", + "metadata": { + "editable": true + }, + "source": [ + "## Making your own test-train splitting" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "id": "810f32f7", + "metadata": { + "collapsed": false, + "editable": true + }, + "outputs": [], + "source": [ + "# equivalently in numpy\n", + "def train_test_split_numpy(inputs, labels, train_size, test_size):\n", + " n_inputs = len(inputs)\n", + " inputs_shuffled = inputs.copy()\n", + " labels_shuffled = labels.copy()\n", + "\n", + " np.random.shuffle(inputs_shuffled)\n", + " np.random.shuffle(labels_shuffled)\n", + "\n", + " train_end = int(n_inputs*train_size)\n", + " X_train, X_test = inputs_shuffled[:train_end], inputs_shuffled[train_end:]\n", + " Y_train, Y_test = labels_shuffled[:train_end], labels_shuffled[train_end:]\n", + "\n", + " return X_train, X_test, Y_train, Y_test" + ] + }, + { + "cell_type": "markdown", + "id": "1ca5e45d", + "metadata": { + "editable": true + }, + "source": [ + "But since **scikit-learn** has its own function for doing this and since\n", + "it interfaces easily with **tensorflow** and other libraries, we\n", + "normally recommend using the latter functionality." + ] + }, + { + "cell_type": "markdown", + "id": "b6530670", + "metadata": { + "editable": true + }, + "source": [ + "## Reducing the number of degrees of freedom, overarching view\n", + "\n", + "Many Machine Learning problems involve thousands or even millions of\n", + "features for each training instance. Not only does this make training\n", + "extremely slow, it can also make it much harder to find a good\n", + "solution, as we will see. This problem is often referred to as the\n", + "curse of dimensionality. Fortunately, in real-world problems, it is\n", + "often possible to reduce the number of features considerably, turning\n", + "an intractable problem into a tractable one.\n", + "\n", + "Later we will discuss some of the most popular dimensionality reduction\n", + "techniques: the principal component analysis (PCA), Kernel PCA, and\n", + "Locally Linear Embedding (LLE). \n", + "\n", + "Principal component analysis and its various variants deal with the\n", + "problem of fitting a low-dimensional [affine\n", + "subspace](https://en.wikipedia.org/wiki/Affine_space) to a set of of\n", + "data points in a high-dimensional space. With its family of methods it\n", + "is one of the most used tools in data modeling, compression and\n", + "visualization." + ] + }, + { + "cell_type": "markdown", + "id": "4be4158c", + "metadata": { + "editable": true + }, + "source": [ + "## Preprocessing our data\n", + "\n", + "Before we proceed however, we will discuss how to preprocess our\n", + "data. Till now and in connection with our previous examples we have\n", + "not met so many cases where we are too sensitive to the scaling of our\n", + "data. Normally the data may need a rescaling and/or may be sensitive\n", + "to extreme values. Scaling the data renders our inputs much more\n", + "suitable for the algorithms we want to employ.\n", + "\n", + "For data sets gathered for real world applications, it is rather normal that\n", + "different features have very different units and\n", + "numerical scales. For example, a data set detailing health habits may include\n", + "features such as **age** in the range $0-80$, and **caloric intake** of order $2000$.\n", + "Many machine learning methods sensitive to the scales of the features and may perform poorly if they\n", + "are very different scales. Therefore, it is typical to scale\n", + "the features in a way to avoid such outlier values." + ] + }, + { + "cell_type": "markdown", + "id": "aa6f9ff6", + "metadata": { + "editable": true + }, + "source": [ + "## Functionality in Scikit-Learn\n", + "\n", + "**Scikit-Learn** has several functions which allow us to rescale the\n", + "data, normally resulting in much better results in terms of various\n", + "accuracy scores. The **StandardScaler** function in **Scikit-Learn**\n", + "ensures that for each feature/predictor we study the mean value is\n", + "zero and the variance is one (every column in the design/feature\n", + "matrix). This scaling has the drawback that it does not ensure that\n", + "we have a particular maximum or minimum in our data set. Another\n", + "function included in **Scikit-Learn** is the **MinMaxScaler** which\n", + "ensures that all features are exactly between $0$ and $1$. The" + ] + }, + { + "cell_type": "markdown", + "id": "856dee18", + "metadata": { + "editable": true + }, + "source": [ + "## More preprocessing\n", + "\n", + "The **Normalizer** scales each data\n", + "point such that the feature vector has a euclidean length of one. In other words, it\n", + "projects a data point on the circle (or sphere in the case of higher dimensions) with a\n", + "radius of 1. This means every data point is scaled by a different number (by the\n", + "inverse of it’s length).\n", + "This normalization is often used when only the direction (or angle) of the data matters,\n", + "not the length of the feature vector.\n", + "\n", + "The **RobustScaler** works similarly to the StandardScaler in that it\n", + "ensures statistical properties for each feature that guarantee that\n", + "they are on the same scale. However, the RobustScaler uses the median\n", + "and quartiles, instead of mean and variance. This makes the\n", + "RobustScaler ignore data points that are very different from the rest\n", + "(like measurement errors). These odd data points are also called\n", + "outliers, and might often lead to trouble for other scaling\n", + "techniques." + ] + }, + { + "cell_type": "markdown", + "id": "3497598c", + "metadata": { + "editable": true + }, + "source": [ + "## Frequently used scaling functions\n", + "\n", + "Many features are often scaled using standardization to improve performance. In **Scikit-Learn** this is given by the **StandardScaler** function as discussed above. It is easy however to write your own. \n", + "Mathematically, this involves subtracting the mean and divide by the standard deviation over the data set, for each feature:" + ] + }, + { + "cell_type": "markdown", + "id": "fe24fd3f", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "x_j^{(i)} \\rightarrow \\frac{x_j^{(i)} - \\overline{x}_j}{\\sigma(x_j)},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "55bccc6e", + "metadata": { + "editable": true + }, + "source": [ + "where $\\overline{x}_j$ and $\\sigma(x_j)$ are the mean and standard deviation, respectively, of the feature $x_j$.\n", + "This ensures that each feature has zero mean and unit standard deviation. For data sets where we do not have the standard deviation or don't wish to calculate it, it is then common to simply set it to one." + ] + }, + { + "cell_type": "markdown", + "id": "e01c4d09", + "metadata": { + "editable": true + }, + "source": [ + "## Example of own Standard scaling\n", + "\n", + "Let us consider the following vanilla example where we use both\n", + "**Scikit-Learn** and write our own function as well. We produce a\n", + "simple test design matrix with random numbers. Each column could then\n", + "represent a specific feature whose mean value is subracted." + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "id": "6098d5d9", + "metadata": { + "collapsed": false, + "editable": true + }, + "outputs": [], + "source": [ + "import sklearn.linear_model as skl\n", + "from sklearn.metrics import mean_squared_error\n", + "from sklearn.model_selection import train_test_split\n", + "from sklearn.preprocessing import MinMaxScaler, StandardScaler, Normalizer\n", + "import numpy as np\n", + "import pandas as pd\n", + "from IPython.display import display\n", + "np.random.seed(100)\n", + "# setting up a 10 x 5 matrix\n", + "rows = 10\n", + "cols = 5\n", + "X = np.random.randn(rows,cols)\n", + "XPandas = pd.DataFrame(X)\n", + "display(XPandas)\n", + "print(XPandas.mean())\n", + "print(XPandas.std())\n", + "XPandas = (XPandas -XPandas.mean())\n", + "display(XPandas)\n", + "# This option does not include the standard deviation\n", + "scaler = StandardScaler(with_std=False)\n", + "scaler.fit(X)\n", + "Xscaled = scaler.transform(X)\n", + "display(XPandas-Xscaled)" + ] + }, + { + "cell_type": "markdown", + "id": "653340bf", + "metadata": { + "editable": true + }, + "source": [ + "Small exercise: perform the standard scaling by including the standard deviation and compare with what Scikit-Learn gives." + ] + }, + { + "cell_type": "markdown", + "id": "673c8917", + "metadata": { + "editable": true + }, + "source": [ + "## Min-Max Scaling\n", + "\n", + "Another commonly used scaling method is min-max scaling. This is very\n", + "useful for when we want the features to lie in a certain interval. To\n", + "scale the feature $x_j$ to the interval $[a, b]$, we can apply the\n", + "transformation" + ] + }, + { + "cell_type": "markdown", + "id": "4f69865b", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "x_j^{(i)} \\rightarrow (b-a)\\frac{x_j^{(i)} - \\min(x_j)}{\\max(x_j) - \\min(x_j)} - a\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "f39433a0", + "metadata": { + "editable": true + }, + "source": [ + "where $\\min(x_j)$ and $\\max(x_j)$ return the minimum and maximum value of $x_j$ over the data set, respectively." + ] + }, + { + "cell_type": "markdown", + "id": "f2f5cb76", + "metadata": { + "editable": true + }, + "source": [ + "## Testing the Means Squared Error as function of Complexity\n", + "\n", + "One of \n", + "the aims is to reproduce Figure 2.11 of [Hastie et al](https://github.com/CompPhysics/MLErasmus/blob/master/doc/Textbooks/elementsstat.pdf).\n", + "\n", + "Our data is defined by $x\\in [-3,3]$ with a total of for example $100$ data points." + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "id": "12dbcdcb", + "metadata": { + "collapsed": false, + "editable": true + }, + "outputs": [], + "source": [ + "np.random.seed()\n", + "n = 100\n", + "maxdegree = 14\n", + "# Make data set.\n", + "x = np.linspace(-3, 3, n).reshape(-1, 1)\n", + "y = np.exp(-x**2) + 1.5 * np.exp(-(x-2)**2)+ np.random.normal(0, 0.1, x.shape)" + ] + }, + { + "cell_type": "markdown", + "id": "38cb3698", + "metadata": { + "editable": true + }, + "source": [ + "where $y$ is the function we want to fit with a given polynomial.\n", + "\n", + "Write a first code which sets up a design matrix $X$ defined by a fourth-order polynomial. Scale your data and split it in training and test data." + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "id": "a0cd549b", + "metadata": { + "collapsed": false, + "editable": true + }, + "outputs": [], + "source": [ + "import matplotlib.pyplot as plt\n", + "import numpy as np\n", + "from sklearn.linear_model import LinearRegression\n", + "from sklearn.preprocessing import PolynomialFeatures\n", + "from sklearn.model_selection import train_test_split\n", + "from sklearn.pipeline import make_pipeline\n", + "\n", + "\n", + "np.random.seed(2018)\n", + "n = 50\n", + "maxdegree = 5\n", + "# Make data set.\n", + "x = np.linspace(-3, 3, n).reshape(-1, 1)\n", + "y = np.exp(-x**2) + 1.5 * np.exp(-(x-2)**2)+ np.random.normal(0, 0.1, x.shape)\n", + "TestError = np.zeros(maxdegree)\n", + "TrainError = np.zeros(maxdegree)\n", + "polydegree = np.zeros(maxdegree)\n", + "x_train, x_test, y_train, y_test = train_test_split(x, y, test_size=0.2)\n", + "scaler = StandardScaler()\n", + "scaler.fit(x_train)\n", + "x_train_scaled = scaler.transform(x_train)\n", + "x_test_scaled = scaler.transform(x_test)\n", + "\n", + "for degree in range(maxdegree):\n", + " model = make_pipeline(PolynomialFeatures(degree=degree), LinearRegression(fit_intercept=False))\n", + " clf = model.fit(x_train_scaled,y_train)\n", + " y_fit = clf.predict(x_train_scaled)\n", + " y_pred = clf.predict(x_test_scaled) \n", + " polydegree[degree] = degree\n", + " TestError[degree] = np.mean( np.mean((y_test - y_pred)**2) )\n", + " TrainError[degree] = np.mean( np.mean((y_train - y_fit)**2) )\n", + "\n", + "plt.plot(polydegree, TestError, label='Test Error')\n", + "plt.plot(polydegree, TrainError, label='Train Error')\n", + "plt.legend()\n", + "plt.show()" + ] + }, + { + "cell_type": "markdown", + "id": "b4d2ab87", + "metadata": { + "editable": true + }, + "source": [ + "## More preprocessing examples, two-dimensional example, the Franke function" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "id": "9f5d7996", + "metadata": { + "collapsed": false, + "editable": true + }, + "outputs": [], + "source": [ + "# Common imports\n", + "import os\n", + "import numpy as np\n", + "import pandas as pd\n", + "import matplotlib.pyplot as plt\n", + "import sklearn.linear_model as skl\n", + "from sklearn.metrics import mean_squared_error\n", + "from sklearn.model_selection import train_test_split\n", + "from sklearn.preprocessing import MinMaxScaler, StandardScaler, Normalizer\n", + "\n", + "# Where to save the figures and data files\n", + "PROJECT_ROOT_DIR = \"Results\"\n", + "FIGURE_ID = \"Results/FigureFiles\"\n", + "DATA_ID = \"DataFiles/\"\n", + "\n", + "if not os.path.exists(PROJECT_ROOT_DIR):\n", + " os.mkdir(PROJECT_ROOT_DIR)\n", + "\n", + "if not os.path.exists(FIGURE_ID):\n", + " os.makedirs(FIGURE_ID)\n", + "\n", + "if not os.path.exists(DATA_ID):\n", + " os.makedirs(DATA_ID)\n", + "\n", + "def image_path(fig_id):\n", + " return os.path.join(FIGURE_ID, fig_id)\n", + "\n", + "def data_path(dat_id):\n", + " return os.path.join(DATA_ID, dat_id)\n", + "\n", + "def save_fig(fig_id):\n", + " plt.savefig(image_path(fig_id) + \".png\", format='png')\n", + "\n", + "\n", + "def FrankeFunction(x,y):\n", + "\tterm1 = 0.75*np.exp(-(0.25*(9*x-2)**2) - 0.25*((9*y-2)**2))\n", + "\tterm2 = 0.75*np.exp(-((9*x+1)**2)/49.0 - 0.1*(9*y+1))\n", + "\tterm3 = 0.5*np.exp(-(9*x-7)**2/4.0 - 0.25*((9*y-3)**2))\n", + "\tterm4 = -0.2*np.exp(-(9*x-4)**2 - (9*y-7)**2)\n", + "\treturn term1 + term2 + term3 + term4\n", + "\n", + "\n", + "def create_X(x, y, n ):\n", + "\tif len(x.shape) > 1:\n", + "\t\tx = np.ravel(x)\n", + "\t\ty = np.ravel(y)\n", + "\n", + "\tN = len(x)\n", + "\tl = int((n+1)*(n+2)/2)\t\t# Number of elements in beta\n", + "\tX = np.ones((N,l))\n", + "\n", + "\tfor i in range(1,n+1):\n", + "\t\tq = int((i)*(i+1)/2)\n", + "\t\tfor k in range(i+1):\n", + "\t\t\tX[:,q+k] = (x**(i-k))*(y**k)\n", + "\n", + "\treturn X\n", + "\n", + "\n", + "# Making meshgrid of datapoints and compute Franke's function\n", + "n = 5\n", + "N = 1000\n", + "x = np.sort(np.random.uniform(0, 1, N))\n", + "y = np.sort(np.random.uniform(0, 1, N))\n", + "z = FrankeFunction(x, y)\n", + "X = create_X(x, y, n=n) \n", + "# split in training and test data\n", + "X_train, X_test, y_train, y_test = train_test_split(X,z,test_size=0.2)\n", + "\n", + "\n", + "clf = skl.LinearRegression().fit(X_train, y_train)\n", + "\n", + "# The mean squared error and R2 score\n", + "print(\"MSE before scaling: {:.2f}\".format(mean_squared_error(clf.predict(X_test), y_test)))\n", + "print(\"R2 score before scaling {:.2f}\".format(clf.score(X_test,y_test)))\n", + "\n", + "scaler = StandardScaler()\n", + "scaler.fit(X_train)\n", + "X_train_scaled = scaler.transform(X_train)\n", + "X_test_scaled = scaler.transform(X_test)\n", + "\n", + "print(\"Feature min values before scaling:\\n {}\".format(X_train.min(axis=0)))\n", + "print(\"Feature max values before scaling:\\n {}\".format(X_train.max(axis=0)))\n", + "\n", + "print(\"Feature min values after scaling:\\n {}\".format(X_train_scaled.min(axis=0)))\n", + "print(\"Feature max values after scaling:\\n {}\".format(X_train_scaled.max(axis=0)))\n", + "\n", + "clf = skl.LinearRegression().fit(X_train_scaled, y_train)\n", + "\n", + "\n", + "print(\"MSE after scaling: {:.2f}\".format(mean_squared_error(clf.predict(X_test_scaled), y_test)))\n", + "print(\"R2 score for scaled data: {:.2f}\".format(clf.score(X_test_scaled,y_test)))" + ] + }, + { + "cell_type": "markdown", + "id": "5ea41ab9", + "metadata": { + "editable": true + }, + "source": [ + "## To think about, first part\n", + "\n", + "When you are comparing your own code with for example **Scikit-Learn**'s\n", + "library, there are some technicalities to keep in mind. The examples\n", + "here demonstrate some of these aspects with potential pitfalls.\n", + "\n", + "The discussion here focuses on the role of the intercept, how we can\n", + "set up the design matrix, what scaling we should use and other topics\n", + "which tend confuse us.\n", + "\n", + "The intercept can be interpreted as the expected value of our\n", + "target/output variables when all other predictors are set to zero.\n", + "Thus, if we cannot assume that the expected outputs/targets are zero\n", + "when all predictors are zero (the columns in the design matrix), it\n", + "may be a bad idea to implement a model which penalizes the intercept.\n", + "Furthermore, in for example Ridge and Lasso regression (to be discussed in moe detail next week), the default solutions\n", + "from the library **Scikit-Learn** (when not shrinking $\\beta_0$) for the unknown parameters\n", + "$\\boldsymbol{\\beta}$, are derived under the assumption that both $\\boldsymbol{y}$ and\n", + "$\\boldsymbol{X}$ are zero centered, that is we subtract the mean values." + ] + }, + { + "cell_type": "markdown", + "id": "ce0afdb4", + "metadata": { + "editable": true + }, + "source": [ + "## More thinking\n", + "\n", + "If our predictors represent different scales, then it is important to\n", + "standardize the design matrix $\\boldsymbol{X}$ by subtracting the mean of each\n", + "column from the corresponding column and dividing the column with its\n", + "standard deviation. Most machine learning libraries do this as a default. This means that if you compare your code with the results from a given library,\n", + "the results may differ. \n", + "\n", + "The\n", + "[Standadscaler](https://scikit-learn.org/stable/modules/generated/sklearn.preprocessing.StandardScaler.html)\n", + "function in **Scikit-Learn** does this for us. For the data sets we\n", + "have been studying in our various examples, the data are in many cases\n", + "already scaled and there is no need to scale them. You as a user of different machine learning algorithms, should always perform a\n", + "survey of your data, with a critical assessment of them in case you need to scale the data.\n", + "\n", + "If you need to scale the data, not doing so will give an *unfair*\n", + "penalization of the parameters since their magnitude depends on the\n", + "scale of their corresponding predictor.\n", + "\n", + "Suppose as an example that you \n", + "you have an input variable given by the heights of different persons.\n", + "Human height might be measured in inches or meters or\n", + "kilometers. If measured in kilometers, a standard linear regression\n", + "model with this predictor would probably give a much bigger\n", + "coefficient term, than if measured in millimeters.\n", + "This can clearly lead to problems in evaluating the cost/loss functions." + ] + }, + { + "cell_type": "markdown", + "id": "ad92f42b", + "metadata": { + "editable": true + }, + "source": [ + "## Still thinking\n", + "\n", + "Keep in mind that when you transform your data set before training a model, the same transformation needs to be done\n", + "on your eventual new data set before making a prediction. If we translate this into a Python code, it would could be implemented as follows" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "id": "fae66265", + "metadata": { + "collapsed": false, + "editable": true + }, + "outputs": [], + "source": [ + "#Model training, we compute the mean value of y and X\n", + "y_train_mean = np.mean(y_train)\n", + "X_train_mean = np.mean(X_train,axis=0)\n", + "X_train = X_train - X_train_mean\n", + "y_train = y_train - y_train_mean\n", + "\n", + "# The we fit our model with the training data\n", + "trained_model = some_model.fit(X_train,y_train)\n", + "\n", + "\n", + "#Model prediction, we need also to transform our data set used for the prediction.\n", + "X_test = X_test - X_train_mean #Use mean from training data\n", + "y_pred = trained_model(X_test)\n", + "y_pred = y_pred + y_train_mean" + ] + }, + { + "cell_type": "markdown", + "id": "1bf672d8", + "metadata": { + "editable": true + }, + "source": [ + "## What does centering (subtracting the mean values) mean mathematically?\n", + "\n", + "Let us try to understand what this may imply mathematically when we\n", + "subtract the mean values, also known as *zero centering*. For\n", + "simplicity, we will focus on ordinary regression, as done in the above example.\n", + "\n", + "The cost/loss function for regression is" + ] + }, + { + "cell_type": "markdown", + "id": "30834557", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "C(\\beta_0, \\beta_1, ... , \\beta_{p-1}) = \\frac{1}{n}\\sum_{i=0}^{n} \\left(y_i - \\beta_0 - \\sum_{j=1}^{p-1} X_{ij}\\beta_j\\right)^2,.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "5c05a427", + "metadata": { + "editable": true + }, + "source": [ + "Recall also that we use the squared value since this leads to an increase of the penalty for higher differences between predicted and output/target values.\n", + "\n", + "What we have done is to single out the $\\beta_0$ term in the definition of the mean squared error (MSE).\n", + "The design matrix\n", + "$X$ does in this case not contain any intercept column.\n", + "When we take the derivative with respect to $\\beta_0$, we want the derivative to obey" + ] + }, + { + "cell_type": "markdown", + "id": "902391ce", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\frac{\\partial C}{\\partial \\beta_j} = 0,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "a68a6228", + "metadata": { + "editable": true + }, + "source": [ + "for all $j$. For $\\beta_0$ we have" + ] + }, + { + "cell_type": "markdown", + "id": "212cf295", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\frac{\\partial C}{\\partial \\beta_0} = -\\frac{2}{n}\\sum_{i=0}^{n-1} \\left(y_i - \\beta_0 - \\sum_{j=1}^{p-1} X_{ij} \\beta_j\\right).\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "e7db36e1", + "metadata": { + "editable": true + }, + "source": [ + "Multiplying away the constant $2/n$, we obtain" + ] + }, + { + "cell_type": "markdown", + "id": "5d7f590c", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\sum_{i=0}^{n-1} \\beta_0 = \\sum_{i=0}^{n-1}y_i - \\sum_{i=0}^{n-1} \\sum_{j=1}^{p-1} X_{ij} \\beta_j.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "bbf7c89a", + "metadata": { + "editable": true + }, + "source": [ + "## Further Manipulations\n", + "\n", + "Let us special first to the case where we have only two parameters $\\beta_0$ and $\\beta_1$.\n", + "Our result for $\\beta_0$ simplifies then to" + ] + }, + { + "cell_type": "markdown", + "id": "05692612", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "n\\beta_0 = \\sum_{i=0}^{n-1}y_i - \\sum_{i=0}^{n-1} X_{i1} \\beta_1.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "3dc53330", + "metadata": { + "editable": true + }, + "source": [ + "We obtain then" + ] + }, + { + "cell_type": "markdown", + "id": "562d655d", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\beta_0 = \\frac{1}{n}\\sum_{i=0}^{n-1}y_i - \\beta_1\\frac{1}{n}\\sum_{i=0}^{n-1} X_{i1}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "528c869d", + "metadata": { + "editable": true + }, + "source": [ + "If we define" + ] + }, + { + "cell_type": "markdown", + "id": "82a20d9e", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\mu_1=\\frac{1}{n}\\sum_{i=0}^{n-1} (X_{i1},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "5e37316e", + "metadata": { + "editable": true + }, + "source": [ + "and if we define the mean value of the outputs as" + ] + }, + { + "cell_type": "markdown", + "id": "90c44e36", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\mu_y=\\frac{1}{n}\\sum_{i=0}^{n-1}y_i,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "be72a7d3", + "metadata": { + "editable": true + }, + "source": [ + "we have" + ] + }, + { + "cell_type": "markdown", + "id": "0a435bf5", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\beta_0 = \\mu_y - \\beta_1\\mu_{1}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "a67864cb", + "metadata": { + "editable": true + }, + "source": [ + "In the general case, that is we have more parameters than $\\beta_0$ and $\\beta_1$, we have" + ] + }, + { + "cell_type": "markdown", + "id": "9d8602b7", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\beta_0 = \\frac{1}{n}\\sum_{i=0}^{n-1}y_i - \\frac{1}{n}\\sum_{i=0}^{n-1}\\sum_{j=1}^{p-1} X_{ij}\\beta_j.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "32caef0d", + "metadata": { + "editable": true + }, + "source": [ + "Replacing $y_i$ with $y_i - y_i - \\overline{\\boldsymbol{y}}$ and centering also our design matrix results in a cost function (in vector-matrix disguise)" + ] + }, + { + "cell_type": "markdown", + "id": "f24465a9", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "C(\\boldsymbol{\\beta}) = (\\boldsymbol{\\tilde{y}} - \\tilde{X}\\boldsymbol{\\beta})^T(\\boldsymbol{\\tilde{y}} - \\tilde{X}\\boldsymbol{\\beta}).\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "f64212da", + "metadata": { + "editable": true + }, + "source": [ + "## Wrapping it up\n", + "\n", + "If we minimize with respect to $\\boldsymbol{\\beta}$ we have then" + ] + }, + { + "cell_type": "markdown", + "id": "8d0bf5ae", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\hat{\\boldsymbol{\\beta}} = (\\tilde{X}^T\\tilde{X})^{-1}\\tilde{X}^T\\boldsymbol{\\tilde{y}},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "e8d36ff8", + "metadata": { + "editable": true + }, + "source": [ + "where $\\boldsymbol{\\tilde{y}} = \\boldsymbol{y} - \\overline{\\boldsymbol{y}}$\n", + "and $\\tilde{X}_{ij} = X_{ij} - \\frac{1}{n}\\sum_{k=0}^{n-1}X_{kj}$.\n", + "\n", + "For Ridge regression we need to add $\\lambda \\boldsymbol{\\beta}^T\\boldsymbol{\\beta}$ to the cost function and get then" + ] + }, + { + "cell_type": "markdown", + "id": "aea58aac", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\hat{\\boldsymbol{\\beta}} = (\\tilde{X}^T\\tilde{X} + \\lambda I)^{-1}\\tilde{X}^T\\boldsymbol{\\tilde{y}}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "bc4b6f91", + "metadata": { + "editable": true + }, + "source": [ + "What does this mean? And why do we insist on all this? Let us look at some examples." + ] + }, + { + "cell_type": "markdown", + "id": "349b03e2", + "metadata": { + "editable": true + }, + "source": [ + "## Linear Regression code, Intercept handling first\n", + "\n", + "This code shows a simple first-order fit to a data set using the above transformed data, where we consider the role of the intercept first, by either excluding it or including it (*code example thanks to Øyvind Sigmundson Schøyen*). Here our scaling of the data is done by subtracting the mean values only.\n", + "Note also that we do not split the data into training and test." + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "id": "5cfc62db", + "metadata": { + "collapsed": false, + "editable": true + }, + "outputs": [], + "source": [ + "import numpy as np\n", + "import matplotlib.pyplot as plt\n", + "\n", + "from sklearn.linear_model import LinearRegression\n", + "\n", + "\n", + "np.random.seed(2021)\n", + "\n", + "def MSE(y_data,y_model):\n", + " n = np.size(y_model)\n", + " return np.sum((y_data-y_model)**2)/n\n", + "\n", + "\n", + "def fit_beta(X, y):\n", + " return np.linalg.pinv(X.T @ X) @ X.T @ y\n", + "\n", + "\n", + "true_beta = [2, 0.5, 3.7]\n", + "\n", + "x = np.linspace(0, 1, 11)\n", + "y = np.sum(\n", + " np.asarray([x ** p * b for p, b in enumerate(true_beta)]), axis=0\n", + ") + 0.1 * np.random.normal(size=len(x))\n", + "\n", + "degree = 3\n", + "X = np.zeros((len(x), degree))\n", + "\n", + "# Include the intercept in the design matrix\n", + "for p in range(degree):\n", + " X[:, p] = x ** p\n", + "\n", + "beta = fit_beta(X, y)\n", + "\n", + "# Intercept is included in the design matrix\n", + "skl = LinearRegression(fit_intercept=False).fit(X, y)\n", + "\n", + "print(f\"True beta: {true_beta}\")\n", + "print(f\"Fitted beta: {beta}\")\n", + "print(f\"Sklearn fitted beta: {skl.coef_}\")\n", + "ypredictOwn = X @ beta\n", + "ypredictSKL = skl.predict(X)\n", + "print(f\"MSE with intercept column\")\n", + "print(MSE(y,ypredictOwn))\n", + "print(f\"MSE with intercept column from SKL\")\n", + "print(MSE(y,ypredictSKL))\n", + "\n", + "\n", + "plt.figure()\n", + "plt.scatter(x, y, label=\"Data\")\n", + "plt.plot(x, X @ beta, label=\"Fit\")\n", + "plt.plot(x, skl.predict(X), label=\"Sklearn (fit_intercept=False)\")\n", + "\n", + "\n", + "# Do not include the intercept in the design matrix\n", + "X = np.zeros((len(x), degree - 1))\n", + "\n", + "for p in range(degree - 1):\n", + " X[:, p] = x ** (p + 1)\n", + "\n", + "# Intercept is not included in the design matrix\n", + "skl = LinearRegression(fit_intercept=True).fit(X, y)\n", + "\n", + "# Use centered values for X and y when computing coefficients\n", + "y_offset = np.average(y, axis=0)\n", + "X_offset = np.average(X, axis=0)\n", + "\n", + "beta = fit_beta(X - X_offset, y - y_offset)\n", + "intercept = np.mean(y_offset - X_offset @ beta)\n", + "\n", + "print(f\"Manual intercept: {intercept}\")\n", + "print(f\"Fitted beta (wiothout intercept): {beta}\")\n", + "print(f\"Sklearn intercept: {skl.intercept_}\")\n", + "print(f\"Sklearn fitted beta (without intercept): {skl.coef_}\")\n", + "ypredictOwn = X @ beta\n", + "ypredictSKL = skl.predict(X)\n", + "print(f\"MSE with Manual intercept\")\n", + "print(MSE(y,ypredictOwn+intercept))\n", + "print(f\"MSE with Sklearn intercept\")\n", + "print(MSE(y,ypredictSKL))\n", + "\n", + "plt.plot(x, X @ beta + intercept, \"--\", label=\"Fit (manual intercept)\")\n", + "plt.plot(x, skl.predict(X), \"--\", label=\"Sklearn (fit_intercept=True)\")\n", + "plt.grid()\n", + "plt.legend()\n", + "\n", + "plt.show()" + ] + }, + { + "cell_type": "markdown", + "id": "64c5fa5b", + "metadata": { + "editable": true + }, + "source": [ + "The intercept is the value of our output/target variable\n", + "when all our features are zero and our function crosses the $y$-axis (for a one-dimensional case). \n", + "\n", + "Printing the MSE, we see first that both methods give the same MSE, as\n", + "they should. However, when we move to for example Ridge regression (discussed next week),\n", + "the way we treat the intercept may give a larger or smaller MSE,\n", + "meaning that the MSE can be penalized by the value of the\n", + "intercept. Not including the intercept in the fit, means that the\n", + "regularization term does not include $\\beta_0$. For different values\n", + "of $\\lambda$, this may lead to differing MSE values. \n", + "\n", + "To remind the reader, the regularization term, with the intercept in Ridge regression is given by" + ] + }, + { + "cell_type": "markdown", + "id": "67496f35", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\lambda \\vert\\vert \\boldsymbol{\\beta} \\vert\\vert_2^2 = \\lambda \\sum_{j=0}^{p-1}\\beta_j^2,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "ceae31e0", + "metadata": { + "editable": true + }, + "source": [ + "but when we take out the intercept, this equation becomes" + ] + }, + { + "cell_type": "markdown", + "id": "743c68c8", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\lambda \\vert\\vert \\boldsymbol{\\beta} \\vert\\vert_2^2 = \\lambda \\sum_{j=1}^{p-1}\\beta_j^2.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "4af68378", + "metadata": { + "editable": true + }, + "source": [ + "For Lasso regression we have" + ] + }, + { + "cell_type": "markdown", + "id": "8228af90", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\lambda \\vert\\vert \\boldsymbol{\\beta} \\vert\\vert_1 = \\lambda \\sum_{j=1}^{p-1}\\vert\\beta_j\\vert.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "0a4285bc", + "metadata": { + "editable": true + }, + "source": [ + "It means that, when scaling the design matrix and the outputs/targets,\n", + "by subtracting the mean values, we have an optimization problem which\n", + "is not penalized by the intercept. The MSE value can then be smaller\n", + "since it focuses only on the remaining quantities. If we however bring\n", + "back the intercept, we will get an MSE which then contains the\n", + "intercept. This becomes more important when we discuss Ridge and Lasso\n", + "regression next week." + ] + }, + { + "cell_type": "markdown", + "id": "406af60a", + "metadata": { + "editable": true + }, + "source": [ + "## The Boston housing data example\n", + "\n", + "The Boston housing \n", + "data set was originally a part of UCI Machine Learning Repository\n", + "and has been removed now. The data set is now included in **Scikit-Learn**'s \n", + "library. There are 506 samples and 13 feature (predictor) variables\n", + "in this data set. The objective is to predict the value of prices of\n", + "the house using the features (predictors) listed here.\n", + "\n", + "The features/predictors are\n", + "1. CRIM: Per capita crime rate by town\n", + "\n", + "2. ZN: Proportion of residential land zoned for lots over 25000 square feet\n", + "\n", + "3. INDUS: Proportion of non-retail business acres per town\n", + "\n", + "4. CHAS: Charles River dummy variable (= 1 if tract bounds river; 0 otherwise)\n", + "\n", + "5. NOX: Nitric oxide concentration (parts per 10 million)\n", + "\n", + "6. RM: Average number of rooms per dwelling\n", + "\n", + "7. AGE: Proportion of owner-occupied units built prior to 1940\n", + "\n", + "8. DIS: Weighted distances to five Boston employment centers\n", + "\n", + "9. RAD: Index of accessibility to radial highways\n", + "\n", + "10. TAX: Full-value property tax rate per USD10000\n", + "\n", + "11. B: $1000(Bk - 0.63)^2$, where $Bk$ is the proportion of [people of African American descent] by town\n", + "\n", + "12. LSTAT: Percentage of lower status of the population\n", + "\n", + "13. MEDV: Median value of owner-occupied homes in USD 1000s" + ] + }, + { + "cell_type": "markdown", + "id": "0f05d1e1", + "metadata": { + "editable": true + }, + "source": [ + "## Housing data, the code\n", + "We start by importing the libraries" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "id": "70f8a406", + "metadata": { + "collapsed": false, + "editable": true + }, + "outputs": [], + "source": [ + "import numpy as np\n", + "import matplotlib.pyplot as plt \n", + "\n", + "import pandas as pd \n", + "import seaborn as sns" + ] + }, + { + "cell_type": "markdown", + "id": "10a6162c", + "metadata": { + "editable": true + }, + "source": [ + "and load the Boston Housing DataSet from **Scikit-Learn**" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "id": "be236243", + "metadata": { + "collapsed": false, + "editable": true + }, + "outputs": [], + "source": [ + "from sklearn.datasets import load_boston\n", + "\n", + "boston_dataset = load_boston()\n", + "\n", + "# boston_dataset is a dictionary\n", + "# let's check what it contains\n", + "boston_dataset.keys()" + ] + }, + { + "cell_type": "markdown", + "id": "88a7376f", + "metadata": { + "editable": true + }, + "source": [ + "Then we invoke Pandas" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "id": "ec268779", + "metadata": { + "collapsed": false, + "editable": true + }, + "outputs": [], + "source": [ + "boston = pd.DataFrame(boston_dataset.data, columns=boston_dataset.feature_names)\n", + "boston.head()\n", + "boston['MEDV'] = boston_dataset.target" + ] + }, + { + "cell_type": "markdown", + "id": "b45f3733", + "metadata": { + "editable": true + }, + "source": [ + "and preprocess the data" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "id": "8b9423c6", + "metadata": { + "collapsed": false, + "editable": true + }, + "outputs": [], + "source": [ + "# check for missing values in all the columns\n", + "boston.isnull().sum()" + ] + }, + { + "cell_type": "markdown", + "id": "1061cb1f", + "metadata": { + "editable": true + }, + "source": [ + "We can then visualize the data" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "id": "00d79fad", + "metadata": { + "collapsed": false, + "editable": true + }, + "outputs": [], + "source": [ + "# set the size of the figure\n", + "sns.set(rc={'figure.figsize':(11.7,8.27)})\n", + "\n", + "# plot a histogram showing the distribution of the target values\n", + "sns.distplot(boston['MEDV'], bins=30)\n", + "plt.show()" + ] + }, + { + "cell_type": "markdown", + "id": "18871b23", + "metadata": { + "editable": true + }, + "source": [ + "It is now useful to look at the correlation matrix" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "id": "abfd55f9", + "metadata": { + "collapsed": false, + "editable": true + }, + "outputs": [], + "source": [ + "# compute the pair wise correlation for all columns \n", + "correlation_matrix = boston.corr().round(2)\n", + "# use the heatmap function from seaborn to plot the correlation matrix\n", + "# annot = True to print the values inside the square\n", + "sns.heatmap(data=correlation_matrix, annot=True)" + ] + }, + { + "cell_type": "markdown", + "id": "231f35c5", + "metadata": { + "editable": true + }, + "source": [ + "From the above coorelation plot we can see that **MEDV** is strongly correlated to **LSTAT** and **RM**. We see also that **RAD** and **TAX** are stronly correlated, but we don't include this in our features together to avoid multi-colinearity" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "id": "5bb68d00", + "metadata": { + "collapsed": false, + "editable": true + }, + "outputs": [], + "source": [ + "plt.figure(figsize=(20, 5))\n", + "\n", + "features = ['LSTAT', 'RM']\n", + "target = boston['MEDV']\n", + "\n", + "for i, col in enumerate(features):\n", + " plt.subplot(1, len(features) , i+1)\n", + " x = boston[col]\n", + " y = target\n", + " plt.scatter(x, y, marker='o')\n", + " plt.title(col)\n", + " plt.xlabel(col)\n", + " plt.ylabel('MEDV')" + ] + }, + { + "cell_type": "markdown", + "id": "9c2f9f6b", + "metadata": { + "editable": true + }, + "source": [ + "Now we start training our model" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "id": "df3cc855", + "metadata": { + "collapsed": false, + "editable": true + }, + "outputs": [], + "source": [ + "X = pd.DataFrame(np.c_[boston['LSTAT'], boston['RM']], columns = ['LSTAT','RM'])\n", + "Y = boston['MEDV']" + ] + }, + { + "cell_type": "markdown", + "id": "da67457b", + "metadata": { + "editable": true + }, + "source": [ + "We split the data into training and test sets" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "id": "f9784866", + "metadata": { + "collapsed": false, + "editable": true + }, + "outputs": [], + "source": [ + "from sklearn.model_selection import train_test_split\n", + "\n", + "# splits the training and test data set in 80% : 20%\n", + "# assign random_state to any value.This ensures consistency.\n", + "X_train, X_test, Y_train, Y_test = train_test_split(X, Y, test_size = 0.2, random_state=5)\n", + "print(X_train.shape)\n", + "print(X_test.shape)\n", + "print(Y_train.shape)\n", + "print(Y_test.shape)" + ] + }, + { + "cell_type": "markdown", + "id": "3429e67f", + "metadata": { + "editable": true + }, + "source": [ + "Then we use the linear regression functionality from **Scikit-Learn**" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "id": "9ec7ba47", + "metadata": { + "collapsed": false, + "editable": true + }, + "outputs": [], + "source": [ + "from sklearn.linear_model import LinearRegression\n", + "from sklearn.metrics import mean_squared_error, r2_score\n", + "\n", + "lin_model = LinearRegression()\n", + "lin_model.fit(X_train, Y_train)\n", + "\n", + "# model evaluation for training set\n", + "\n", + "y_train_predict = lin_model.predict(X_train)\n", + "rmse = (np.sqrt(mean_squared_error(Y_train, y_train_predict)))\n", + "r2 = r2_score(Y_train, y_train_predict)\n", + "\n", + "print(\"The model performance for training set\")\n", + "print(\"--------------------------------------\")\n", + "print('RMSE is {}'.format(rmse))\n", + "print('R2 score is {}'.format(r2))\n", + "print(\"\\n\")\n", + "\n", + "# model evaluation for testing set\n", + "\n", + "y_test_predict = lin_model.predict(X_test)\n", + "# root mean square error of the model\n", + "rmse = (np.sqrt(mean_squared_error(Y_test, y_test_predict)))\n", + "\n", + "# r-squared score of the model\n", + "r2 = r2_score(Y_test, y_test_predict)\n", + "\n", + "print(\"The model performance for testing set\")\n", + "print(\"--------------------------------------\")\n", + "print('RMSE is {}'.format(rmse))\n", + "print('R2 score is {}'.format(r2))" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "id": "0c0be681", + "metadata": { + "collapsed": false, + "editable": true + }, + "outputs": [], + "source": [ + "# plotting the y_test vs y_pred\n", + "# ideally should have been a straight line\n", + "plt.scatter(Y_test, y_test_predict)\n", + "plt.show()" + ] + }, + { + "cell_type": "markdown", + "id": "ed12f12d", + "metadata": { + "editable": true + }, + "source": [ + "## Material for lecture Thursday, August 31" + ] + }, + { + "cell_type": "markdown", + "id": "50c91ade", + "metadata": { + "editable": true + }, + "source": [ + "## Mathematical Interpretation of Ordinary Least Squares\n", + "\n", + "What is presented here is a mathematical analysis of various regression algorithms (ordinary least squares, Ridge and Lasso Regression). The analysis is based on an important algorithm in linear algebra, the so-called Singular Value Decomposition (SVD). \n", + "\n", + "We have shown that in ordinary least squares the optimal parameters $\\beta$ are given by" + ] + }, + { + "cell_type": "markdown", + "id": "682a501b", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\hat{\\boldsymbol{\\beta}} = \\left(\\boldsymbol{X}^T\\boldsymbol{X}\\right)^{-1}\\boldsymbol{X}^T\\boldsymbol{y}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "057bbc5d", + "metadata": { + "editable": true + }, + "source": [ + "The **hat** over $\\boldsymbol{\\beta}$ means we have the optimal parameters after minimization of the cost function.\n", + "\n", + "This means that our best model is defined as" + ] + }, + { + "cell_type": "markdown", + "id": "cddb899f", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\tilde{\\boldsymbol{y}}=\\boldsymbol{X}\\hat{\\boldsymbol{\\beta}} = \\boldsymbol{X}\\left(\\boldsymbol{X}^T\\boldsymbol{X}\\right)^{-1}\\boldsymbol{X}^T\\boldsymbol{y}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "ab325ebc", + "metadata": { + "editable": true + }, + "source": [ + "We now define a matrix" + ] + }, + { + "cell_type": "markdown", + "id": "095ebc5b", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{A}=\\boldsymbol{X}\\left(\\boldsymbol{X}^T\\boldsymbol{X}\\right)^{-1}\\boldsymbol{X}^T.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "08e642f6", + "metadata": { + "editable": true + }, + "source": [ + "We can rewrite" + ] + }, + { + "cell_type": "markdown", + "id": "da5c1625", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\tilde{\\boldsymbol{y}}=\\boldsymbol{X}\\hat{\\boldsymbol{\\beta}} = \\boldsymbol{A}\\boldsymbol{y}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "2bf04890", + "metadata": { + "editable": true + }, + "source": [ + "The matrix $\\boldsymbol{A}$ has the important property that $\\boldsymbol{A}^2=\\boldsymbol{A}$. This is the definition of a projection matrix.\n", + "We can then interpret our optimal model $\\tilde{\\boldsymbol{y}}$ as being represented by an orthogonal projection of $\\boldsymbol{y}$ onto a space defined by the column vectors of $\\boldsymbol{X}$. In our case here the matrix $\\boldsymbol{A}$ is a square matrix. If it is a general rectangular matrix we have an oblique projection matrix." + ] + }, + { + "cell_type": "markdown", + "id": "5ba172cc", + "metadata": { + "editable": true + }, + "source": [ + "## Residual Error\n", + "\n", + "We have defined the residual error as" + ] + }, + { + "cell_type": "markdown", + "id": "7d1f0b59", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{\\epsilon}=\\boldsymbol{y}-\\tilde{\\boldsymbol{y}}=\\left[\\boldsymbol{I}-\\boldsymbol{X}\\left(\\boldsymbol{X}^T\\boldsymbol{X}\\right)^{-1}\\boldsymbol{X}^T\\right]\\boldsymbol{y}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "467e185d", + "metadata": { + "editable": true + }, + "source": [ + "The residual errors are then the projections of $\\boldsymbol{y}$ onto the orthogonal component of the space defined by the column vectors of $\\boldsymbol{X}$." + ] + }, + { + "cell_type": "markdown", + "id": "74822363", + "metadata": { + "editable": true + }, + "source": [ + "## Simple case\n", + "\n", + "If the matrix $\\boldsymbol{X}$ is an orthogonal (or unitary in case of complex values) matrix, we have" + ] + }, + { + "cell_type": "markdown", + "id": "5414a1d2", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{X}^T\\boldsymbol{X}=\\boldsymbol{X}\\boldsymbol{X}^T = \\boldsymbol{I}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "08ce1402", + "metadata": { + "editable": true + }, + "source": [ + "In this case the matrix $\\boldsymbol{A}$ becomes" + ] + }, + { + "cell_type": "markdown", + "id": "7bbb949f", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{A}=\\boldsymbol{X}\\left(\\boldsymbol{X}^T\\boldsymbol{X}\\right)^{-1}\\boldsymbol{X}^T)=\\boldsymbol{I},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "4007519d", + "metadata": { + "editable": true + }, + "source": [ + "and we have the obvious case" + ] + }, + { + "cell_type": "markdown", + "id": "45061e33", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{\\epsilon}=\\boldsymbol{y}-\\tilde{\\boldsymbol{y}}=0.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "f5afee48", + "metadata": { + "editable": true + }, + "source": [ + "This serves also as a useful test of our codes." + ] + }, + { + "cell_type": "markdown", + "id": "6a3d6440", + "metadata": { + "editable": true + }, + "source": [ + "## The singular value decomposition\n", + "\n", + "The examples we have looked at so far are cases where we normally can\n", + "invert the matrix $\\boldsymbol{X}^T\\boldsymbol{X}$. Using a polynomial expansion where we fit of various functions leads to\n", + "row vectors of the design matrix which are essentially orthogonal due\n", + "to the polynomial character of our model. Obtaining the inverse of the\n", + "design matrix is then often done via a so-called LU, QR or Cholesky\n", + "decomposition.\n", + "\n", + "As we will also see in the first project, \n", + "this may\n", + "however not the be case in general and a standard matrix inversion\n", + "algorithm based on say LU, QR or Cholesky decomposition may lead to singularities. We will see examples of this below.\n", + "\n", + "There is however a way to circumvent this problem and also\n", + "gain some insights about the ordinary least squares approach, and\n", + "later shrinkage methods like Ridge and Lasso regressions.\n", + "\n", + "This is given by the **Singular Value Decomposition** (SVD) algorithm,\n", + "perhaps the most powerful linear algebra algorithm. The SVD provides\n", + "a numerically stable matrix decomposition that is used in a large\n", + "swath oc applications and the decomposition is always stable\n", + "numerically.\n", + "\n", + "In machine learning it plays a central role in dealing with for\n", + "example design matrices that may be near singular or singular.\n", + "Furthermore, as we will see here, the singular values can be related\n", + "to the covariance matrix (and thereby the correlation matrix) and in\n", + "turn the variance of a given quantity. It plays also an important role\n", + "in the principal component analysis where high-dimensional data can be\n", + "reduced to the statistically relevant features." + ] + }, + { + "cell_type": "markdown", + "id": "ef8c39b7", + "metadata": { + "editable": true + }, + "source": [ + "## Linear Regression Problems\n", + "\n", + "One of the typical problems we encounter with linear regression, in particular \n", + "when the matrix $\\boldsymbol{X}$ (our so-called design matrix) is high-dimensional, \n", + "are problems with near singular or singular matrices. The column vectors of $\\boldsymbol{X}$ \n", + "may be linearly dependent, normally referred to as super-collinearity. \n", + "This means that the matrix may be rank deficient and it is basically impossible to \n", + "to model the data using linear regression. As an example, consider the matrix" + ] + }, + { + "cell_type": "markdown", + "id": "6edd77ca", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\begin{align*}\n", + "\\mathbf{X} & = \\left[\n", + "\\begin{array}{rrr}\n", + "1 & -1 & 2\n", + "\\\\\n", + "1 & 0 & 1\n", + "\\\\\n", + "1 & 2 & -1\n", + "\\\\\n", + "1 & 1 & 0\n", + "\\end{array} \\right]\n", + "\\end{align*}\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "cba40ade", + "metadata": { + "editable": true + }, + "source": [ + "The columns of $\\boldsymbol{X}$ are linearly dependent. We see this easily since the \n", + "the first column is the row-wise sum of the other two columns. The rank (more correct,\n", + "the column rank) of a matrix is the dimension of the space spanned by the\n", + "column vectors. Hence, the rank of $\\mathbf{X}$ is equal to the number\n", + "of linearly independent columns. In this particular case the matrix has rank 2.\n", + "\n", + "Super-collinearity of an $(n \\times p)$-dimensional design matrix $\\mathbf{X}$ implies\n", + "that the inverse of the matrix $\\boldsymbol{X}^T\\boldsymbol{X}$ (the matrix we need to invert to solve the linear regression equations) is non-invertible. If we have a square matrix that does not have an inverse, we say this matrix singular. The example here demonstrates this" + ] + }, + { + "cell_type": "markdown", + "id": "20f096a2", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\begin{align*}\n", + "\\boldsymbol{X} & = \\left[\n", + "\\begin{array}{rr}\n", + "1 & -1\n", + "\\\\\n", + "1 & -1\n", + "\\end{array} \\right].\n", + "\\end{align*}\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "49f6f27c", + "metadata": { + "editable": true + }, + "source": [ + "We see easily that $\\mbox{det}(\\boldsymbol{X}) = x_{11} x_{22} - x_{12} x_{21} = 1 \\times (-1) - 1 \\times (-1) = 0$. Hence, $\\mathbf{X}$ is singular and its inverse is undefined.\n", + "This is equivalent to saying that the matrix $\\boldsymbol{X}$ has at least an eigenvalue which is zero." + ] + }, + { + "cell_type": "markdown", + "id": "577f3338", + "metadata": { + "editable": true + }, + "source": [ + "## Fixing the singularity\n", + "\n", + "If our design matrix $\\boldsymbol{X}$ which enters the linear regression problem" + ] + }, + { + "cell_type": "markdown", + "id": "f456df81", + "metadata": { + "editable": true + }, + "source": [ + "\n", + "
\n", + "\n", + "$$\n", + "\\begin{equation}\n", + "\\boldsymbol{\\beta} = (\\boldsymbol{X}^{T} \\boldsymbol{X})^{-1} \\boldsymbol{X}^{T} \\boldsymbol{y},\n", + "\\label{_auto1} \\tag{1}\n", + "\\end{equation}\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "ed7db14f", + "metadata": { + "editable": true + }, + "source": [ + "has linearly dependent column vectors, we will not be able to compute the inverse\n", + "of $\\boldsymbol{X}^T\\boldsymbol{X}$ and we cannot find the parameters (estimators) $\\beta_i$. \n", + "The estimators are only well-defined if $(\\boldsymbol{X}^{T}\\boldsymbol{X})^{-1}$ exits. \n", + "This is more likely to happen when the matrix $\\boldsymbol{X}$ is high-dimensional. In this case it is likely to encounter a situation where \n", + "the regression parameters $\\beta_i$ cannot be estimated.\n", + "\n", + "A cheap *ad hoc* approach is simply to add a small diagonal component to the matrix to invert, that is we change" + ] + }, + { + "cell_type": "markdown", + "id": "a876de90", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{X}^{T} \\boldsymbol{X} \\rightarrow \\boldsymbol{X}^{T} \\boldsymbol{X}+\\lambda \\boldsymbol{I},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "3b2eee8d", + "metadata": { + "editable": true + }, + "source": [ + "where $\\boldsymbol{I}$ is the identity matrix. When we discuss **Ridge** regression this is actually what we end up evaluating. The parameter $\\lambda$ is called a hyperparameter. More about this later." + ] + }, + { + "cell_type": "markdown", + "id": "910d3f09", + "metadata": { + "editable": true + }, + "source": [ + "## Basic math of the SVD\n", + "\n", + "From standard linear algebra we know that a square matrix $\\boldsymbol{X}$ can be diagonalized if and only it is \n", + "a so-called [normal matrix](https://en.wikipedia.org/wiki/Normal_matrix), that is if $\\boldsymbol{X}\\in {\\mathbb{R}}^{n\\times n}$\n", + "we have $\\boldsymbol{X}\\boldsymbol{X}^T=\\boldsymbol{X}^T\\boldsymbol{X}$ or if $\\boldsymbol{X}\\in {\\mathbb{C}}^{n\\times n}$ we have $\\boldsymbol{X}\\boldsymbol{X}^{\\dagger}=\\boldsymbol{X}^{\\dagger}\\boldsymbol{X}$.\n", + "The matrix has then a set of eigenpairs" + ] + }, + { + "cell_type": "markdown", + "id": "94bd4c00", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "(\\lambda_1,\\boldsymbol{u}_1),\\dots, (\\lambda_n,\\boldsymbol{u}_n),\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "56d91a09", + "metadata": { + "editable": true + }, + "source": [ + "and the eigenvalues are given by the diagonal matrix" + ] + }, + { + "cell_type": "markdown", + "id": "8e59a435", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{\\Sigma}=\\mathrm{Diag}(\\lambda_1, \\dots,\\lambda_n).\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "9c2e6b9f", + "metadata": { + "editable": true + }, + "source": [ + "The matrix $\\boldsymbol{X}$ can be written in terms of an orthogonal/unitary transformation $\\boldsymbol{U}$" + ] + }, + { + "cell_type": "markdown", + "id": "e7188a39", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{X} = \\boldsymbol{U}\\boldsymbol{\\Sigma}\\boldsymbol{V}^T,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "daac715a", + "metadata": { + "editable": true + }, + "source": [ + "with $\\boldsymbol{U}\\boldsymbol{U}^T=\\boldsymbol{I}$ or $\\boldsymbol{U}\\boldsymbol{U}^{\\dagger}=\\boldsymbol{I}$.\n", + "\n", + "Not all square matrices are diagonalizable. A matrix like the one discussed above" + ] + }, + { + "cell_type": "markdown", + "id": "66322f83", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{X} = \\begin{bmatrix} \n", + "1& -1 \\\\\n", + "1& -1\\\\\n", + "\\end{bmatrix}\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "a03be784", + "metadata": { + "editable": true + }, + "source": [ + "is not diagonalizable, it is a so-called [defective matrix](https://en.wikipedia.org/wiki/Defective_matrix). It is easy to see that the condition\n", + "$\\boldsymbol{X}\\boldsymbol{X}^T=\\boldsymbol{X}^T\\boldsymbol{X}$ is not fulfilled." + ] + }, + { + "cell_type": "markdown", + "id": "ff3964a4", + "metadata": { + "editable": true + }, + "source": [ + "## The SVD, a Fantastic Algorithm\n", + "\n", + "However, and this is the strength of the SVD algorithm, any general\n", + "matrix $\\boldsymbol{X}$ can be decomposed in terms of a diagonal matrix and\n", + "two orthogonal/unitary matrices. The [Singular Value Decompostion\n", + "(SVD) theorem](https://en.wikipedia.org/wiki/Singular_value_decomposition)\n", + "states that a general $m\\times n$ matrix $\\boldsymbol{X}$ can be written in\n", + "terms of a diagonal matrix $\\boldsymbol{\\Sigma}$ of dimensionality $m\\times n$\n", + "and two orthognal matrices $\\boldsymbol{U}$ and $\\boldsymbol{V}$, where the first has\n", + "dimensionality $m \\times m$ and the last dimensionality $n\\times n$.\n", + "We have then" + ] + }, + { + "cell_type": "markdown", + "id": "04d411cc", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{X} = \\boldsymbol{U}\\boldsymbol{\\Sigma}\\boldsymbol{V}^T\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "bf2ae91a", + "metadata": { + "editable": true + }, + "source": [ + "As an example, the above defective matrix can be decomposed as" + ] + }, + { + "cell_type": "markdown", + "id": "843d113e", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{X} = \\frac{1}{\\sqrt{2}}\\begin{bmatrix} 1& 1 \\\\ 1& -1\\\\ \\end{bmatrix} \\begin{bmatrix} 2& 0 \\\\ 0& 0\\\\ \\end{bmatrix} \\frac{1}{\\sqrt{2}}\\begin{bmatrix} 1& -1 \\\\ 1& 1\\\\ \\end{bmatrix}=\\boldsymbol{U}\\boldsymbol{\\Sigma}\\boldsymbol{V}^T,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "f59af5f8", + "metadata": { + "editable": true + }, + "source": [ + "with eigenvalues $\\sigma_1=2$ and $\\sigma_2=0$. \n", + "The SVD exits always! \n", + "\n", + "The SVD\n", + "decomposition (singular values) gives eigenvalues \n", + "$\\sigma_i\\geq\\sigma_{i+1}$ for all $i$ and for dimensions larger than $i=p$, the\n", + "eigenvalues (singular values) are zero.\n", + "\n", + "In the general case, where our design matrix $\\boldsymbol{X}$ has dimension\n", + "$n\\times p$, the matrix is thus decomposed into an $n\\times n$\n", + "orthogonal matrix $\\boldsymbol{U}$, a $p\\times p$ orthogonal matrix $\\boldsymbol{V}$\n", + "and a diagonal matrix $\\boldsymbol{\\Sigma}$ with $r=\\mathrm{min}(n,p)$\n", + "singular values $\\sigma_i\\geq 0$ on the main diagonal and zeros filling\n", + "the rest of the matrix. There are at most $p$ singular values\n", + "assuming that $n > p$. In our regression examples for the nuclear\n", + "masses and the equation of state this is indeed the case, while for\n", + "the Ising model we have $p > n$. These are often cases that lead to\n", + "near singular or singular matrices.\n", + "\n", + "The columns of $\\boldsymbol{U}$ are called the left singular vectors while the columns of $\\boldsymbol{V}$ are the right singular vectors." + ] + }, + { + "cell_type": "markdown", + "id": "22f1ed07", + "metadata": { + "editable": true + }, + "source": [ + "## Economy-size SVD\n", + "\n", + "If we assume that $n > p$, then our matrix $\\boldsymbol{U}$ has dimension $n\n", + "\\times n$. The last $n-p$ columns of $\\boldsymbol{U}$ become however\n", + "irrelevant in our calculations since they are multiplied with the\n", + "zeros in $\\boldsymbol{\\Sigma}$.\n", + "\n", + "The economy-size decomposition removes extra rows or columns of zeros\n", + "from the diagonal matrix of singular values, $\\boldsymbol{\\Sigma}$, along with the columns\n", + "in either $\\boldsymbol{U}$ or $\\boldsymbol{V}$ that multiply those zeros in the expression. \n", + "Removing these zeros and columns can improve execution time\n", + "and reduce storage requirements without compromising the accuracy of\n", + "the decomposition.\n", + "\n", + "If $n > p$, we keep only the first $p$ columns of $\\boldsymbol{U}$ and $\\boldsymbol{\\Sigma}$ has dimension $p\\times p$. \n", + "If $p > n$, then only the first $n$ columns of $\\boldsymbol{V}$ are computed and $\\boldsymbol{\\Sigma}$ has dimension $n\\times n$.\n", + "The $n=p$ case is obvious, we retain the full SVD. \n", + "In general the economy-size SVD leads to less FLOPS and still conserving the desired accuracy." + ] + }, + { + "cell_type": "markdown", + "id": "69efb08d", + "metadata": { + "editable": true + }, + "source": [ + "## Codes for the SVD" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "id": "640d3bdf", + "metadata": { + "collapsed": false, + "editable": true + }, + "outputs": [], + "source": [ + "import numpy as np\n", + "# SVD inversion\n", + "def SVD(A):\n", + " ''' Takes as input a numpy matrix A and returns inv(A) based on singular value decomposition (SVD).\n", + " SVD is numerically more stable than the inversion algorithms provided by\n", + " numpy and scipy.linalg at the cost of being slower.\n", + " '''\n", + " U, S, VT = np.linalg.svd(A,full_matrices=True)\n", + " print('test U')\n", + " print( (np.transpose(U) @ U - U @np.transpose(U)))\n", + " print('test VT')\n", + " print( (np.transpose(VT) @ VT - VT @np.transpose(VT)))\n", + " print(U)\n", + " print(S)\n", + " print(VT)\n", + "\n", + " D = np.zeros((len(U),len(VT)))\n", + " for i in range(0,len(VT)):\n", + " D[i,i]=S[i]\n", + " return U @ D @ VT\n", + "\n", + "\n", + "X = np.array([ [1.0,-1.0], [1.0,-1.0]])\n", + "#X = np.array([[1, 2], [3, 4], [5, 6]])\n", + "\n", + "print(X)\n", + "C = SVD(X)\n", + "# Print the difference between the original matrix and the SVD one\n", + "print(C-X)" + ] + }, + { + "cell_type": "markdown", + "id": "98d61790", + "metadata": { + "editable": true + }, + "source": [ + "The matrix $\\boldsymbol{X}$ has columns that are linearly dependent. The first\n", + "column is the row-wise sum of the other two columns. The rank of a\n", + "matrix (the column rank) is the dimension of space spanned by the\n", + "column vectors. The rank of the matrix is the number of linearly\n", + "independent columns, in this case just $2$. We see this from the\n", + "singular values when running the above code. Running the standard\n", + "inversion algorithm for matrix inversion with $\\boldsymbol{X}^T\\boldsymbol{X}$ results\n", + "in the program terminating due to a singular matrix." + ] + }, + { + "cell_type": "markdown", + "id": "95b1ffa6", + "metadata": { + "editable": true + }, + "source": [ + "## Note about SVD Calculations\n", + "\n", + "The $U$, $S$, and $V$ matrices returned from the **svd()** function\n", + "cannot be multiplied directly.\n", + "\n", + "As you can see from the code, the $S$ vector must be converted into a\n", + "diagonal matrix. This may cause a problem as the size of the matrices\n", + "do not fit the rules of matrix multiplication, where the number of\n", + "columns in a matrix must match the number of rows in the subsequent\n", + "matrix.\n", + "\n", + "If you wish to include the zero singular values, you will need to\n", + "resize the matrices and set up a diagonal matrix as done in the above\n", + "example" + ] + }, + { + "cell_type": "markdown", + "id": "4605f137", + "metadata": { + "editable": true + }, + "source": [ + "## Mathematics of the SVD and implications\n", + "\n", + "Let us take a closer look at the mathematics of the SVD and the various implications for machine learning studies.\n", + "\n", + "Our starting point is our design matrix $\\boldsymbol{X}$ of dimension $n\\times p$" + ] + }, + { + "cell_type": "markdown", + "id": "3125bc92", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{X}=\\begin{bmatrix}\n", + "x_{0,0} & x_{0,1} & x_{0,2}& \\dots & \\dots x_{0,p-1}\\\\\n", + "x_{1,0} & x_{1,1} & x_{1,2}& \\dots & \\dots x_{1,p-1}\\\\\n", + "x_{2,0} & x_{2,1} & x_{2,2}& \\dots & \\dots x_{2,p-1}\\\\\n", + "\\dots & \\dots & \\dots & \\dots \\dots & \\dots \\\\\n", + "x_{n-2,0} & x_{n-2,1} & x_{n-2,2}& \\dots & \\dots x_{n-2,p-1}\\\\\n", + "x_{n-1,0} & x_{n-1,1} & x_{n-1,2}& \\dots & \\dots x_{n-1,p-1}\\\\\n", + "\\end{bmatrix}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "32cf3a9e", + "metadata": { + "editable": true + }, + "source": [ + "We can SVD decompose our matrix as" + ] + }, + { + "cell_type": "markdown", + "id": "573acb2d", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{X}=\\boldsymbol{U}\\boldsymbol{\\Sigma}\\boldsymbol{V}^T,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "22320566", + "metadata": { + "editable": true + }, + "source": [ + "where $\\boldsymbol{U}$ is an orthogonal matrix of dimension $n\\times n$, meaning that $\\boldsymbol{U}\\boldsymbol{U}^T=\\boldsymbol{U}^T\\boldsymbol{U}=\\boldsymbol{I}_n$. Here $\\boldsymbol{I}_n$ is the unit matrix of dimension $n \\times n$.\n", + "\n", + "Similarly, $\\boldsymbol{V}$ is an orthogonal matrix of dimension $p\\times p$, meaning that $\\boldsymbol{V}\\boldsymbol{V}^T=\\boldsymbol{V}^T\\boldsymbol{V}=\\boldsymbol{I}_p$. Here $\\boldsymbol{I}_n$ is the unit matrix of dimension $p \\times p$.\n", + "\n", + "Finally $\\boldsymbol{\\Sigma}$ contains the singular values $\\sigma_i$. This matrix has dimension $n\\times p$ and the singular values $\\sigma_i$ are all positive. The non-zero values are ordered in descending order, that is" + ] + }, + { + "cell_type": "markdown", + "id": "af0ee993", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\sigma_0 > \\sigma_1 > \\sigma_2 > \\dots > \\sigma_{p-1} > 0.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "0213ed87", + "metadata": { + "editable": true + }, + "source": [ + "All values beyond $p-1$ are all zero." + ] + }, + { + "cell_type": "markdown", + "id": "06266ee6", + "metadata": { + "editable": true + }, + "source": [ + "## Example Matrix\n", + "\n", + "As an example, consider the following $3\\times 2$ example for the matrix $\\boldsymbol{\\Sigma}$" + ] + }, + { + "cell_type": "markdown", + "id": "23e27fdf", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{\\Sigma}=\n", + "\\begin{bmatrix}\n", + "2& 0 \\\\\n", + "0 & 1 \\\\\n", + "0 & 0 \\\\\n", + "\\end{bmatrix}\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "2539e582", + "metadata": { + "editable": true + }, + "source": [ + "The singular values are $\\sigma_0=2$ and $\\sigma_1=1$. It is common to rewrite the matrix $\\boldsymbol{\\Sigma}$ as" + ] + }, + { + "cell_type": "markdown", + "id": "bef2cf95", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{\\Sigma}=\n", + "\\begin{bmatrix}\n", + "\\boldsymbol{\\tilde{\\Sigma}}\\\\\n", + "\\boldsymbol{0}\\\\\n", + "\\end{bmatrix},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "fe385753", + "metadata": { + "editable": true + }, + "source": [ + "where" + ] + }, + { + "cell_type": "markdown", + "id": "cc270435", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{\\tilde{\\Sigma}}=\n", + "\\begin{bmatrix}\n", + "2& 0 \\\\\n", + "0 & 1 \\\\\n", + "\\end{bmatrix},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "31932192", + "metadata": { + "editable": true + }, + "source": [ + "contains only the singular values. Note also (and we will use this below) that" + ] + }, + { + "cell_type": "markdown", + "id": "a972a944", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{\\Sigma}^T\\boldsymbol{\\Sigma}=\n", + "\\begin{bmatrix}\n", + "4& 0 \\\\\n", + "0 & 1 \\\\\n", + "\\end{bmatrix},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "d6ef62ee", + "metadata": { + "editable": true + }, + "source": [ + "which is a $2\\times 2 $ matrix while" + ] + }, + { + "cell_type": "markdown", + "id": "61e10478", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{\\Sigma}\\boldsymbol{\\Sigma}^T=\n", + "\\begin{bmatrix}\n", + "4& 0 & 0\\\\\n", + "0 & 1 & 0\\\\\n", + "0 & 0 & 0\\\\\n", + "\\end{bmatrix},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "9e8580da", + "metadata": { + "editable": true + }, + "source": [ + "is a $3\\times 3 $ matrix. The last row and column of this last matrix\n", + "contain only zeros. This will have important consequences for our SVD\n", + "decomposition of the design matrix." + ] + }, + { + "cell_type": "markdown", + "id": "0ac00991", + "metadata": { + "editable": true + }, + "source": [ + "## Setting up the Matrix to be inverted\n", + "\n", + "The matrix that may cause problems for us is $\\boldsymbol{X}^T\\boldsymbol{X}$. Using the SVD we can rewrite this matrix as" + ] + }, + { + "cell_type": "markdown", + "id": "05f8073b", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{X}^T\\boldsymbol{X}=\\boldsymbol{V}\\boldsymbol{\\Sigma}^T\\boldsymbol{U}^T\\boldsymbol{U}\\boldsymbol{\\Sigma}\\boldsymbol{V}^T,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "622a8443", + "metadata": { + "editable": true + }, + "source": [ + "and using the orthogonality of the matrix $\\boldsymbol{U}$ we have" + ] + }, + { + "cell_type": "markdown", + "id": "580e143c", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{X}^T\\boldsymbol{X}=\\boldsymbol{V}\\boldsymbol{\\Sigma}^T\\boldsymbol{\\Sigma}\\boldsymbol{V}^T.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "30b75cea", + "metadata": { + "editable": true + }, + "source": [ + "We define $\\boldsymbol{\\Sigma}^T\\boldsymbol{\\Sigma}=\\tilde{\\boldsymbol{\\Sigma}}^2$ which is a diagonal matrix containing only the singular values squared. It has dimensionality $p \\times p$.\n", + "\n", + "We can now insert the result for the matrix $\\boldsymbol{X}^T\\boldsymbol{X}$ into our equation for ordinary least squares where" + ] + }, + { + "cell_type": "markdown", + "id": "cdc103a7", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\tilde{y}_{\\mathrm{OLS}}=\\boldsymbol{X}\\left(\\boldsymbol{X}^T\\boldsymbol{X}\\right)^{-1}\\boldsymbol{X}^T\\boldsymbol{y},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "ea01abf6", + "metadata": { + "editable": true + }, + "source": [ + "and using our SVD decomposition of $\\boldsymbol{X}$ we have" + ] + }, + { + "cell_type": "markdown", + "id": "e4b60d5d", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\tilde{y}_{\\mathrm{OLS}}=\\boldsymbol{U}\\boldsymbol{\\Sigma}\\boldsymbol{V}^T\\left(\\boldsymbol{V}\\tilde{\\boldsymbol{\\Sigma}}^{2}(\\boldsymbol{V}^T\\right)^{-1}\\boldsymbol{V}\\boldsymbol{\\Sigma}^T\\boldsymbol{U}^T\\boldsymbol{y},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "deb0bbd3", + "metadata": { + "editable": true + }, + "source": [ + "which gives us, using the orthogonality of the matrices $\\boldsymbol{U}$ and $\\boldsymbol{V}$," + ] + }, + { + "cell_type": "markdown", + "id": "f1f15de8", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\tilde{y}_{\\mathrm{OLS}}=\\boldsymbol{U}\\boldsymbol{U}^T\\boldsymbol{y}=\\sum_{i=0}^{p-1}\\boldsymbol{u}_i\\boldsymbol{u}^T_i\\boldsymbol{y},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "7c54c407", + "metadata": { + "editable": true + }, + "source": [ + "It means that the ordinary least square model (with the optimal\n", + "parameters) $\\boldsymbol{\\tilde{y}}$, corresponds to an orthogonal\n", + "transformation of the output (or target) vector $\\boldsymbol{y}$ by the\n", + "vectors of the matrix $\\boldsymbol{U}$. Note that the summation ends at $p-1$,\n", + "that is $\\boldsymbol{\\tilde{y}}\\ne \\boldsymbol{y}$." + ] + }, + { + "cell_type": "markdown", + "id": "31e31b03", + "metadata": { + "editable": true + }, + "source": [ + "## Further properties (important for our analyses later)\n", + "\n", + "Let us study again $\\boldsymbol{X}^T\\boldsymbol{X}$ in terms of our SVD," + ] + }, + { + "cell_type": "markdown", + "id": "7d1cef4f", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{X}^T\\boldsymbol{X}=\\boldsymbol{V}\\boldsymbol{\\Sigma}^T\\boldsymbol{U}^T\\boldsymbol{U}\\boldsymbol{\\Sigma}\\boldsymbol{V}^T=\\boldsymbol{V}\\boldsymbol{\\Sigma}^T\\boldsymbol{\\Sigma}\\boldsymbol{V}^T.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "aa8cedef", + "metadata": { + "editable": true + }, + "source": [ + "If we now multiply from the right with $\\boldsymbol{V}$ (using the orthogonality of $\\boldsymbol{V}$) we get" + ] + }, + { + "cell_type": "markdown", + "id": "022623a1", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\left(\\boldsymbol{X}^T\\boldsymbol{X}\\right)\\boldsymbol{V}=\\boldsymbol{V}\\boldsymbol{\\Sigma}^T\\boldsymbol{\\Sigma}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "c9885020", + "metadata": { + "editable": true + }, + "source": [ + "This means the vectors $\\boldsymbol{v}_i$ of the orthogonal matrix $\\boldsymbol{V}$ are the eigenvectors of the matrix $\\boldsymbol{X}^T\\boldsymbol{X}$\n", + "with eigenvalues given by the singular values squared, that is" + ] + }, + { + "cell_type": "markdown", + "id": "f378f76e", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\left(\\boldsymbol{X}^T\\boldsymbol{X}\\right)\\boldsymbol{v}_i=\\boldsymbol{v}_i\\sigma_i^2.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "4add7e8a", + "metadata": { + "editable": true + }, + "source": [ + "Similarly, if we use the SVD decomposition for the matrix $\\boldsymbol{X}\\boldsymbol{X}^T$, we have" + ] + }, + { + "cell_type": "markdown", + "id": "51ea1a29", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{X}\\boldsymbol{X}^T=\\boldsymbol{U}\\boldsymbol{\\Sigma}\\boldsymbol{V}^T\\boldsymbol{V}\\boldsymbol{\\Sigma}^T\\boldsymbol{U}^T=\\boldsymbol{U}\\boldsymbol{\\Sigma}\\boldsymbol{\\Sigma}^T\\boldsymbol{U}^T.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "54a250b6", + "metadata": { + "editable": true + }, + "source": [ + "If we now multiply from the right with $\\boldsymbol{U}$ (using the orthogonality of $\\boldsymbol{U}$) we get" + ] + }, + { + "cell_type": "markdown", + "id": "ebaf68f5", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\left(\\boldsymbol{X}\\boldsymbol{X}^T\\right)\\boldsymbol{U}=\\boldsymbol{U}\\boldsymbol{\\Sigma}\\boldsymbol{\\Sigma}^T.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "5ff687e8", + "metadata": { + "editable": true + }, + "source": [ + "This means the vectors $\\boldsymbol{u}_i$ of the orthogonal matrix $\\boldsymbol{U}$ are the eigenvectors of the matrix $\\boldsymbol{X}\\boldsymbol{X}^T$\n", + "with eigenvalues given by the singular values squared, that is" + ] + }, + { + "cell_type": "markdown", + "id": "ea61a360", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\left(\\boldsymbol{X}\\boldsymbol{X}^T\\right)\\boldsymbol{u}_i=\\boldsymbol{u}_i\\sigma_i^2.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "bc168f34", + "metadata": { + "editable": true + }, + "source": [ + "**Important note**: we have defined our design matrix $\\boldsymbol{X}$ to be an\n", + "$n\\times p$ matrix. In most supervised learning cases we have that $n\n", + "\\ge p$, and quite often we have $n >> p$. For linear algebra based methods like ordinary least squares or Ridge regression, this leads to a matrix $\\boldsymbol{X}^T\\boldsymbol{X}$ which is small and thereby easier to handle from a computational point of view (in terms of number of floating point operations).\n", + "\n", + "In our lectures, the number of columns will\n", + "always refer to the number of features in our data set, while the\n", + "number of rows represents the number of data inputs. Note that in\n", + "other texts you may find the opposite notation. This has consequences\n", + "for the definition of for example the covariance matrix and its relation to the SVD." + ] + }, + { + "cell_type": "markdown", + "id": "39d89895", + "metadata": { + "editable": true + }, + "source": [ + "## Meet the Covariance Matrix\n", + "\n", + "Before we move on to a discussion of Ridge and Lasso regression, we want to show an important example of the above.\n", + "\n", + "We have already noted that the matrix $\\boldsymbol{X}^T\\boldsymbol{X}$ in ordinary\n", + "least squares is proportional to the second derivative of the cost\n", + "function, that is we have" + ] + }, + { + "cell_type": "markdown", + "id": "c229143d", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\frac{\\partial^2 C(\\boldsymbol{\\beta})}{\\partial \\boldsymbol{\\beta}^T\\partial \\boldsymbol{\\beta}} =\\frac{2}{n}\\boldsymbol{X}^T\\boldsymbol{X}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "0a569456", + "metadata": { + "editable": true + }, + "source": [ + "This quantity defines was what is called the Hessian matrix (the second derivative of a function we want to optimize).\n", + "\n", + "The Hessian matrix plays an important role and is defined in this course as" + ] + }, + { + "cell_type": "markdown", + "id": "0c0b9212", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{H}=\\boldsymbol{X}^T\\boldsymbol{X}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "b05a1b83", + "metadata": { + "editable": true + }, + "source": [ + "The Hessian matrix for ordinary least squares is also proportional to\n", + "the covariance matrix. This means also that we can use the SVD to find\n", + "the eigenvalues of the covariance matrix and the Hessian matrix in\n", + "terms of the singular values. Let us develop these arguments, as they will play an important role in our machine learning studies." + ] + }, + { + "cell_type": "markdown", + "id": "d64818ce", + "metadata": { + "editable": true + }, + "source": [ + "## Introducing the Covariance and Correlation functions\n", + "\n", + "Before we discuss the link between for example Ridge regression and the singular value decomposition, we need to remind ourselves about\n", + "the definition of the covariance and the correlation function. These are quantities that play a central role in machine learning methods.\n", + "\n", + "Suppose we have defined two vectors\n", + "$\\hat{x}$ and $\\hat{y}$ with $n$ elements each. The covariance matrix $\\boldsymbol{C}$ is defined as" + ] + }, + { + "cell_type": "markdown", + "id": "32df0f89", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{C}[\\boldsymbol{x},\\boldsymbol{y}] = \\begin{bmatrix} \\mathrm{cov}[\\boldsymbol{x},\\boldsymbol{x}] & \\mathrm{cov}[\\boldsymbol{x},\\boldsymbol{y}] \\\\\n", + " \\mathrm{cov}[\\boldsymbol{y},\\boldsymbol{x}] & \\mathrm{cov}[\\boldsymbol{y},\\boldsymbol{y}] \\\\\n", + " \\end{bmatrix},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "a9d9108b", + "metadata": { + "editable": true + }, + "source": [ + "where for example" + ] + }, + { + "cell_type": "markdown", + "id": "c6d76715", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\mathrm{cov}[\\boldsymbol{x},\\boldsymbol{y}] =\\frac{1}{n} \\sum_{i=0}^{n-1}(x_i- \\overline{x})(y_i- \\overline{y}).\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "5cc35821", + "metadata": { + "editable": true + }, + "source": [ + "With this definition and recalling that the variance is defined as" + ] + }, + { + "cell_type": "markdown", + "id": "27c8eac0", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\mathrm{var}[\\boldsymbol{x}]=\\frac{1}{n} \\sum_{i=0}^{n-1}(x_i- \\overline{x})^2,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "49361e47", + "metadata": { + "editable": true + }, + "source": [ + "we can rewrite the covariance matrix as" + ] + }, + { + "cell_type": "markdown", + "id": "5eb15920", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{C}[\\boldsymbol{x},\\boldsymbol{y}] = \\begin{bmatrix} \\mathrm{var}[\\boldsymbol{x}] & \\mathrm{cov}[\\boldsymbol{x},\\boldsymbol{y}] \\\\\n", + " \\mathrm{cov}[\\boldsymbol{x},\\boldsymbol{y}] & \\mathrm{var}[\\boldsymbol{y}] \\\\\n", + " \\end{bmatrix}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "2160cb07", + "metadata": { + "editable": true + }, + "source": [ + "**Note:** we have used $1/n$ in the above definitions of the *sample* variance and covariance. We assume then that we can calculate the exact mean value. \n", + "What you will find in essentially all statistics texts are equations\n", + "with a factor $1/(n-1)$. This is called [Bessel's correction](https://mathworld.wolfram.com/BesselsCorrection.html). This\n", + "method corrects the bias in the estimation of the population variance\n", + "and covariance. It also partially corrects the bias in the estimation\n", + "of the population standard deviation. If you use a library like\n", + "**Scikit-Learn** or **nunmpy's** function calculate the covariance, this\n", + "quantity will be computed with a factor $1/(n-1)$." + ] + }, + { + "cell_type": "markdown", + "id": "a5deaa8e", + "metadata": { + "editable": true + }, + "source": [ + "## Covariance and Correlation Matrix\n", + "\n", + "The covariance takes values between zero and infinity and may thus\n", + "lead to problems with loss of numerical precision for particularly\n", + "large values. It is common to scale the covariance matrix by\n", + "introducing instead the correlation matrix defined via the so-called\n", + "correlation function" + ] + }, + { + "cell_type": "markdown", + "id": "f6868141", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\mathrm{corr}[\\boldsymbol{x},\\boldsymbol{y}]=\\frac{\\mathrm{cov}[\\boldsymbol{x},\\boldsymbol{y}]}{\\sqrt{\\mathrm{var}[\\boldsymbol{x}] \\mathrm{var}[\\boldsymbol{y}]}}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "9c17b156", + "metadata": { + "editable": true + }, + "source": [ + "The correlation function is then given by values $\\mathrm{corr}[\\boldsymbol{x},\\boldsymbol{y}]\n", + "\\in [-1,1]$. This avoids eventual problems with too large values. We\n", + "can then define the correlation matrix for the two vectors $\\boldsymbol{x}$\n", + "and $\\boldsymbol{y}$ as" + ] + }, + { + "cell_type": "markdown", + "id": "1b9e8b7e", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{K}[\\boldsymbol{x},\\boldsymbol{y}] = \\begin{bmatrix} 1 & \\mathrm{corr}[\\boldsymbol{x},\\boldsymbol{y}] \\\\\n", + " \\mathrm{corr}[\\boldsymbol{y},\\boldsymbol{x}] & 1 \\\\\n", + " \\end{bmatrix},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "c00ac20a", + "metadata": { + "editable": true + }, + "source": [ + "In the above example this is the function we constructed using **pandas**." + ] + }, + { + "cell_type": "markdown", + "id": "91729a44", + "metadata": { + "editable": true + }, + "source": [ + "## Correlation Function and Design/Feature Matrix\n", + "\n", + "In our derivation of the various regression algorithms like **Ordinary Least Squares** or **Ridge regression**\n", + "we defined the design/feature matrix $\\boldsymbol{X}$ as" + ] + }, + { + "cell_type": "markdown", + "id": "62403241", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{X}=\\begin{bmatrix}\n", + "x_{0,0} & x_{0,1} & x_{0,2}& \\dots & \\dots x_{0,p-1}\\\\\n", + "x_{1,0} & x_{1,1} & x_{1,2}& \\dots & \\dots x_{1,p-1}\\\\\n", + "x_{2,0} & x_{2,1} & x_{2,2}& \\dots & \\dots x_{2,p-1}\\\\\n", + "\\dots & \\dots & \\dots & \\dots \\dots & \\dots \\\\\n", + "x_{n-2,0} & x_{n-2,1} & x_{n-2,2}& \\dots & \\dots x_{n-2,p-1}\\\\\n", + "x_{n-1,0} & x_{n-1,1} & x_{n-1,2}& \\dots & \\dots x_{n-1,p-1}\\\\\n", + "\\end{bmatrix},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "6d0de657", + "metadata": { + "editable": true + }, + "source": [ + "with $\\boldsymbol{X}\\in {\\mathbb{R}}^{n\\times p}$, with the predictors/features $p$ refering to the column numbers and the\n", + "entries $n$ being the row elements.\n", + "We can rewrite the design/feature matrix in terms of its column vectors as" + ] + }, + { + "cell_type": "markdown", + "id": "108adf6b", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{X}=\\begin{bmatrix} \\boldsymbol{x}_0 & \\boldsymbol{x}_1 & \\boldsymbol{x}_2 & \\dots & \\dots & \\boldsymbol{x}_{p-1}\\end{bmatrix},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "1b2ba4f7", + "metadata": { + "editable": true + }, + "source": [ + "with a given vector" + ] + }, + { + "cell_type": "markdown", + "id": "1711d54c", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{x}_i^T = \\begin{bmatrix}x_{0,i} & x_{1,i} & x_{2,i}& \\dots & \\dots x_{n-1,i}\\end{bmatrix}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "f88b0c88", + "metadata": { + "editable": true + }, + "source": [ + "With these definitions, we can now rewrite our $2\\times 2$\n", + "correlation/covariance matrix in terms of a moe general design/feature\n", + "matrix $\\boldsymbol{X}\\in {\\mathbb{R}}^{n\\times p}$. This leads to a $p\\times p$\n", + "covariance matrix for the vectors $\\boldsymbol{x}_i$ with $i=0,1,\\dots,p-1$" + ] + }, + { + "cell_type": "markdown", + "id": "d1835d40", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{C}[\\boldsymbol{x}] = \\begin{bmatrix}\n", + "\\mathrm{var}[\\boldsymbol{x}_0] & \\mathrm{cov}[\\boldsymbol{x}_0,\\boldsymbol{x}_1] & \\mathrm{cov}[\\boldsymbol{x}_0,\\boldsymbol{x}_2] & \\dots & \\dots & \\mathrm{cov}[\\boldsymbol{x}_0,\\boldsymbol{x}_{p-1}]\\\\\n", + "\\mathrm{cov}[\\boldsymbol{x}_1,\\boldsymbol{x}_0] & \\mathrm{var}[\\boldsymbol{x}_1] & \\mathrm{cov}[\\boldsymbol{x}_1,\\boldsymbol{x}_2] & \\dots & \\dots & \\mathrm{cov}[\\boldsymbol{x}_1,\\boldsymbol{x}_{p-1}]\\\\\n", + "\\mathrm{cov}[\\boldsymbol{x}_2,\\boldsymbol{x}_0] & \\mathrm{cov}[\\boldsymbol{x}_2,\\boldsymbol{x}_1] & \\mathrm{var}[\\boldsymbol{x}_2] & \\dots & \\dots & \\mathrm{cov}[\\boldsymbol{x}_2,\\boldsymbol{x}_{p-1}]\\\\\n", + "\\dots & \\dots & \\dots & \\dots & \\dots & \\dots \\\\\n", + "\\dots & \\dots & \\dots & \\dots & \\dots & \\dots \\\\\n", + "\\mathrm{cov}[\\boldsymbol{x}_{p-1},\\boldsymbol{x}_0] & \\mathrm{cov}[\\boldsymbol{x}_{p-1},\\boldsymbol{x}_1] & \\mathrm{cov}[\\boldsymbol{x}_{p-1},\\boldsymbol{x}_{2}] & \\dots & \\dots & \\mathrm{var}[\\boldsymbol{x}_{p-1}]\\\\\n", + "\\end{bmatrix},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "7d0f1648", + "metadata": { + "editable": true + }, + "source": [ + "and the correlation matrix" + ] + }, + { + "cell_type": "markdown", + "id": "d16ea5cf", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{K}[\\boldsymbol{x}] = \\begin{bmatrix}\n", + "1 & \\mathrm{corr}[\\boldsymbol{x}_0,\\boldsymbol{x}_1] & \\mathrm{corr}[\\boldsymbol{x}_0,\\boldsymbol{x}_2] & \\dots & \\dots & \\mathrm{corr}[\\boldsymbol{x}_0,\\boldsymbol{x}_{p-1}]\\\\\n", + "\\mathrm{corr}[\\boldsymbol{x}_1,\\boldsymbol{x}_0] & 1 & \\mathrm{corr}[\\boldsymbol{x}_1,\\boldsymbol{x}_2] & \\dots & \\dots & \\mathrm{corr}[\\boldsymbol{x}_1,\\boldsymbol{x}_{p-1}]\\\\\n", + "\\mathrm{corr}[\\boldsymbol{x}_2,\\boldsymbol{x}_0] & \\mathrm{corr}[\\boldsymbol{x}_2,\\boldsymbol{x}_1] & 1 & \\dots & \\dots & \\mathrm{corr}[\\boldsymbol{x}_2,\\boldsymbol{x}_{p-1}]\\\\\n", + "\\dots & \\dots & \\dots & \\dots & \\dots & \\dots \\\\\n", + "\\dots & \\dots & \\dots & \\dots & \\dots & \\dots \\\\\n", + "\\mathrm{corr}[\\boldsymbol{x}_{p-1},\\boldsymbol{x}_0] & \\mathrm{corr}[\\boldsymbol{x}_{p-1},\\boldsymbol{x}_1] & \\mathrm{corr}[\\boldsymbol{x}_{p-1},\\boldsymbol{x}_{2}] & \\dots & \\dots & 1\\\\\n", + "\\end{bmatrix},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "634130de", + "metadata": { + "editable": true + }, + "source": [ + "## Covariance Matrix Examples\n", + "\n", + "The Numpy function **np.cov** calculates the covariance elements using\n", + "the factor $1/(n-1)$ instead of $1/n$ since it assumes we do not have\n", + "the exact mean values. The following simple function uses the\n", + "**np.vstack** function which takes each vector of dimension $1\\times n$\n", + "and produces a $2\\times n$ matrix $\\boldsymbol{W}$\n", + "\n", + "Note that this assumes you have the features as the rows, and the inputs as columns, that is" + ] + }, + { + "cell_type": "markdown", + "id": "cecf6c09", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{W} = \\begin{bmatrix} x_0 & x_1 & x_2 & \\dots & x_{n-2} & x_{n-1} \\\\\n", + " y_0 & y_1 & y_2 & \\dots & y_{n-2} & y_{n-1} \\\\\n", + " \\end{bmatrix},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "1703b000", + "metadata": { + "editable": true + }, + "source": [ + "which in turn is converted into into the $2\\times 2$ covariance matrix\n", + "$\\boldsymbol{C}$ via the Numpy function **np.cov()**. We note that we can also calculate\n", + "the mean value of each set of samples $\\boldsymbol{x}$ etc using the Numpy\n", + "function **np.mean(x)**. We can also extract the eigenvalues of the\n", + "covariance matrix through the **np.linalg.eig()** function." + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "id": "5da5890f", + "metadata": { + "collapsed": false, + "editable": true + }, + "outputs": [], + "source": [ + "# Importing various packages\n", + "import numpy as np\n", + "n = 100\n", + "x = np.random.normal(size=n)\n", + "print(np.mean(x))\n", + "y = 4+3*x+np.random.normal(size=n)\n", + "print(np.mean(y))\n", + "W = np.vstack((x, y))\n", + "C = np.cov(W)\n", + "print(C)" + ] + }, + { + "cell_type": "markdown", + "id": "6b10b22a", + "metadata": { + "editable": true + }, + "source": [ + "## Correlation Matrix\n", + "\n", + "The previous example can be converted into the correlation matrix by\n", + "simply scaling the matrix elements with the variances. We should also\n", + "subtract the mean values for each column. This leads to the following\n", + "code which sets up the correlations matrix for the previous example in\n", + "a more brute force way. Here we scale the mean values for each column of the design matrix, calculate the relevant mean values and variances and then finally set up the $2\\times 2$ correlation matrix (since we have only two vectors)." + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "id": "da699527", + "metadata": { + "collapsed": false, + "editable": true + }, + "outputs": [], + "source": [ + "import numpy as np\n", + "n = 100\n", + "# define two vectors \n", + "x = np.random.random(size=n)\n", + "y = 4+3*x+np.random.normal(size=n)\n", + "#scaling the x and y vectors \n", + "x = x - np.mean(x)\n", + "y = y - np.mean(y)\n", + "variance_x = np.sum(x@x)/n\n", + "variance_y = np.sum(y@y)/n\n", + "print(variance_x)\n", + "print(variance_y)\n", + "cov_xy = np.sum(x@y)/n\n", + "cov_xx = np.sum(x@x)/n\n", + "cov_yy = np.sum(y@y)/n\n", + "C = np.zeros((2,2))\n", + "C[0,0]= cov_xx/variance_x\n", + "C[1,1]= cov_yy/variance_y\n", + "C[0,1]= cov_xy/np.sqrt(variance_y*variance_x)\n", + "C[1,0]= C[0,1]\n", + "print(C)" + ] + }, + { + "cell_type": "markdown", + "id": "a40fb51e", + "metadata": { + "editable": true + }, + "source": [ + "We see that the matrix elements along the diagonal are one as they\n", + "should be and that the matrix is symmetric. Furthermore, diagonalizing\n", + "this matrix we easily see that it is a positive definite matrix.\n", + "\n", + "The above procedure with **numpy** can be made more compact if we use **pandas**." + ] + }, + { + "cell_type": "markdown", + "id": "413db31e", + "metadata": { + "editable": true + }, + "source": [ + "## Correlation Matrix with Pandas\n", + "\n", + "We whow here how we can set up the correlation matrix using **pandas**, as done in this simple code" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "id": "53927e5d", + "metadata": { + "collapsed": false, + "editable": true + }, + "outputs": [], + "source": [ + "import numpy as np\n", + "import pandas as pd\n", + "n = 10\n", + "x = np.random.normal(size=n)\n", + "x = x - np.mean(x)\n", + "y = 4+3*x+np.random.normal(size=n)\n", + "y = y - np.mean(y)\n", + "# Note that we transpose the matrix in order to stay with our ordering n x p\n", + "X = (np.vstack((x, y))).T\n", + "print(X)\n", + "Xpd = pd.DataFrame(X)\n", + "print(Xpd)\n", + "correlation_matrix = Xpd.corr()\n", + "print(correlation_matrix)" + ] + }, + { + "cell_type": "markdown", + "id": "74fc3107", + "metadata": { + "editable": true + }, + "source": [ + "We expand this model to the Franke function discussed above." + ] + }, + { + "cell_type": "markdown", + "id": "030881ab", + "metadata": { + "editable": true + }, + "source": [ + "## Correlation Matrix with Pandas and the Franke function" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "id": "c107aa55", + "metadata": { + "collapsed": false, + "editable": true + }, + "outputs": [], + "source": [ + "# Common imports\n", + "import numpy as np\n", + "import pandas as pd\n", + "\n", + "\n", + "def FrankeFunction(x,y):\n", + "\tterm1 = 0.75*np.exp(-(0.25*(9*x-2)**2) - 0.25*((9*y-2)**2))\n", + "\tterm2 = 0.75*np.exp(-((9*x+1)**2)/49.0 - 0.1*(9*y+1))\n", + "\tterm3 = 0.5*np.exp(-(9*x-7)**2/4.0 - 0.25*((9*y-3)**2))\n", + "\tterm4 = -0.2*np.exp(-(9*x-4)**2 - (9*y-7)**2)\n", + "\treturn term1 + term2 + term3 + term4\n", + "\n", + "\n", + "def create_X(x, y, n ):\n", + "\tif len(x.shape) > 1:\n", + "\t\tx = np.ravel(x)\n", + "\t\ty = np.ravel(y)\n", + "\n", + "\tN = len(x)\n", + "\tl = int((n+1)*(n+2)/2)\t\t# Number of elements in beta\n", + "\tX = np.ones((N,l))\n", + "\n", + "\tfor i in range(1,n+1):\n", + "\t\tq = int((i)*(i+1)/2)\n", + "\t\tfor k in range(i+1):\n", + "\t\t\tX[:,q+k] = (x**(i-k))*(y**k)\n", + "\n", + "\treturn X\n", + "\n", + "\n", + "# Making meshgrid of datapoints and compute Franke's function\n", + "n = 4\n", + "N = 100\n", + "x = np.sort(np.random.uniform(0, 1, N))\n", + "y = np.sort(np.random.uniform(0, 1, N))\n", + "z = FrankeFunction(x, y)\n", + "X = create_X(x, y, n=n) \n", + "\n", + "Xpd = pd.DataFrame(X)\n", + "# subtract the mean values and set up the covariance matrix\n", + "Xpd = Xpd - Xpd.mean()\n", + "covariance_matrix = Xpd.cov()\n", + "print(covariance_matrix)" + ] + }, + { + "cell_type": "markdown", + "id": "3f47378e", + "metadata": { + "editable": true + }, + "source": [ + "We note here that the covariance is zero for the first rows and\n", + "columns since all matrix elements in the design matrix were set to one\n", + "(we are fitting the function in terms of a polynomial of degree $n$).\n", + "\n", + "This means that the variance for these elements will be zero and will\n", + "cause problems when we set up the correlation matrix. We can simply\n", + "drop these elements and construct a correlation\n", + "matrix without these elements." + ] + }, + { + "cell_type": "markdown", + "id": "dba29ab3", + "metadata": { + "editable": true + }, + "source": [ + "## Rewriting the Covariance and/or Correlation Matrix\n", + "\n", + "We can rewrite the covariance matrix in a more compact form in terms of the design/feature matrix $\\boldsymbol{X}$ as" + ] + }, + { + "cell_type": "markdown", + "id": "0eb702bd", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{C}[\\boldsymbol{x}] = \\frac{1}{n}\\boldsymbol{X}^T\\boldsymbol{X}= \\mathbb{E}[\\boldsymbol{X}^T\\boldsymbol{X}].\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "1d355153", + "metadata": { + "editable": true + }, + "source": [ + "To see this let us simply look at a design matrix $\\boldsymbol{X}\\in {\\mathbb{R}}^{2\\times 2}$" + ] + }, + { + "cell_type": "markdown", + "id": "a2316749", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{X}=\\begin{bmatrix}\n", + "x_{00} & x_{01}\\\\\n", + "x_{10} & x_{11}\\\\\n", + "\\end{bmatrix}=\\begin{bmatrix}\n", + "\\boldsymbol{x}_{0} & \\boldsymbol{x}_{1}\\\\\n", + "\\end{bmatrix}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "8f6a654b", + "metadata": { + "editable": true + }, + "source": [ + "If we then compute the expectation value (note the $1/n$ factor instead of $1/(n-1)$)" + ] + }, + { + "cell_type": "markdown", + "id": "72291085", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\mathbb{E}[\\boldsymbol{X}^T\\boldsymbol{X}] = \\frac{1}{n}\\boldsymbol{X}^T\\boldsymbol{X}=\\frac{1}{n}\\begin{bmatrix}\n", + "x_{00}^2+x_{10}^2 & x_{00}x_{01}+x_{10}x_{11}\\\\\n", + "x_{01}x_{00}+x_{11}x_{10} & x_{01}^2+x_{11}^2\\\\\n", + "\\end{bmatrix},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "2b28a5fe", + "metadata": { + "editable": true + }, + "source": [ + "which is just" + ] + }, + { + "cell_type": "markdown", + "id": "49efe427", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{C}[\\boldsymbol{x}_0,\\boldsymbol{x}_1] = \\boldsymbol{C}[\\boldsymbol{x}]=\\begin{bmatrix} \\mathrm{var}[\\boldsymbol{x}_0] & \\mathrm{cov}[\\boldsymbol{x}_0,\\boldsymbol{x}_1] \\\\\n", + " \\mathrm{cov}[\\boldsymbol{x}_1,\\boldsymbol{x}_0] & \\mathrm{var}[\\boldsymbol{x}_1] \\\\\n", + " \\end{bmatrix},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "7edcb842", + "metadata": { + "editable": true + }, + "source": [ + "where we wrote $$\\boldsymbol{C}[\\boldsymbol{x}_0,\\boldsymbol{x}_1] = \\boldsymbol{C}[\\boldsymbol{x}]$$ to indicate that this is the covariance of the vectors $\\boldsymbol{x}$ of the design/feature matrix $\\boldsymbol{X}$.\n", + "\n", + "It is easy to generalize this to a matrix $\\boldsymbol{X}\\in {\\mathbb{R}}^{n\\times p}$." + ] + }, + { + "cell_type": "markdown", + "id": "50ec44da", + "metadata": { + "editable": true + }, + "source": [ + "## Linking with the SVD\n", + "\n", + "We saw earlier that" + ] + }, + { + "cell_type": "markdown", + "id": "f4010e4a", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{X}^T\\boldsymbol{X}=\\boldsymbol{V}\\boldsymbol{\\Sigma}^T\\boldsymbol{U}^T\\boldsymbol{U}\\boldsymbol{\\Sigma}\\boldsymbol{V}^T=\\boldsymbol{V}\\boldsymbol{\\Sigma}^T\\boldsymbol{\\Sigma}\\boldsymbol{V}^T.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "c0e95eb2", + "metadata": { + "editable": true + }, + "source": [ + "Since the matrices here have dimension $p\\times p$, with $p$ corresponding to the singular values, we defined earlier the matrix" + ] + }, + { + "cell_type": "markdown", + "id": "46abefce", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{\\Sigma}^T\\boldsymbol{\\Sigma} = \\begin{bmatrix} \\tilde{\\boldsymbol{\\Sigma}} & \\boldsymbol{0}\\\\ \\end{bmatrix}\\begin{bmatrix} \\tilde{\\boldsymbol{\\Sigma}} \\\\ \\boldsymbol{0}\\\\ \\end{bmatrix},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "30544899", + "metadata": { + "editable": true + }, + "source": [ + "where the tilde-matrix $\\tilde{\\boldsymbol{\\Sigma}}$ is a matrix of dimension $p\\times p$ containing only the singular values $\\sigma_i$, that is" + ] + }, + { + "cell_type": "markdown", + "id": "feaeedbe", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\tilde{\\boldsymbol{\\Sigma}}=\\begin{bmatrix} \\sigma_0 & 0 & 0 & \\dots & 0 & 0 \\\\\n", + " 0 & \\sigma_1 & 0 & \\dots & 0 & 0 \\\\\n", + "\t\t\t\t 0 & 0 & \\sigma_2 & \\dots & 0 & 0 \\\\\n", + "\t\t\t\t 0 & 0 & 0 & \\dots & \\sigma_{p-2} & 0 \\\\\n", + "\t\t\t\t 0 & 0 & 0 & \\dots & 0 & \\sigma_{p-1} \\\\\n", + "\\end{bmatrix},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "3a2c0f0e", + "metadata": { + "editable": true + }, + "source": [ + "meaning we can write" + ] + }, + { + "cell_type": "markdown", + "id": "dc33d7ee", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{X}^T\\boldsymbol{X}=\\boldsymbol{V}\\tilde{\\boldsymbol{\\Sigma}}^2\\boldsymbol{V}^T.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "0ffb1c46", + "metadata": { + "editable": true + }, + "source": [ + "Multiplying from the right with $\\boldsymbol{V}$ (using the orthogonality of $\\boldsymbol{V}$) we get" + ] + }, + { + "cell_type": "markdown", + "id": "6cf92025", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\left(\\boldsymbol{X}^T\\boldsymbol{X}\\right)\\boldsymbol{V}=\\boldsymbol{V}\\tilde{\\boldsymbol{\\Sigma}}^2.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "c21c0c0a", + "metadata": { + "editable": true + }, + "source": [ + "## What does it mean?\n", + "\n", + "This means the vectors $\\boldsymbol{v}_i$ of the orthogonal matrix $\\boldsymbol{V}$\n", + "are the eigenvectors of the matrix $\\boldsymbol{X}^T\\boldsymbol{X}$ with eigenvalues\n", + "given by the singular values squared, that is" + ] + }, + { + "cell_type": "markdown", + "id": "48dbf778", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\left(\\boldsymbol{X}^T\\boldsymbol{X}\\right)\\boldsymbol{v}_i=\\boldsymbol{v}_i\\sigma_i^2.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "3f8f57cc", + "metadata": { + "editable": true + }, + "source": [ + "In other words, each non-zero singular value of $\\boldsymbol{X}$ is a positive\n", + "square root of an eigenvalue of $\\boldsymbol{X}^T\\boldsymbol{X}$. It means also that\n", + "the columns of $\\boldsymbol{V}$ are the eigenvectors of\n", + "$\\boldsymbol{X}^T\\boldsymbol{X}$. Since we have ordered the singular values of\n", + "$\\boldsymbol{X}$ in a descending order, it means that the column vectors\n", + "$\\boldsymbol{v}_i$ are hierarchically ordered by how much correlation they\n", + "encode from the columns of $\\boldsymbol{X}$. \n", + "\n", + "Note that these are also the eigenvectors and eigenvalues of the\n", + "Hessian matrix.\n", + "\n", + "If we now recall the definition of the covariance matrix (not using\n", + "Bessel's correction) we have" + ] + }, + { + "cell_type": "markdown", + "id": "199ea962", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{C}[\\boldsymbol{X}]=\\frac{1}{n}\\boldsymbol{X}^T\\boldsymbol{X},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "f5433e15", + "metadata": { + "editable": true + }, + "source": [ + "meaning that every squared non-singular value of $\\boldsymbol{X}$ divided by $n$ (\n", + "the number of samples) are the eigenvalues of the covariance\n", + "matrix. Every singular value of $\\boldsymbol{X}$ is thus a positive square\n", + "root of an eigenvalue of $\\boldsymbol{X}^T\\boldsymbol{X}$. If the matrix $\\boldsymbol{X}$ is\n", + "self-adjoint, the singular values of $\\boldsymbol{X}$ are equal to the\n", + "absolute value of the eigenvalues of $\\boldsymbol{X}$." + ] + }, + { + "cell_type": "markdown", + "id": "ce1511d3", + "metadata": { + "editable": true + }, + "source": [ + "## And finally $\\boldsymbol{X}\\boldsymbol{X}^T$\n", + "\n", + "For $\\boldsymbol{X}\\boldsymbol{X}^T$ we found" + ] + }, + { + "cell_type": "markdown", + "id": "31981527", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{X}\\boldsymbol{X}^T=\\boldsymbol{U}\\boldsymbol{\\Sigma}\\boldsymbol{V}^T\\boldsymbol{V}\\boldsymbol{\\Sigma}^T\\boldsymbol{U}^T=\\boldsymbol{U}\\boldsymbol{\\Sigma}^T\\boldsymbol{\\Sigma}\\boldsymbol{U}^T.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "ccb547be", + "metadata": { + "editable": true + }, + "source": [ + "Since the matrices here have dimension $n\\times n$, we have" + ] + }, + { + "cell_type": "markdown", + "id": "c9a6f756", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{\\Sigma}\\boldsymbol{\\Sigma}^T = \\begin{bmatrix} \\tilde{\\boldsymbol{\\Sigma}} \\\\ \\boldsymbol{0}\\\\ \\end{bmatrix}\\begin{bmatrix} \\tilde{\\boldsymbol{\\Sigma}} \\boldsymbol{0}\\\\ \\end{bmatrix}=\\begin{bmatrix} \\tilde{\\boldsymbol{\\Sigma}} & \\boldsymbol{0} \\\\ \\boldsymbol{0} & \\boldsymbol{0}\\\\ \\end{bmatrix},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "272b8d77", + "metadata": { + "editable": true + }, + "source": [ + "leading to" + ] + }, + { + "cell_type": "markdown", + "id": "4596a399", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{X}\\boldsymbol{X}^T=\\boldsymbol{U}\\begin{bmatrix} \\tilde{\\boldsymbol{\\Sigma}} & \\boldsymbol{0} \\\\ \\boldsymbol{0} & \\boldsymbol{0}\\\\ \\end{bmatrix}\\boldsymbol{U}^T.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "e15dedbf", + "metadata": { + "editable": true + }, + "source": [ + "Multiplying with $\\boldsymbol{U}$ from the right gives us the eigenvalue problem" + ] + }, + { + "cell_type": "markdown", + "id": "fe9dab27", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "(\\boldsymbol{X}\\boldsymbol{X}^T)\\boldsymbol{U}=\\boldsymbol{U}\\begin{bmatrix} \\tilde{\\boldsymbol{\\Sigma}} & \\boldsymbol{0} \\\\ \\boldsymbol{0} & \\boldsymbol{0}\\\\ \\end{bmatrix}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "894497fb", + "metadata": { + "editable": true + }, + "source": [ + "It means that the eigenvalues of $\\boldsymbol{X}\\boldsymbol{X}^T$ are again given by\n", + "the non-zero singular values plus now a series of zeros. The column\n", + "vectors of $\\boldsymbol{U}$ are the eigenvectors of $\\boldsymbol{X}\\boldsymbol{X}^T$ and\n", + "measure how much correlations are contained in the rows of $\\boldsymbol{X}$.\n", + "\n", + "Since we will mainly be interested in the correlations among the features\n", + "of our data (the columns of $\\boldsymbol{X}$, the quantity of interest for us are the non-zero singular\n", + "values and the column vectors of $\\boldsymbol{V}$." + ] + }, + { + "cell_type": "markdown", + "id": "843092e6", + "metadata": { + "editable": true + }, + "source": [ + "## Ridge and LASSO Regression\n", + "\n", + "Let us remind ourselves about the expression for the standard Mean Squared Error (MSE) which we used to define our cost function and the equations for the ordinary least squares (OLS) method, that is \n", + "our optimization problem is" + ] + }, + { + "cell_type": "markdown", + "id": "4af49ad4", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "{\\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\\}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "ed536a1b", + "metadata": { + "editable": true + }, + "source": [ + "or we can state it as" + ] + }, + { + "cell_type": "markdown", + "id": "9e199dbf", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "{\\displaystyle \\min_{\\boldsymbol{\\beta}\\in\n", + "{\\mathbb{R}}^{p}}}\\frac{1}{n}\\sum_{i=0}^{n-1}\\left(y_i-\\tilde{y}_i\\right)^2=\\frac{1}{n}\\vert\\vert \\boldsymbol{y}-\\boldsymbol{X}\\boldsymbol{\\beta}\\vert\\vert_2^2,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "29d15cda", + "metadata": { + "editable": true + }, + "source": [ + "where we have used the definition of a norm-2 vector, that is" + ] + }, + { + "cell_type": "markdown", + "id": "a9b91956", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\vert\\vert \\boldsymbol{x}\\vert\\vert_2 = \\sqrt{\\sum_i x_i^2}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "f21d533a", + "metadata": { + "editable": true + }, + "source": [ + "By minimizing the above equation with respect to the parameters\n", + "$\\boldsymbol{\\beta}$ we could then obtain an analytical expression for the\n", + "parameters $\\boldsymbol{\\beta}$. We can add a regularization parameter $\\lambda$ by\n", + "defining a new cost function to be optimized, that is" + ] + }, + { + "cell_type": "markdown", + "id": "4f218703", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "{\\displaystyle \\min_{\\boldsymbol{\\beta}\\in\n", + "{\\mathbb{R}}^{p}}}\\frac{1}{n}\\vert\\vert \\boldsymbol{y}-\\boldsymbol{X}\\boldsymbol{\\beta}\\vert\\vert_2^2+\\lambda\\vert\\vert \\boldsymbol{\\beta}\\vert\\vert_2^2\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "6bc40dcd", + "metadata": { + "editable": true + }, + "source": [ + "which leads to the Ridge regression minimization problem where we\n", + "require that $\\vert\\vert \\boldsymbol{\\beta}\\vert\\vert_2^2\\le t$, where $t$ is\n", + "a finite number larger than zero. By defining" + ] + }, + { + "cell_type": "markdown", + "id": "fb27a2e6", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "C(\\boldsymbol{X},\\boldsymbol{\\beta})=\\frac{1}{n}\\vert\\vert \\boldsymbol{y}-\\boldsymbol{X}\\boldsymbol{\\beta}\\vert\\vert_2^2+\\lambda\\vert\\vert \\boldsymbol{\\beta}\\vert\\vert_1,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "d285f7c7", + "metadata": { + "editable": true + }, + "source": [ + "we have a new optimization equation" + ] + }, + { + "cell_type": "markdown", + "id": "57eb55da", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "{\\displaystyle \\min_{\\boldsymbol{\\beta}\\in\n", + "{\\mathbb{R}}^{p}}}\\frac{1}{n}\\vert\\vert \\boldsymbol{y}-\\boldsymbol{X}\\boldsymbol{\\beta}\\vert\\vert_2^2+\\lambda\\vert\\vert \\boldsymbol{\\beta}\\vert\\vert_1\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "94f2f142", + "metadata": { + "editable": true + }, + "source": [ + "which leads to Lasso regression. Lasso stands for least absolute shrinkage and selection operator. \n", + "\n", + "Here we have defined the norm-1 as" + ] + }, + { + "cell_type": "markdown", + "id": "602c806b", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\vert\\vert \\boldsymbol{x}\\vert\\vert_1 = \\sum_i \\vert x_i\\vert.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "c01a7be8", + "metadata": { + "editable": true + }, + "source": [ + "## Deriving the Ridge Regression Equations\n", + "\n", + "Using the matrix-vector expression for Ridge regression and dropping the parameter $1/n$ in front of the standard means squared error equation, we have" + ] + }, + { + "cell_type": "markdown", + "id": "6bbd89f5", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "C(\\boldsymbol{X},\\boldsymbol{\\beta})=\\left\\{(\\boldsymbol{y}-\\boldsymbol{X}\\boldsymbol{\\beta})^T(\\boldsymbol{y}-\\boldsymbol{X}\\boldsymbol{\\beta})\\right\\}+\\lambda\\boldsymbol{\\beta}^T\\boldsymbol{\\beta},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "d5507c15", + "metadata": { + "editable": true + }, + "source": [ + "and \n", + "taking the derivatives with respect to $\\boldsymbol{\\beta}$ we obtain then\n", + "a slightly modified matrix inversion problem which for finite values\n", + "of $\\lambda$ does not suffer from singularity problems. We obtain\n", + "the optimal parameters" + ] + }, + { + "cell_type": "markdown", + "id": "d5eb5c88", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\hat{\\boldsymbol{\\beta}}_{\\mathrm{Ridge}} = \\left(\\boldsymbol{X}^T\\boldsymbol{X}+\\lambda\\boldsymbol{I}\\right)^{-1}\\boldsymbol{X}^T\\boldsymbol{y},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "d59c7c4d", + "metadata": { + "editable": true + }, + "source": [ + "with $\\boldsymbol{I}$ being a $p\\times p$ identity matrix with the constraint that" + ] + }, + { + "cell_type": "markdown", + "id": "81d0dd7f", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\sum_{i=0}^{p-1} \\beta_i^2 \\leq t,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "6807c376", + "metadata": { + "editable": true + }, + "source": [ + "with $t$ a finite positive number. \n", + "\n", + "If we keep the $1/n$ factor, the equation for the optimal $\\beta$ changes to" + ] + }, + { + "cell_type": "markdown", + "id": "89c94248", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\hat{\\boldsymbol{\\beta}}_{\\mathrm{Ridge}} = \\left(\\boldsymbol{X}^T\\boldsymbol{X}+n\\lambda\\boldsymbol{I}\\right)^{-1}\\boldsymbol{X}^T\\boldsymbol{y}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "24f4e74f", + "metadata": { + "editable": true + }, + "source": [ + "In many textbooks the $1/n$ term is often omitted. Note that a library like **Scikit-Learn** does not include the $1/n$ factor in the setup of the cost function.\n", + "\n", + "When we compare this with the ordinary least squares result we have" + ] + }, + { + "cell_type": "markdown", + "id": "eac49311", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\hat{\\boldsymbol{\\beta}}_{\\mathrm{OLS}} = \\left(\\boldsymbol{X}^T\\boldsymbol{X}\\right)^{-1}\\boldsymbol{X}^T\\boldsymbol{y},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "8ad4bc0d", + "metadata": { + "editable": true + }, + "source": [ + "which can lead to singular matrices. However, with the SVD, we can always compute the inverse of the matrix $\\boldsymbol{X}^T\\boldsymbol{X}$.\n", + "\n", + "We see that Ridge regression is nothing but the standard OLS with a\n", + "modified diagonal term added to $\\boldsymbol{X}^T\\boldsymbol{X}$. The consequences, in\n", + "particular for our discussion of the bias-variance tradeoff are rather\n", + "interesting. We will see that for specific values of $\\lambda$, we may\n", + "even reduce the variance of the optimal parameters $\\boldsymbol{\\beta}$. These topics and other related ones, will be discussed after the more linear algebra oriented analysis here.\n", + "\n", + "Using our insights about the SVD of the design matrix $\\boldsymbol{X}$ \n", + "We have already analyzed the OLS solutions in terms of the eigenvectors (the columns) of the right singular value matrix $\\boldsymbol{U}$ as" + ] + }, + { + "cell_type": "markdown", + "id": "af4dd7e2", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\tilde{\\boldsymbol{y}}_{\\mathrm{OLS}}=\\boldsymbol{X}\\boldsymbol{\\beta} =\\boldsymbol{U}\\boldsymbol{U}^T\\boldsymbol{y}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "92b983c6", + "metadata": { + "editable": true + }, + "source": [ + "For Ridge regression this becomes" + ] + }, + { + "cell_type": "markdown", + "id": "f9d22662", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\tilde{\\boldsymbol{y}}_{\\mathrm{Ridge}}=\\boldsymbol{X}\\boldsymbol{\\beta}_{\\mathrm{Ridge}} = \\boldsymbol{U\\Sigma V^T}\\left(\\boldsymbol{V}\\boldsymbol{\\Sigma}^2\\boldsymbol{V}^T+\\lambda\\boldsymbol{I} \\right)^{-1}(\\boldsymbol{U\\Sigma V^T})^T\\boldsymbol{y}=\\sum_{j=0}^{p-1}\\boldsymbol{u}_j\\boldsymbol{u}_j^T\\frac{\\sigma_j^2}{\\sigma_j^2+\\lambda}\\boldsymbol{y},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "0097f163", + "metadata": { + "editable": true + }, + "source": [ + "with the vectors $\\boldsymbol{u}_j$ being the columns of $\\boldsymbol{U}$ from the SVD of the matrix $\\boldsymbol{X}$." + ] + }, + { + "cell_type": "markdown", + "id": "073824a0", + "metadata": { + "editable": true + }, + "source": [ + "## Interpreting the Ridge results\n", + "\n", + "Since $\\lambda \\geq 0$, it means that compared to OLS, we have" + ] + }, + { + "cell_type": "markdown", + "id": "399bdc1b", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\frac{\\sigma_j^2}{\\sigma_j^2+\\lambda} \\leq 1.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "d9d9fa7a", + "metadata": { + "editable": true + }, + "source": [ + "Ridge regression finds the coordinates of $\\boldsymbol{y}$ with respect to the\n", + "orthonormal basis $\\boldsymbol{U}$, it then shrinks the coordinates by\n", + "$\\frac{\\sigma_j^2}{\\sigma_j^2+\\lambda}$. Recall that the SVD has\n", + "eigenvalues ordered in a descending way, that is $\\sigma_i \\geq\n", + "\\sigma_{i+1}$.\n", + "\n", + "For small eigenvalues $\\sigma_i$ it means that their contributions become less important, a fact which can be used to reduce the number of degrees of freedom. More about this when we have covered the material on a statistical interpretation of various linear regression methods." + ] + }, + { + "cell_type": "markdown", + "id": "40b2c49b", + "metadata": { + "editable": true + }, + "source": [ + "## More interpretations\n", + "\n", + "For the sake of simplicity, let us assume that the design matrix is orthonormal, that is" + ] + }, + { + "cell_type": "markdown", + "id": "6e949d98", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{X}^T\\boldsymbol{X}=(\\boldsymbol{X}^T\\boldsymbol{X})^{-1} =\\boldsymbol{I}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "5a004c53", + "metadata": { + "editable": true + }, + "source": [ + "In this case the standard OLS results in" + ] + }, + { + "cell_type": "markdown", + "id": "64e1d6bb", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{\\beta}^{\\mathrm{OLS}} = \\boldsymbol{X}^T\\boldsymbol{y}=\\sum_{i=0}^{n-1}\\boldsymbol{u}_i\\boldsymbol{u}_i^T\\boldsymbol{y},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "5cec9b54", + "metadata": { + "editable": true + }, + "source": [ + "and" + ] + }, + { + "cell_type": "markdown", + "id": "71516f90", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{\\beta}^{\\mathrm{Ridge}} = \\left(\\boldsymbol{I}+\\lambda\\boldsymbol{I}\\right)^{-1}\\boldsymbol{X}^T\\boldsymbol{y}=\\left(1+\\lambda\\right)^{-1}\\boldsymbol{\\beta}^{\\mathrm{OLS}},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "50e288e9", + "metadata": { + "editable": true + }, + "source": [ + "that is the Ridge estimator scales the OLS estimator by the inverse of a factor $1+\\lambda$, and\n", + "the Ridge estimator converges to zero when the hyperparameter goes to\n", + "infinity.\n", + "\n", + "We will come back to more interpreations after we have gone through some of the statistical analysis part. \n", + "\n", + "For more discussions of Ridge and Lasso regression, [Wessel van Wieringen's](https://arxiv.org/abs/1509.09169) article is highly recommended.\n", + "Similarly, [Mehta et al's article](https://arxiv.org/abs/1803.08823) is also recommended." + ] + }, + { + "cell_type": "markdown", + "id": "6c82431c", + "metadata": { + "editable": true + }, + "source": [ + "## Deriving the Lasso Regression Equations\n", + "\n", + "Using the matrix-vector expression for Lasso regression and dropping the parameter $1/n$ in front of the standard means squared error equation, we have the following **cost** function" + ] + }, + { + "cell_type": "markdown", + "id": "5ebc1428", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "C(\\boldsymbol{X},\\boldsymbol{\\beta})=\\left\\{(\\boldsymbol{y}-\\boldsymbol{X}\\boldsymbol{\\beta})^T(\\boldsymbol{y}-\\boldsymbol{X}\\boldsymbol{\\beta})\\right\\}+\\lambda\\vert\\vert\\boldsymbol{\\beta}\\vert\\vert_1,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "8f198345", + "metadata": { + "editable": true + }, + "source": [ + "Taking the derivative with respect to $\\boldsymbol{\\beta}$ and recalling that the derivative of the absolute value is (we drop the boldfaced vector symbol for simplicty)" + ] + }, + { + "cell_type": "markdown", + "id": "443b3080", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\frac{d \\vert \\beta\\vert}{d \\boldsymbol{\\beta}}=\\mathrm{sgn}(\\boldsymbol{\\beta})=\\left\\{\\begin{array}{cc} 1 & \\beta > 0 \\\\-1 & \\beta < 0, \\end{array}\\right.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "e11ec4ea", + "metadata": { + "editable": true + }, + "source": [ + "we have that the derivative of the cost function is" + ] + }, + { + "cell_type": "markdown", + "id": "1d640caa", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\frac{\\partial C(\\boldsymbol{X},\\boldsymbol{\\beta})}{\\partial \\boldsymbol{\\beta}}=-2\\boldsymbol{X}^T(\\boldsymbol{y}-\\boldsymbol{X}\\boldsymbol{\\beta})+\\lambda sgn(\\boldsymbol{\\beta})=0,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "e023f076", + "metadata": { + "editable": true + }, + "source": [ + "and reordering we have" + ] + }, + { + "cell_type": "markdown", + "id": "a4204b50", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{X}^T\\boldsymbol{X}\\boldsymbol{\\beta}+\\lambda sgn(\\boldsymbol{\\beta})=2\\boldsymbol{X}^T\\boldsymbol{y}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "7c9cc257", + "metadata": { + "editable": true + }, + "source": [ + "This equation does not lead to a nice analytical equation as in either Ridge regression or ordinary least squares. This equation can however be solved by using standard convex optimization algorithms using for example the Python package [CVXOPT](https://cvxopt.org/). We will discuss this later." + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/doc/LectureNotes/_build/html/exercisesweek35.html b/doc/LectureNotes/_build/html/exercisesweek35.html new file mode 100644 index 000000000..5e4a1c58b --- /dev/null +++ b/doc/LectureNotes/_build/html/exercisesweek35.html @@ -0,0 +1,588 @@ + + + + + + + + Exercises week 35 — Applied Data Analysis and Machine Learning + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + \ No newline at end of file diff --git a/doc/LectureNotes/_build/html/genindex.html b/doc/LectureNotes/_build/html/genindex.html index 223b8f408..cf956a62a 100644 --- a/doc/LectureNotes/_build/html/genindex.html +++ b/doc/LectureNotes/_build/html/genindex.html @@ -254,6 +254,16 @@ const thebe_selector_output = ".output, .cell_output" 20. Week 34: Introduction to the course, Logistics and Practicalities +
  • + + Exercises week 35 + +
  • +
  • + + Week 35: From Ordinary Linear Regression to Ridge and Lasso Regression + +
  • diff --git a/doc/LectureNotes/_build/html/intro.html b/doc/LectureNotes/_build/html/intro.html index d0110bbf8..d4a5cbbb2 100644 --- a/doc/LectureNotes/_build/html/intro.html +++ b/doc/LectureNotes/_build/html/intro.html @@ -255,6 +255,16 @@ const thebe_selector_output = ".output, .cell_output" 20. Week 34: Introduction to the course, Logistics and Practicalities +
  • + + Exercises week 35 + +
  • +
  • + + Week 35: From Ordinary Linear Regression to Ridge and Lasso Regression + +
  • diff --git a/doc/LectureNotes/_build/html/objects.inv b/doc/LectureNotes/_build/html/objects.inv index 0425e98d32bbe6589001340cb5f5133546600b6d..342e1000ccea02cbf3ab8bc134f302ce54a182da 100644 GIT binary patch delta 802 zcmV+-1Ks@T28#!fc7NMa+b|G)_gCy=I}h=~LpB&)KuPXXUJ9jX`w;+T^obW^ix>S%`fqOmD-7`#M3{%hWfLW`oAP^oc0(u7b z8&phXrPaORxb662f`Xn0o)-vA9>wPf#b-}( zB{bHn3cI>zaIIubwtFNJ3O^Au7)d(C&OK9N!eqgj$<+nzAXevg1v1&x~at4^}2)kJNh!-Rb_ zEY<5E73g;s_9}L^@PlCasR5jrKzN~w%b@U>wgkfB^vF%k2UyMxNZFTk`c_Gq<&}RT?M#)$L_070X;T+;9y1 g=^GpVbjY8Ed-7gU0gU?c<}+_ozVl7`3q=y`5%0i`761SM delta 767 zcmVnm_KXg3A&Z+#(imtMr!X0v@o{Owb>@ReIf1CG$rC&q{0@(|>}$zM@8HIT76aYMCW5 z24Kr=1q;Lm?ntPlt3B;;iuO3rUMsm#qID!*&`_7@8KxE3YMc6=#8QO^@EN(3egxMRksM8i{BdMSq0jd1Di(N?PHD>zAjPU2)$$&KZC zBGqXEbsERfHh+!M7JguEm4{Kx>sR{XBU~v(Es*7e@MytS2;W){RImH3 zyhy0Hh<0a&`p64p#sMA8QgfN}hB>FzjgrnMbF$jbaDM|Ime=!-9q(m=_cHK4jE&VH zRAYI~fBOwcfQQF{=W!63czHSLanuc?S(0Seo;b^XkAR7iMos%wXSrw%QM>3cVIPf4 z^?u8B`MWf2gL=aaJpui8;u~t3JDM%xdO9-b-ccNJ7X%lD=}A^15f%96p@OYYIB*vY zsITtdjDJ&=YM8+X!i{-D8$-et%(C~e0VFu`I42G8B6YS&y5)+?xS(mg0@mx zzeP)}R&2!ux3swxD!ubvW?YCFo*<%G?b{^jS0a6GgB$yHaYshl{}u x7(cVWO*{1J&*0D*^_qNEw7FkV>Y3j;)oO#2{^1QWmYU_h8g4lm;twsevo@s@dGP=M diff --git a/doc/LectureNotes/_build/html/search.html b/doc/LectureNotes/_build/html/search.html index d7b79bba0..5152a17f6 100644 --- a/doc/LectureNotes/_build/html/search.html +++ b/doc/LectureNotes/_build/html/search.html @@ -260,6 +260,16 @@ const thebe_selector_output = ".output, .cell_output" 20. Week 34: Introduction to the course, Logistics and Practicalities +
  • + + Exercises week 35 + +
  • +
  • + + Week 35: From Ordinary Linear Regression to Ridge and Lasso Regression + +
  • diff --git a/doc/LectureNotes/_build/html/searchindex.js b/doc/LectureNotes/_build/html/searchindex.js index d94dacc6f..006a1e497 100644 --- a/doc/LectureNotes/_build/html/searchindex.js +++ b/doc/LectureNotes/_build/html/searchindex.js @@ -1 +1 @@ -Search.setIndex({docnames:["chapter1","chapter10","chapter11","chapter12","chapter13","chapter2","chapter3","chapter4","chapter5","chapter6","chapter7","chapter8","chapter9","chapteroptimization","clustering","exercisesweek34","intro","linalg","schedule","statistics","teachers","textbooks","week34"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":4,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":3,"sphinx.domains.rst":2,"sphinx.domains.std":2,"sphinx.ext.intersphinx":1,sphinx:56},filenames:["chapter1.ipynb","chapter10.ipynb","chapter11.ipynb","chapter12.ipynb","chapter13.ipynb","chapter2.ipynb","chapter3.ipynb","chapter4.ipynb","chapter5.ipynb","chapter6.ipynb","chapter7.ipynb","chapter8.ipynb","chapter9.ipynb","chapteroptimization.ipynb","clustering.ipynb","exercisesweek34.ipynb","intro.md","linalg.ipynb","schedule.md","statistics.ipynb","teachers.md","textbooks.md","week34.ipynb"],objects:{},objnames:{},objtypes:{},terms:{"0":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,17,19,20,22],"00":[0,1,5,6,11,22],"000":[1,3],"0000":[],"00000":11,"000000":[5,11,22],"00000000e":5,"000054":22,"0000e":[],"0001":1,"00010403373827253124":9,"000148":[],"00019998":5,"00024087":5,"00028369228101198006":[],"00029012":5,"0003043256065368937":[],"0003153514830957865":6,"00031535148309580783":6,"0003153514830958081":[],"0003153514830958126":[],"0003153514830958235":[],"00034944":5,"000417932":2,"00042089":5,"000464088":2,"00050694":5,"00058016":6,"000599":[],"00060705":6,"00060708":[],"00061058":5,"00062582":[],"00062595":6,"00066668":6,"00068734":6,"00068941":[],"00068946":6,"00069103":[],"00073541":5,"000755":11,"00075534":11,"00076495":6,"00076905":6,"00076919":[],"00076925":[],"0007698473260556325":6,"0007698473260556334":[],"0007698473260556339":[],"0007698473260556344":6,"00079123":[],"00079129":6,"00079130":[],"00079968":5,"00084705":6,"00084711":[],"00085883":[],"00085884":[],"00085889":6,"00087697":6,"00088573":5,"00092645":[],"00092646":[],"00092647":6,"00096314":5,"001":[1,2,8,13],"00100519":6,"0010479245355337968":[],"0010479245887943952":[],"0010479245926411787":6,"00105081":6,"00106677":5,"00107405":6,"00111756":6,"0011526":6,"00115999":5,"0011828302640124":[],"00118504":[],"00118508":6,"00118527":[],"001263":[],"00128479":5,"001323":6,"00137818":6,"00137823":[],"00137835":[],"00139705":5,"00149311":6,"00149956":6,"00152117":6,"00152188":17,"00154733":5,"00156376":6,"00156379":[],"00156382":[],"00168251":5,"00174276":6,"00175331":6,"00186347":5,"001880":5,"001988":[],"00198806":[],"00200":8,"00202624":5,"00202756":6,"00217499":6,"00224413":5,"00228741":[],"00228742":6,"00233155":[],"0023548":6,"002381316302584885":[],"002381316302584886":6,"0023813163025848865":6,"00242999":6,"00243186":6,"0024401":5,"00249435":6,"002526":[],"00266858":2,"00270244":5,"00274989":6,"00275135":[],"00289724":6,"00293838":5,"002948":[],"0030828":[],"003083":[],"003100":22,"00310113":2,"00312361":6,"00315593":6,"003215318065760509":[],"0032153180657605116":6,"0032153180657605125":[],"00323332":6,"0032542":5,"003301":6,"0033955154592040923":6,"003395515459204093":[],"0033955154592040944":[],"00353823":5,"00355118":17,"003620":22,"0036237":6,"0036367":6,"00369758":6,"003704":[],"003717":[],"003759":[],"003774":[],"003788":[],"0038335":6,"00390021":[],"003909404072811217":[],"003909404072811221":6,"003909404072811231":[],"00391839":5,"0039987":6,"004":5,"004091940707753925":6,"004091940707753948":[],"0040919407077539514":[],"00410387":6,"00410478":6,"004113634617443116":[],"0041136346174431284":[],"004113634617443131":6,"004113634617443135":[],"004113634617443139":6,"00411363461744314":6,"004113634617443141":[],"004113634617443147":6,"0041559863458613296":6,"004155986345861364":[],"004155986345861374":[],"00415763":[],"00424909":2,"00424967":6,"00426027":5,"00433417":11,"00440346":6,"00443743":6,"00445655":11,"004579219539673834":6,"004579219539673836":[],"00458878":6,"004610275230656182":6,"004610275230656187":[],"004610275230656294":[],"00462287":6,"00471782":5,"00472199":6,"00472512":6,"0049544":6,"004999999999999984":[],"00499999999999999":[],"004999999999999994":[],"004999999999999996":[],"005":[],"0050000000000000044":0,"005000000000000011":[],"00512927":5,"00517114":6,"00526348":6,"0053018":6,"00554552":6,"00556826":6,"0056799":5,"00577441":[],"00579953":6,"00588657":6,"00607783":6,"006162":6,"00617499":5,"00625843":22,"00630331":6,"00642221":6,"00660427":6,"00672607":6,"00673393":[],"00673407":6,"00676387":6,"0068011":6,"00683748":5,"00683964":6,"007012403613997257":[],"007024126888936694":[],"007024126888938144":6,"0070241268889382116":[],"00708794":22,"00719176":6,"00727646693":[0,22],"007315":22,"007334080205654388":22,"0074331":5,"00751823":[],"00759119":6,"00784393":6,"00803064":6,"0080866254785146":[],"00813803":6,"00817631":6,"00823002":5,"00827728":6,"00831018":6,"00834567":6,"00848904":6,"0086649156":[0,22],"008675369724975977":5,"008675369724976501":[],"008818897251043893":19,"00894639":5,"00905423":6,"009163470508352211":[],"009163470508352218":5,"009164545680330616":6,"00917248":6,"00934499":6,"009450756365829578":[],"0096208":6,"00990475":5,"00992331":6,"00996754":6,"009981":[],"00998135":[],"00it":[],"01":[0,1,2,5,6,9,11,13,21,22],"010018312644139205":[],"010018312644139219":6,"010018312644139347":[],"0100706":6,"01023891":[],"010239":[],"010331721306655144":[],"01033172130665515":[],"010331721306655165":6,"010516485576646504":6,"010516485576646513":[],"010516485576652856":[],"010530":[],"01053024":[],"01066519":6,"01076611":5,"010902":22,"0110":19,"0110407067093945":[],"01104071":[],"011076219011339788":[],"01107621901137465":[],"01107621901137467":6,"011225":2,"0113104":6,"01179792":6,"01191824":5,"01199624e":[],"012073649439965807":[],"012073649469946107":6,"012073649472576395":[],"01212754811385597":[],"01219292":6,"01223198":6,"01231917":6,"01257962":[],"012580":[],"012633802944855959":[],"01290947":6,"01295356":5,"013121573975499602":[],"013121573975499604":[],"01312157406137079":[],"013121574061370796":[],"013121574062587286":6,"01318643":6,"01347916":6,"01348565":6,"01367553":6,"01397146":6,"01405935":6,"01416528":6,"014209325470380275":[],"01433809":5,"014436800088896274":[],"014436800088896381":6,"014436800088969727":[],"01449782":6,"01458337":6,"014599964106338128":9,"0146081":6,"01463049":6,"01479194":22,"015072388895177088":[],"0150723888951771":6,"015072388895177109":[],"015072388895177157":6,"015072388895177239":[],"01509543":[],"01530715721129232":[],"01531845":6,"01538461538462":[],"01549377":6,"01551946":22,"01558197":5,"01591355407242949":[],"016285782696017055":[],"016285782696017142":6,"016285782696075054":[],"01633913":6,"01640891":6,"01655318":6,"016587414993037307":[],"016587414993045335":6,"016587414993045405":[],"01691985":6,"0169643":5,"01708781":6,"01708852":6,"01713366":6,"01724499":5,"01735584819559184":[],"017355848195591845":[],"01735584819559331":6,"017355848195593312":6,"017355848195593354":[],"01756972":[],"017665":5,"01799917e":[],"01817152":[],"018232":22,"01831036e":[],"01831130e":[],"01831200e":[],"01831207e":6,"01831251e":6,"01840062":13,"01852793":22,"01866537":6,"01869785e":[],"01873344":11,"01873869":5,"01898855":6,"01905883":6,"01908936":6,"019587":[],"01963611":6,"01969145":6,"01975416527168255":6,"019754165271682844":[],"01975416527179247":[],"01975848":6,"02":[0,4,6,7,12,22],"0202458":[],"020246":[],"02024962":6,"02054837e":6,"02068067":6,"02073509":5,"0209518407597062":[],"02098261":6,"02123176":6,"021250026482402":[],"02159270458799264":[],"021592704587992645":[],"021592704588021164":[],"021592704588021167":[],"021592704588021174":6,"021592704588021178":6,"02198702e":6,"02198703e":6,"022022882954618364":[],"022075":[],"02207532":[],"02208512":6,"02228115":6,"02229529":6,"02252765":5,"022556":[],"02255619":[],"02299949826036602":[],"022999498260366198":6,"0229994982603662":[],"02348765":6,"02354476":[],"023545":[],"02365049":6,"024023115996453476":[],"02408959":[],"0245528":6,"02492265":5,"02493054":[],"02498832":6,"02503753":6,"02511518":6,"02522069":6,"025709":11,"02586427":6,"0260906":6,"02625193":8,"02625928":[],"026408391362671896":[],"02642055e":[],"026605727637176654":[],"026605727637184554":6,"026605727637184558":6,"02660572763718461":[],"026605727637184613":[],"02697521163514974":[],"026986":[],"02698605":[],"02707227":5,"02723445":6,"027609773491022314":[],"02760977349102238":6,"027609773491022387":[],"027609773491022394":6,"027609773491022407":[],"02762405215108776":[],"02786488":[],"027865":[],"02857":4,"02917662":[],"029177":[],"02926396":[],"029483":5,"029613363972682966":[],"029733":22,"02976145":6,"02994311":5,"02f":6,"02it":[],"03":[1,6],"03032441e":6,"030407120354722424":[],"03056589":[],"030566":[],"030693":[],"03069324":[],"03071040e":[],"03076923076924":[],"03077640549":4,"03099776":5,"031":5,"03168642":19,"031846":[],"03184647":[],"03187339273559067":[],"03196357":6,"03251863":5,"03256632e":1,"03267527":6,"03278964":[],"032790":[],"03279636":6,"0330308045180234":[],"0330308045183163":[],"0330308045183219":6,"0330308045188872":6,"0330308045190182":[],"03308408":5,"03324117":22,"03326365":[],"033264":[],"033657685071527485":[],"033657685071527624":[],"03365768507152769":6,"03382304823545749":[],"034047":22,"03447512":6,"03523311":[],"03562355":6,"03568439":6,"03570747":[],"0358909447132981":[],"035909":22,"0359565":5,"03630548":6,"03707133":11,"037559":[],"03755944":[],"03761519":[],"03781367141738885":[],"03781367141738886":[],"037813671417388985":[],"03781367141738899":[],"03781367141738902":6,"03794112":[],"03807267":5,"038073":5,"03814292":6,"03815288":6,"038300":11,"03850557":[],"038506":[],"039039":5,"03981057":[],"0399676689527966":6,"0399676689527968":[],"0399676689527975":6,"04":[1,6,11],"040102":5,"04010697":6,"04063602":6,"041":[],"041148729430502":[],"041148729430523":6,"0411487294305246":[],"0411487294305746":[],"041148729430595":6,"04179719":[],"041797190646905":[],"04220758":6,"042708":[],"04279651270127165":[],"04284519":[],"043":[],"04315108":5,"0433816":[],"04346721":5,"04355837":6,"04362":[],"04368707":[],"0437499":2,"04389027":6,"043927769551648":[],"04413933503955871":[],"04423486":6,"044334":22,"0444119":[],"044613":6,"04483457":[],"04496448":22,"04537385":6,"04543942":6,"045603":[],"04566964":6,"0458":9,"04615384615386":[],"04621521":[],"04648335":5,"046491":[],"04649105":[],"0466":[],"04673082":11,"046731":11,"046785461905835435":11,"04683565":5,"047737":[],"04775904":[],"04784395":6,"04785727":[],"047953":[],"04818727730430286":6,"04818727730430296":[],"048187277304303056":[],"048653428302840175":[],"048762":[],"048818":[],"048920":22,"04892055":6,"04909093":6,"04912436":6,"04930820e":[],"049318":5,"049462":22,"0495569966278238":[],"0495569966278269":6,"0495569966278295":6,"0495569966278315":[],"049747":[],"049858":[],"049960":[],"04996008":[],"04it":[],"05":[1,4,6,13],"05009826":6,"05087958":[],"050910":[],"05100875":6,"051043":[],"051391":[],"051418":5,"051451":[],"051649":11,"051662":[],"0517473":5,"052206":[],"052227":5,"05227921801205679":6,"05227921801205691":[],"05227921801205692":[],"052279218012057004":[],"052330":[],"052372":[],"05255759":[],"052581":5,"05263":[],"05268304":17,"05290417684691035":[],"05302":[],"0536097":17,"05364854":8,"05367466":19,"053678":[],"05383795":6,"053849":5,"054182":[],"054305":[],"054335":[],"054340":5,"05434571":[],"054411":[],"05447415":6,"054491":[],"054582":[],"054585":[],"054650":[],"054774":[],"054785":[],"05483267":5,"05491655":22,"054963":[],"05505310046362":[],"05505310046363":2,"055137":[],"055153":[],"055302":[],"055320":[],"05533":[],"055337":5,"055344":[],"055369":5,"055676":22,"055684":[],"055859":[],"055958":[],"056127":5,"056131":5,"05614483":5,"056165":[],"056169":[],"05622775":22,"05623":[],"056233":[],"056235":[],"056468":[],"05648":[],"05651951":6,"056528":[],"05667":[],"057088709963182":[],"057163681553428394":[],"05716368155342902":6,"05716368155351588":[],"0572":[],"057469":[],"05756733":[],"057587":[],"057588":5,"057648":5,"057686":5,"05785343":6,"057877":[],"05789007":6,"057899":[],"05796251":6,"058033":[],"058035":[],"058038":[],"058040":[],"058058":[],"05807125":6,"058088":[],"05833369":22,"058343":5,"05834332":5,"058416":[],"05850532":17,"058585":[],"058596":[],"058663":5,"058715":[],"058732":5,"058740":[],"058816":[],"05883":[],"05884":[],"058890":[],"058948":[],"058955":[],"058957":[],"058974":[],"059013":[],"059180":[],"059272":[],"059278":[],"059294":[],"059378":[],"059437":[],"059601":[],"059783":[],"059795":[],"059824":[],"059933":[],"059952":5,"05999":[],"06":6,"060016":[],"060048":5,"060080":[],"060146":[],"060183":[],"06020587":6,"06021285":[],"060213":[],"060228":[],"060288":[],"060309":[],"060349":22,"06043581":6,"060502":[],"060507":[],"060550":[],"060649":[],"060655":[],"060781":[],"060841":[],"060863":5,"060875":[],"060963":[],"061025":[],"061028":[],"061048":[],"061054":5,"061133":5,"061144":[],"061149":[],"061188":[],"061209":5,"061272":5,"061297":[],"061308":[],"061321":[],"061359":5,"061390":[],"06150169":5,"061502":5,"061505":[],"061509":[],"061538":[],"061604":[],"06160438":[],"061646":[],"061679":22,"061685":[],"061701":[],"061716":[],"061725":[],"061745":[],"061765":[],"061821":[],"061898":[],"061917":[],"061923":[],"061966":5,"06200174":5,"062061":[],"062062":[],"062064":[],"06208238634231944":[],"062082386342319454":6,"06208238634231953":[],"062089":[],"062097":[],"062136":[],"062142":[],"062195":[],"062220":5,"062292565":4,"062294":[],"062305":[],"062333":5,"062370":5,"062391":[],"062409":[],"062411":[],"062435":[],"062451":[],"062498":[],"062517":[],"062534":[],"062551":[],"062563":[],"062640":[],"062665":[],"062676":[],"062706":[],"062719":11,"062773":[],"062777":[],"062827":[],"062834":[],"062874":[],"062881":[],"062884":[],"062888":[],"062983":[],"063014":[],"063024":[],"063052":[],"063078":[],"063084":11,"063125":[],"063173":[],"063192":[],"06319374":17,"063241":[],"063250":[],"063287":[],"063343":[],"063364":[],"063371":[],"063375":[],"063401":[],"063443":22,"063493":[],"063513":[],"063524":11,"063612":[],"063619":[],"063631":[],"063657":[],"063724":22,"063752":[],"063781":[],"063851":[],"063857":[],"063872":[],"063874":[],"06388888888888888":[],"063977":[],"063979":[],"064041":11,"064052":[],"064062":[],"064081":5,"064108":[],"064110":[],"064184":[],"064274":[],"064284":5,"064329":[],"064384":[],"064388":[],"064431":[],"06444":[],"064442":[],"064459":[],"064461":[],"064469":[],"064483":[],"06453579006728315":[],"06453579006728322":6,"064538":[],"064573":[],"064604":[],"064609":[],"064618":[],"064623":[],"064634":[],"064637":11,"064648":[],"064658":[],"064681":[],"064684":5,"064753":5,"064787":[],"064823":5,"064838":[],"064859":[],"064880":[],"064896":[],"06491736":6,"064918":[],"064931":[],"064937":[],"064964":[],"06497046":[],"064974":5,"065020":[],"065026":22,"065032":[],"065095":5,"065106":[],"065110":[],"065118":5,"065165":5,"065168":[],"065183":[],"065228":[],"065249":[],"065252":[],"065282":[],"065314":[],"065348":[],"065349":5,"06547790180152352":6,"06547790180152353":[],"06547790180152355":6,"06547790180152357":[],"06547790180152363":[],"065514":[],"065537":[],"065557":[],"065575":[],"065641":[],"065657":[],"065680":[],"065730":[],"065761":[],"065796":[],"065826":[],"065846":[],"065869":[],"065892":[],"065942":[],"065973":5,"065974":[],"065983":[],"06602663":[],"066051":[],"066056":[],"066064":[],"066093":[],"066110":[],"066189":5,"066194":[],"066220":[],"066223":[],"066228":[],"066241":[],"066270":5,"066284":5,"066309":[],"066340":[],"066348":[],"066356":[],"06637":[],"066388":[],"066449":[],"066528":[],"066553":[],"066558":[],"066569":5,"066580":[],"066590":[],"066609":[],"06662062":22,"066651":[],"066654":[],"066670":[],"066675":[],"0666807":2,"066714":[],"066729":[],"066741":[],"066753":[],"066789":[],"066808":[],"066828":[],"066837":11,"066850":[],"066870":[],"066873":[],"066919":[],"066934":[],"06695337":17,"066954":[],"067011":[],"067079":[],"067110":[],"067141":[],"067162":[],"067191":[],"067213":[],"067236":[],"067240":[],"06724062":5,"067282":[],"067392":[],"067402":[],"067432":[],"067437":[],"067443":[],"067449":[],"067484":[],"067499":[],"067506":[],"067525":[],"067527":[],"067544":[],"067547":[],"067560":[],"067585":[],"067597":[],"067599":[],"067612":[],"067615":[],"067620":[],"067622":[],"067675":[],"067693":[],"067709":[],"067710":[],"067712":[],"067714":[],"067719":11,"067720":[],"067723":[],"067767":[],"067769":[],"067775":[],"067787":[],"067854":[],"067856":[],"067864":[],"06786925114666595":[],"067907":[],"067908":[],"067934":[],"067956":[],"068019":[],"068059":[],"068075":[],"068087":[],"068093":[],"068094":[],"068098":[],"068103":[],"068104":[],"068110":[],"068120":[],"068136":[],"068197":[],"068210":[],"068261":[],"068318":[],"068345":[],"068358":[],"068363":[],"068376":[],"068391":[],"068417":[],"06844519414009438":[],"06844519414009442":[],"06844519414009444":6,"06844519414009445":6,"068461":[],"068500":[],"068505":[],"068525":11,"068538":[],"068541":5,"068573":[],"06858699":[],"068593":[],"068608":[],"068619":[],"068642":[],"068654":[],"068659":[],"068664":[],"068689":[],"068724":[],"068735":[],"068776":5,"068799":11,"068806":[],"068809":[],"068831":[],"068841":5,"068852":[],"068867":5,"068920":[],"068937":[],"068953":[],"068965":[],"068991":[],"068992":[],"068999":5,"069010":[],"069015":[],"069036":[],"069044":[],"069065":[],"069085":[],"069091":[],"069181":[],"069187":5,"069202":5,"069231":[],"069242":5,"069268":5,"069275":[],"069276":[],"069281":[],"069285":[],"069355":11,"069386":[],"069408":[],"069409":[],"069421":[],"06942103":[],"069436":[],"069441":[],"069454":[],"069455":[],"069465":11,"069475":11,"069476":[],"069494":[],"069506":5,"069534":[],"069578":[],"069584":22,"069626":[],"069640":5,"069651":[],"069654":[],"069667":[],"069672":[],"069681":[],"069685":[],"06969872":17,"069748":[],"069754":[],"069796":[],"069801":[],"069838":[],"069847":[],"069877":[],"069884":[],"069888":[],"069903":[],"069907":[],"069912":[],"069977":[],"06it":[],"07":6,"070018":[],"070028":[],"070034":[],"070043":22,"070056":[],"070071":[],"070074":[],"070105":[],"070150":[],"07016":[],"070163":[],"07017":[],"070216":[5,11],"070222":11,"070276":[],"070288":[],"070333":5,"070339":[],"070343":[],"070370":[],"070379":[],"07039":[],"070419":[],"070428":11,"070429":[],"070443":[],"070450":5,"070453":[],"070466":[],"070491":[],"070492":[],"070494":5,"070518":[],"070562":[],"070576":[],"070585":[],"070612":[],"070618":[],"07062318":6,"070630":[],"070635":[],"070775":[],"070810":11,"070835":[],"070860":[],"070871":[],"070874":[],"070887":[],"070889":11,"070911":[],"070945":5,"070950":[],"070959":[],"070961":[],"070972":[],"07099747918547346":[],"071003":[],"071009":[],"071022":[],"071044":11,"071086":[],"071106":[],"071112":[],"071115":11,"071120":[],"071136":[],"07115":[],"071239":[],"071243":[],"07129539":[],"0712953943627344":[],"0713":[0,22],"071326":[],"071329":11,"071387":[],"071388":[],"071394":5,"071421":11,"071441":[],"071445":[],"07145103":11,"071460":[],"071467":[],"071476":[],"071480":[],"0714956":[],"071505":[],"071510":[],"071515":[],"071523":11,"071529":[],"071547":[],"071552":[],"071569":[],"071585":11,"07160048164232467":[],"07160048164232538":6,"0716004816423254":6,"07160048164248561":[],"071604":[],"071614":[],"071632":[],"071641":[],"071666":[],"071698":[],"071705":[],"071741":[],"071767":[],"071804":[],"071836":[],"071852":[],"071897":11,"071901":[],"071906":[],"071908":[],"071920625289855":5,"071921":[],"071922":[],"071935":[],"071946":11,"071949":[],"071991":[],"072008":[],"072011":[],"07201957":[],"072021":[],"072041":[],"072084":[],"072091":[],"07212695":[],"072127":[],"072145":[],"072147":[],"072150":5,"072184":[],"072198":[],"072216":[],"072222":[],"072240":[],"072242":[],"072290":[],"072342":[],"072348":[],"072352":[],"072361":[],"072364":11,"072370":[],"072435":[],"072442":[],"072452":11,"072471":[],"072483":[],"072492":[],"072521":[],"072523":[],"072529":[],"072530":11,"072554":[],"072558":[],"072569":[],"072575":[],"072597":[],"072598":[],"072611":[],"072617":[],"072620":[],"072647":11,"072651":[],"072652":[],"072750":[],"072751":[],"072783":11,"072798":[],"072813":11,"072824":[],"072828":[],"072839":[],"07285":3,"0728785":[],"072898":[],"07291729":[],"072918":[],"072928":[],"072955":[],"072958":[],"072970":[],"072974":[],"072994":[],"073013":[],"073016":[],"073045":[],"073052":[],"073062":[],"073080":[],"073105":[],"073120":[],"073134":[],"073136":[],"073159":5,"073183":11,"07319349":17,"073206":[],"073225":[],"073230":[],"073238":[],"073280":[],"073299":5,"073303":[],"073320":[],"073362":[],"073368":[],"073369":[],"07337358":5,"073374":5,"073380":[],"073391":[],"073400":[],"073423":[],"073433":11,"073436":[],"073449":[],"07345504":[],"073489":[],"073506":[],"073531":[],"073548":[],"073567":5,"073575":[],"073583":[],"073597":[],"073598":11,"073601":[],"073629":[],"073647":[],"073657":5,"073668":[],"073695":[],"073699":[],"073716":5,"073719":[],"073750":5,"073761":[],"073768":11,"073777":[],"073810":[],"073811":11,"073816":[],"073827":[],"073831":5,"073904":11,"073907":[],"073925":5,"073938":[],"073949":[],"073959":[],"074006":[],"074019":11,"074034":[],"074050":11,"074067":11,"074111":[],"07413172":[],"074144":11,"074149":[],"074183":5,"07421084":5,"074237":[],"074258":5,"074276":[],"074336":[],"074346":[],"074375":[],"074401":[],"074418":[],"074420":[],"074480":[],"074488":[],"074513":[],"074530":[],"074552":[],"07456491":5,"074569":[],"074573":[],"074592":[],"074666":[],"074684":[],"074693":[],"074708":[],"074715":[],"074729":5,"074743":[],"074760":11,"074763":[],"074773":[],"074833":[],"074838":[],"074839":[],"074845":[],"074881":[],"074905":[],"07490892":6,"074922":11,"074945":[],"074969":11,"074980":[],"074984":5,"074986":[],"074992":[],"075012":[],"075017":[],"075020":5,"075028":5,"075043":[],"075058":[],"075061":[],"075102":11,"075136":[],"075138":[],"075145":11,"075149":[],"075181":[],"075188":[],"075192":[],"075195":[],"075201":11,"075222":11,"075227":5,"075228":[],"075241":[],"075262":[],"075302":[],"07532297":19,"075335":[],"075356":[],"07535606":[],"075389":[],"075433":[],"075498":[],"075573":[],"075586":[],"075594":[],"075612":11,"075618":[],"075629":[],"075728":[],"075760":[],"075770":11,"075797":11,"075820":[],"075840":[],"075899":[],"075959":[],"075982":5,"075987":11,"076022":[],"076055":[],"076066":[],"076079":[],"07608141":13,"076096":[],"076097":[],"076121":[],"076130":[],"076173":[],"076204":[],"076216":[],"076248":[],"076264":[],"076270":[],"076282":[],"076306":11,"076315":[],"076329":[],"076338":[],"076349":[],"076389":[],"0764924":6,"076518":11,"076525":[],"076532":[],"07656896":[],"076588":[],"076589":[],"076604":[],"076619":5,"076628":[],"076632":11,"076637":[],"076665":[],"076697":[],"076726":[],"076729":[],"076760":[],"07678":[],"076780":[],"076783":[],"076795":[],"076804":[],"076821":[],"076843":[],"076862":[],"076866":[],"076886":11,"076895":[],"076905":[],"076927":11,"076938":11,"076942":[],"076955":[],"076958":[],"076990":[],"077003":[],"077009":[],"077013":[],"077015":[],"077022":[],"077033":11,"077062":[],"077083":[],"077108":[],"077131":[],"077140":[],"077144":[],"077158":[],"077164":[],"077200":[],"077203":11,"077211":[],"077219":[],"077228":[],"077291":[],"077338":[],"077349":[],"07735703":[],"077359":[],"077372":11,"077375":[],"077402":[],"077419":[],"077425":[],"077428":5,"077452":[],"077467":[],"077499":[],"077511":11,"077607":[],"077620":[],"077644":[],"077706":[],"077711":[],"077724":[],"07777777777777778":1,"077785":[],"077793":[],"077822":[],"077846":11,"077921":[],"077930":11,"077948":[],"077978":[],"077986":[],"078040":[],"078042":[],"078082":5,"078101":[],"078143":[],"078157":[],"078158":5,"078167":[],"0782":[],"07820":[],"078211":11,"078253":[],"078254":[],"078269":[],"078299":[],"078300":11,"078314":11,"078323":11,"078432":[],"078436":[],"07844310540708652":[],"078484":5,"078508":[],"078542":[],"078548":[],"07858099596662704":5,"078587":5,"078609":[],"07864":[],"078646":[],"078651":[],"078667":[],"078672":[],"078697":[],"078704":[],"078707":5,"07871":[],"078710":[],"078719":[],"078725":[],"078749":[],"078768":11,"078771":[],"078776":[],"07878641":[],"078795":[],"078812":[],"078845":[],"078860":[],"078899":[],"078908":[],"078911":[],"078942":[],"078962":[],"07897647347778382":[],"07898165660100093":[],"078992":[],"078999":[],"079001":11,"079021":5,"07903849":[],"079056":[],"079110":[],"079142":[],"079157":[],"079158":[],"079179":[],"079214":[],"079218":11,"079224":5,"079225":[],"079242":[],"079260":[],"079264":[],"079268":[],"079273":[],"079278":[],"079281":[],"079306":11,"079347":[],"079383":11,"079389":[],"079405":[],"079406":[],"079424":[],"079438":[],"07944154":[17,22],"079443":[],"079447":[],"079476":11,"079483":[],"079486":[],"079489":[],"079493":[],"079495":[],"0795449":[],"079553":[],"079558":[],"079609":[],"079618":11,"079622":11,"079631":[],"079676":[],"07968918676726029":[],"0796891867672603":6,"079719":[],"079729":[],"079741":[],"079819":[],"079823":[],"079839":[],"079847":[],"079882":[],"079893":[],"07989327":[],"079901":[],"079944":5,"079948":5,"079991":[],"07999999999998":[],"07e":[],"08":19,"080026":11,"080056":[],"080061":5,"080106":[],"080120":5,"080137":[],"080200":[],"080256":[],"080288":[],"080297":[],"080312":[],"080319":[],"080332":[],"080334":[],"080343":11,"080347":[],"080370":[],"080406":[],"080407":[],"080410":[],"08041015":[],"08043851":5,"080455":[],"080479":[],"080502":[],"080517":[],"080555":[],"080571":11,"080582":[],"080588":[],"080593":[],"080630":[],"080642":11,"080647":[],"080699":11,"080706":[],"080738":[],"080764":11,"080801":[],"080821":[],"080847":[],"08085812":[],"080916":[],"080922":[],"080973":[],"080984":[],"080998":11,"081022":11,"081046":[],"081072":[],"081140":[],"081144":[],"081163":[],"081198":[],"081211":[],"081216":11,"081233":[],"081253":[],"081262":[],"08131003":6,"081311":[],"081321":[],"081334":[],"081343":[],"081357":[],"081388":[],"081396":[],"081431":[],"081468":[],"081483":[],"081503":[],"081520":[],"081533":[],"081540":[],"081547":[],"08156108":6,"081576":[],"081613":[],"081637":[],"081707":[],"081773":[],"081832":[],"081837":[],"081848":[],"08188077":[],"081881":[],"081932":[],"081953":[],"081989":11,"081990":11,"082014":[],"082027":[],"082122":[],"082140":5,"082174":[],"082183":[],"082189":[],"082204":[],"082267":[],"082282":5,"082286":[],"082288":[],"082295":[],"0823185":[],"082339":11,"082424":[],"082426":[],"082431":11,"082451":[],"082503":[],"08251519":6,"082536":[],"082620":[],"082642":11,"082683":[],"08271198519070039":11,"082716":[],"082786":[],"082846":[],"082852":[],"082874":[],"082875":22,"082896":[],"082900":[],"082921":[],"082939":[],"082990":[],"08299273e":6,"083000":[],"083015":[],"083021":11,"083026":[],"083053":[],"083087":[],"083102":5,"083151":[],"083152":[],"08318298e":1,"083217":[],"083220":[],"08322642264994606":[],"083227":[],"083242":[],"083251":[],"083272":[],"083276":[],"08328216846752691":[],"083300":[],"083320":[],"08333333333333333":1,"083361":[],"08336233266":4,"083380":5,"083399":[],"083404":[],"083417":[],"08343519179767796":[],"083441":[],"083495":[],"083506":[],"083527":22,"08352721390288316":22,"08356774001062162":[],"083573":[],"083579":[],"083600":[],"083629":11,"08363087":22,"083648":[],"083681":[],"083692":[],"083694":[],"08376632":6,"083766322923899":6,"0837663229239016":[],"0837663229239025":[],"0837663229239043":6,"083779":5,"083799":[],"083829":[],"083832":[],"083849":[],"083899":[],"083913":[],"083935":[],"083977":[],"084000":[],"084006":[],"084008":[],"084017":[],"084018":[],"084019":[],"084024":[],"084032":[],"084086":5,"084092":[],"084096":[],"084101":[],"084107":5,"084147":[],"084151":[],"084184":[],"084223":[],"084224":[],"084226":[],"08426840630693411":[],"08426840630693412":6,"08426840630693413":6,"084269":11,"084277":[],"084278":[],"08428156":[],"084282":[],"084286":5,"084364":[],"084391":[],"084400":[],"084408":[],"084414":[],"084426":11,"084434":[],"084444":[],"084476":[],"084477":[],"084484":[],"084523":5,"084536":[],"084549":[],"08455":[],"084570":[],"084604":[],"084629":[],"084645":[],"08464758160254343":[],"084657":[],"084670":[],"084682":[],"084683":[],"084702":[],"084728":[],"08474":[],"084777":[],"084846":[],"084862":[],"084904":[],"084909":[],"084912":[],"084920":[],"084927":11,"084936":[],"084965":[],"084979":[],"085010":11,"085018":[],"085027":[],"085044":[],"085105":[],"085113":[],"085163":[],"085165":[],"085167":[],"085184":[],"085185":[],"085224":[],"085249":[],"085264":[],"085345":[],"085361":[],"085368":[],"085405":[],"085410":11,"085416":[],"08551306":6,"085571":5,"085655":5,"085764":[],"08576932":6,"085776":[],"085879":[],"08593216":6,"085936":[],"086021":11,"086074":[],"086076":[],"086109":11,"08611111111111111":1,"086112":[],"08612280083325631":[],"086154":[],"086174":[],"086178":[],"086203":[],"086249":[],"086250":[],"086257":11,"086262":[],"086303":[],"08630331":[],"086322":[],"086409":[],"086420":[],"086518":[],"086567":[],"086608":[],"086610":[],"086665":[],"086679":[],"086705":[],"08673755293381497":[],"086802":[],"086807":[],"086809":[],"086841":[],"086872":[],"086877":[],"086888":[],"086890":[],"08690":[],"086951":[],"086956":[],"086994":[],"086997":11,"087081":[],"087208":[],"087224":[],"087235":[],"087372":[],"087387":[],"087470":11,"087501":[],"087573":[],"08758":[],"08759":[],"087615":11,"087689":[],"087833":[],"087834":[],"087887":22,"087891":[],"087894":[],"087910":[],"088029":[],"088104":11,"088119":[],"08816688":[],"088176":[],"0881981":5,"088212":[],"088261":[],"088271":[],"088460":[],"088476":[],"088519":[],"088526":[],"088560":[],"088606":[],"088611":[],"088631":[],"08871404":5,"08873443359350565":5,"088758":[],"088760":11,"088765":[],"088809":[],"088816":[],"088825":[],"088853":[],"08887708":22,"08888888888888889":1,"088926":[],"088946":[],"08902":[],"089041":[],"089059":[],"089082":5,"08917679":[],"089177":[],"08918584":19,"089206":[],"089212":[],"089233":11,"089246":[],"089306":[],"089310":11,"089329":[],"089355":[],"0893679":6,"089369":[],"089374":[],"089425":[],"089501":[],"089505":[],"089524":[],"089551":[],"089614":[],"089683":[],"0896981":[],"089758":[],"089775":[],"08996":[],"089982":11,"09":1,"090014704675496":[],"090028":[],"090039":[],"090128":[],"090174":[],"090229":[],"09023660662586945":[],"090241":5,"090268":5,"090270":[],"090337":[],"090349":[],"09034902":[],"0903549":[],"090356":[],"090358":[],"090451":[],"090503":[],"090564":5,"090630":[],"090649":[],"090694":[],"090730":[],"090755":[],"090830":[],"09083636328656121":19,"090849":[],"09085624":[],"090929":[],"091031":[],"091051":[],"091060":[],"09117221":[],"091224":[],"091236":[],"091266":[],"091311":[],"091315":[],"091340":[],"091349":[],"091363":[],"091414":[],"091416":[],"091426":[],"091440":[],"091477":[],"09149881":[],"091620":[],"091630":[],"091647":5,"09166666666666666":1,"091696":[],"0917":9,"09170751":[],"09172408":[],"09172409":6,"091891":[],"092066":[],"092126":[],"09216046":[],"092249":11,"0923":[],"092409":[],"09251":[],"09252364":[],"092524":[],"092621":[],"092769":[],"092879":[],"09297039":[],"092998":[],"093078":[],"093247":[],"0934597075922044":[],"093497":[],"093593":[],"093624":[],"0938":[],"093844":[],"093930":[],"093979":[],"094082198961999e":6,"0940821989624095e":[],"0940821989643363e":6,"094082198966615e":[],"0940821989673748e":[],"094362":[],"09440475":[],"094404754965417":[],"09444444444444444":1,"094472507965532":[],"094477":[],"094619":[],"094657":[],"094722":[],"094848":[],"094867":[],"094925":11,"095171":[],"095184":[],"095313":[],"095510":[],"095522":[],"095617":[],"095702":[],"095871":[],"095902":[],"095935":[],"09609807":5,"096173":[],"096472":[],"096516":[],"096623":[],"09672929714683368":[],"09677394":[],"096893":5,"096894":[],"097":[],"097360":[],"097396":[],"09744":[],"09744272":[],"097602":[],"097634":[],"097710":[],"09780":[],"09791":[],"098135":[],"09849763":[],"098498":[],"09856879":[],"09861229":[17,22],"098802859381565":[],"099":[],"09903804":8,"0991919894927399":[],"09919198949274803":6,"099191989493334":[],"09951287404314545":1,"099648":11,"09964817":11,"099777":[],"0n":[0,22],"0s":[],"0x11da42d90":[],"0x11db14850":[],"0x11e031e50":[],"0x11e09b370":[],"0x128ee8850":[],"0x12946f2e0":[],"0x13b240850":13,"0x13b8c72e0":13,"0x7fad10f9a280":[],"0x7fad20f69be0":[],"0x7fd098df3280":[],"0x7fd0a9063be0":[],"1":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,17,18,19,20,21],"10":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,17,18,19,20,22],"100":[0,1,2,3,4,5,6,7,8,9,10,11,13,14,15,17,19,20,22],"1000":[0,1,2,4,5,8,11,13,14,16,19,22],"10000":[2,5,6,10,11,13,19],"100000":8,"10001":10,"1001":19,"1002":19,"1003":19,"10030":[],"100303":[],"100358":[],"10044225464078282":[],"1005":19,"100670":[],"10077114273548984":6,"1009":19,"1011":19,"1013":19,"1013904243":19,"10141413e":6,"1015":19,"102":[],"1022233262115424":[],"10222333":[],"1023":19,"10230":[],"1023111":[],"1023858":19,"1024":3,"102401":[],"102449":[],"1026":19,"1027":19,"1028":[],"103":1,"1030":19,"10302062":[],"103257":[],"10340":[],"1037":19,"10378326e":1,"1038":19,"103822":[],"10391807":6,"10398646080125035":[],"10398646080125036":6,"10398646080125037":6,"1040":19,"10405456":11,"10430":[],"104411":22,"10455924":[],"1047":19,"10505137":[],"105161":[],"105169":[],"10516924":[],"10520":[],"10555555555555556":1,"1056":[],"10589577":5,"106":[],"106095":11,"10620135":[],"106431":22,"107":[],"108":6,"108359":[],"10835935":[],"109":[],"10913":6,"10931453":6,"10950766":22,"10960":[],"1096767776832326":[],"10967678":[],"10th":9,"10x":[0,22],"11":[0,2,3,4,5,6,7,8,9,10,11,12,13,14,15,17,18,19,20,21,22],"110":[],"1100":19,"1101":19,"11022302e":[],"11046771":[],"111":[1,7,12],"11100":[],"1122558214":[],"112319":[],"11231934":[],"112383":11,"1124":[],"1125":[],"11283168":[],"11297834":[],"1133":6,"1136":[],"11362930e":[],"11388888888888889":1,"1139":[],"11390":[],"114":[],"11402309":[],"114437":[],"11462415":5,"11481199":19,"11482289e":6,"11499517":[],"11507992e":1,"11547777218875695":[],"11547777218875696":[],"11547777218876518":6,"11547777218940905":[],"11547777218940906":[],"115822":6,"11590":[],"11598862":[],"11598862273198":[],"11604844":[],"116048442683864":[],"11660":[],"11666666666666667":1,"11674401539815678":[],"117":8,"117430":22,"11744554e":6,"11780":[],"11790868":[],"117986":[],"118":2,"1182":[],"1183":[],"118318":22,"1184":[],"11840":[],"1185":[],"11850274":[],"1186":[],"11890":[],"119":2,"119625":[],"11962537":[],"1199":[],"119936":2,"119999999999976":[],"11it":[],"12":[0,1,2,3,4,5,6,8,9,11,12,13,17,19,21,22],"120":[2,3],"1203":[],"1203284":8,"1206":8,"12069773":[],"121":[8,9,10],"12152272":17,"1215pm":[20,22],"12167821":[],"12182967":6,"12196674":[],"122":[2,8,9,10],"12222222222222222":1,"122282":22,"122439":[],"1224392":[],"12288563":[],"122886":[],"123":2,"12302855":13,"12318726e":6,"12330280229368":[],"12333649":6,"12345260617257443":[],"123459876":[],"123711":6,"12380":[],"12387751":13,"124":[0,22],"12400":[],"12434807":22,"125":[],"1250":[],"125000":[],"12539459":22,"12552073e":6,"126":[],"1261":[],"12618549":5,"12630042":17,"1265":[],"127":4,"1270":[],"127043":[],"1271":6,"1277":6,"127773":[],"12777777777777777":1,"127812":22,"12788968":[],"12790":[],"128":[3,4,13],"128664":6,"12885048":22,"12898627064868978":[],"129":2,"12934015":22,"12937662":[],"12945452":[],"1297":[],"1297300314822336":19,"1298":9,"12adb44b1c20":[],"12m":[],"12pm":[20,22],"13":[0,2,5,6,9,11,12,13,17,19,22],"130":[],"13003291":6,"13030182":[],"13055555555555556":1,"131":[],"13117061":[],"13131825":17,"1314":[],"132":[],"13220608e":6,"13229545716505003":[],"132360":[],"1323603":[],"1326":[],"13261136":22,"1326197715":22,"13280":[],"13288373":[],"133":7,"13320535":22,"13333333333333333":[],"135":[],"13519106":[],"13535942":6,"136":[],"1360":[],"13609760e":[],"1361":[],"1362":[],"1363":[],"1364":[],"13646574":5,"13655438":[],"13661243e":6,"13679863":6,"1371":6,"13734823":17,"13740":[],"137400784702911":[],"137652":11,"1378":[],"1382":[],"1383":[],"1384":[],"1385":[],"1386":[],"13865173":5,"13876586436927824":[],"138775":11,"1388888888888889":1,"13890":[],"1392559581788775e":[],"1392559584983597e":[],"1392559585048734e":6,"1392559591206444e":6,"13925595925919e":[],"13it":6,"14":[0,2,4,5,6,8,9,10,11,12,13,17,19,21,22],"140":2,"14021063":6,"1404":[],"14042769":[],"140428":[],"141":2,"14100":[],"1416398":6,"14174062":22,"14174745":6,"1418":[],"142":[],"14231548":19,"14250":[],"14252712":22,"142857":[],"14298603":19,"143":[2,7],"1435666":[],"14360598":[],"1437":1,"144":[],"14400":[],"1440501043841336":1,"14440":[],"14451625":[],"1446729567":4,"14484695":[],"144993":22,"145":2,"1457774":19,"146":2,"14617985":22,"147":[],"14710":[],"1472032":17,"14722222222222223":1,"147400":11,"14741468":[],"147420":11,"14783702":[],"1479":[],"148":[],"14812206":6,"14818":[],"1484256":[],"148564":[],"14859":6,"148768":[],"148854":6,"149":[],"149213":[],"14932651":[],"149655":6,"14988578":[],"149886":[],"14995486":[],"149955":[],"14g":6,"14it":[],"15":[0,2,4,6,7,8,9,12,13,15,17,19,22],"150":[4,8],"15005476":5,"150184":[],"15089627":17,"150920":11,"15092012":11,"1509778":[],"15098090e":6,"151":[],"15130074e":6,"151348":[],"151986":[],"152":[],"15200":[],"15258907":[],"152696":[],"15269628":[],"1527777777777778":1,"153036":22,"153106":[],"1533795":[],"153760":[],"15384615384616":[],"154":[],"15410688":11,"154107":11,"15442554":17,"15454301":[],"154720":[],"15483121":[],"154911":[],"155":[],"155491":[],"155687":[],"155883":[],"156":[],"1562":[],"15629539":[],"15680777":[],"156956":5,"157":[],"15717291":[],"1575":[],"158":[],"1583767":[],"15843769515580663":[],"1586300629904382":[],"1587":[],"15891336":[],"15899253":22,"159":[],"1590":[],"15990":[],"15g":6,"15it":6,"15pm":22,"16":[1,2,3,4,5,6,8,9,10,19,22],"160":[],"1603":3,"1604":[],"1605":[],"160539":[],"1606":[],"1607":[],"16111111111111112":1,"1612":[],"1614891":17,"16167387":22,"16211139":5,"16220":[],"162246":5,"16231451":4,"1625":[],"1628":[],"162999":22,"163":[],"1630775253":1,"16342407":5,"16343471":6,"16384":3,"16397496":22,"16500":[],"166":[],"16660817":[],"166667":[],"167":[],"16740002":[],"167787":5,"168":[],"168044":[],"16804444":[],"16805821e":6,"16807":[],"16827044":[],"16832385":[],"16840081":22,"16961682":[],"16b8e3cda33a":[],"17":[1,2,5,6,8,19],"17084902":[],"1709":[],"17174962e":1,"17222222222222222":1,"172405":[],"17240522":[],"1726":[],"17300":[],"1731":[],"17339342":[],"17446471":6,"1752":[],"175300":22,"17641709":6,"17647619":6,"176880142835407":[],"17709473":17,"17777777777777778":1,"17801022":5,"17826349":22,"17861098":6,"17897671":19,"17917768":5,"17930649":[],"17938393":13,"17942122":13,"17949575":5,"17953942":11,"1797":[1,3],"18":[2,6,7,8,9,10,13,19],"180":[],"18029127":5,"1807":4,"1809":[],"181":[],"1810":[],"1812":[],"18156717":[],"18166474":19,"1821":[],"18266178":5,"182662":5,"18276924":[],"18327677":[],"18333333333333332":1,"18393678":[],"184":[],"184519":22,"184895":[],"185":[],"1851":[],"1852":[],"18526":[],"185278747229417":[],"1853":[],"1854":[],"1855":[],"186":[],"1860":[],"1861":[],"18611111111111112":1,"18613217e":6,"18660":[],"18673098":11,"18682538":[],"18695705":17,"18780801":22,"18790439176058887":9,"188":6,"18826299":[],"188263":[],"1887":6,"18912963":[],"189367":22,"189496":22,"189622":22,"18998208":19,"18it":[],"19":[2,6,13,19],"19003":6,"19096968":[],"190970":[],"191262820314401":[],"19144544":17,"19158446":17,"19166666666666668":1,"191963":22,"19207979":5,"19213479":[],"19220":[],"193":[],"19354258":[],"19379506":[],"19394283":[],"194":[],"1940":0,"19404282648955e":[],"194042826653172e":[],"194042826815498e":[],"1940428268204826e":6,"194042827197027e":6,"1943":12,"194325":[],"19432526":[],"1944":[],"19444444444444445":[],"19466812":[],"1950915150":[],"1954":[],"1956":[],"19569961":6,"1961":[],"1962":[],"1963":[],"1964":[],"1965":[],"1970":[17,22],"197104":[],"19710439":[],"1973":9,"197370":11,"19740":[],"197738983259782":11,"1979":6,"19800":[],"19853775e":[],"1989":[],"199":[],"19937":[],"19983530":6,"19994371":[],"1_1":12,"1_2":12,"1_3":12,"1cm":[0,8,10,19,22],"1d":[1,2,3],"1e":[1,2,4,13,14],"1e10":14,"1e4":6,"1f":1,"1k":17,"1n":[0,22],"1s":[],"1x":[0,22],"2":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,16,17,18,19,21],"20":[0,1,2,6,7,8,13,19,20,22],"200":[0,2,3,4,8,9,10],"2000":0,"200000":[],"20015436":6,"2004":13,"2006":21,"2008":22,"2010":1,"2011":1,"2014":4,"2015":1,"2016":[0,22],"20174121":[],"2018":[0,6],"2018906331":[],"2019":[],"2021":[6,14],"2022":22,"2023":[15,22],"20255857":22,"2027":[],"20277777777777778":1,"20299677":17,"203":[],"20316225":17,"20320502":[],"20375361":[],"203753611274545":[],"20500":[],"20509391":[],"205231":22,"206":[],"2060":[],"20609082":[],"206091":[],"20661216":[],"206640":[],"20664007":[],"2069":[],"207545":11,"20756638":[],"207888":22,"20833333333333334":1,"20867052175003364":6,"20867052175006306":[],"20867052175109335":[],"209789":22,"20980":[],"20999563":22,"21":[0,1,2,5,6,7,9,12,13,15,17,22],"210151":[],"2101511":[],"210340":11,"21058097":5,"21130":[],"2116753732":4,"21169159e":6,"21265216":[],"213":[],"213103":11,"213743":11,"21472683":[],"2147483647":[],"21519063":[],"21596432":6,"216290":11,"21654926":17,"216683":11,"21786964":[],"2188":[],"21919813":[],"219249":[],"21924917":[],"21927988":22,"21944444444444444":[],"2195":[],"21985165":[],"21997099":[],"22":[0,1,2,5,6,12,13,17,22],"22014758":11,"220148":11,"22044605e":5,"220506557673408":[],"22094791":[],"220968":22,"221":8,"221180":22,"22134069":[],"2216":[],"2218":[],"221805":2,"221921":5,"222400":22,"2225":[],"2246674023625205":17,"225":4,"22567203":17,"2259440937":[],"226124657522696":[],"22612466":[],"226856":[],"22685646":[],"22690428":5,"22821344":17,"2284246870217162":6,"2284246870217459":[],"22842468702288576":[],"22842468702288582":[],"22847924":5,"22929905e":[],"2299":[],"22it":[],"23":[0,1,2,3,4,6,7,12,13,14,17,22],"23002365e":6,"23014274e":[],"23056012":22,"231":[],"23103285":[],"231224729143838":[],"2315033":[],"23167717":5,"23168292":[],"231683":[],"2321528":[],"232153":[],"232435":22,"23297056":[],"23333333333333334":1,"233528":[],"234":6,"23408962e":5,"23483916":19,"23522201":[],"2357089093":[],"2360682191515046":[],"2361111111111111":[],"2364":[],"23659936":17,"237038":[],"23703839":[],"23732849":22,"2379":6,"23792491":[],"237925":[],"23816792":[],"238168":[],"238574":[],"23857423":[],"23962594":17,"2397":[],"24":[0,1,2,3,4,6,13,14,17,22],"240670854503034":11,"24140":[],"2416":[],"24175744e":6,"2419":[],"24276315":[],"2430":[],"24390":[],"24444444444444444":1,"244858":[],"24485843":[],"24512498":[],"24533566":22,"246":2,"24611674":22,"2470":[],"2476536":[],"247654":[],"24770094":[],"24784064":5,"24829908":5,"24906604e":6,"24924624":[],"249302":11,"2493023":11,"2495":[],"25":[2,3,4,5,6,7,8,9,11,13,15,19,22],"250":[2,4,7,9],"2500":[],"25000":0,"250000":[],"250154":[],"250636":22,"25115233":22,"25116851":22,"2517560119":[],"251879":22,"252436":22,"25259666":[],"2526":[],"252866":[],"25286618":[],"25366775":5,"253668":5,"253775":[],"25385387":5,"253854":5,"255":3,"255001":22,"25522012":22,"256":[2,4],"25617654e":6,"25617657e":[],"25617658e":6,"256962":[],"257":[],"2572":[],"2572495066":[],"2572e3a4b38d":[],"2575":[],"25792767":[],"25845e8df859":[],"25881631":13,"25902112":17,"259153":11,"2597":[],"25976336":[],"26":[2,3,4,6,13,14,17,19],"26079358":[],"26115367":11,"261154":11,"26153846153846":[],"26185107":17,"26186844":[],"2619":[],"26290036":[],"26291585":[],"262916":[],"26294938":[],"2629493813057833":[],"26301436":5,"26306244":[],"264":[],"26409315307910025":6,"2640931530791003":[],"26409315307910036":6,"2640931530791005":[],"26409315307910053":[],"264421":22,"264666":11,"26466619":11,"265":[],"2650":[],"265109911":4,"26531223e":[],"2654":[],"26549135":17,"266":[],"26610075":[],"26666667":13,"26710969":5,"26780278":5,"268":[],"268227":[],"26822717":[],"268484":[],"26848435":[],"269":[],"27":[0,1,2,3,4,6,13,14],"270":[],"2703":[],"27050214":19,"27091656":[],"270917":[],"27092897":[],"27092910":6,"2750":[],"27525917":22,"275341":[],"27562809e":[],"27621662e":[],"276263":11,"27660123":13,"27692307692308":[],"27700":[],"2772":[],"2775623201":[],"27760":[],"278036":[],"27803645":[],"27924636":5,"27n_":19,"28":[1,2,3,4,6,13,14],"28001319":[],"280179":22,"28047021":[],"280573":5,"280647":11,"28065343":19,"28067036":[],"28097861":[],"280979":[],"28102554":22,"2812":[],"281930":22,"282259":22,"282727":11,"283":[],"2830637392":4,"2831603":[],"28336218e":6,"2836":[],"28390":[],"28475098":8,"28590743":[],"2861":19,"28634473":[],"286345":[],"2871":[],"2873":9,"2882":19,"2886":19,"2886847885377843":[],"28868479":[],"28875373":[],"2890":[0,22],"2892":19,"28967287":[],"29":[3,4,6,7,14],"29082851":[],"290829":[],"29083183":[],"290832":[],"29149329":[],"2915":19,"29167186":5,"29229741":[],"2923076923077":[],"29276615":17,"2931":22,"294277":[],"2942772":[],"29512284":[],"295123":[],"2954":[],"2955":[],"2956":[],"2957":[],"2958":[],"29588901":[],"29592539":[],"296247":[],"296414":22,"29661191":17,"29672381":22,"2968":22,"297":[],"2971492148":[],"2972":[],"2980":22,"29822833":6,"298273":[],"298375":[],"298836":[],"29883607":[],"2990":22,"299267190588216":[],"299748":22,"2_":12,"2_1":12,"2_2":12,"2_3":12,"2_i":12,"2_m":[6,19],"2_t":13,"2_x":19,"2b":19,"2cm":8,"2d":[1,3,11,12,16,22],"2e":6,"2f":[0,7,9,10,11,12,22],"2ff97f4bf03b":[],"2g":2,"2g_i":2,"2k":3,"2m":6,"2n":[0,2,3,22],"2nd":9,"2p":19,"2pm":[20,22],"2pt":4,"2s":[],"2x":[0,3,8,13,22],"2x_ix_jy_iy_j":8,"2x_j":8,"2y_i":10,"2y_j":8,"3":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,16,17,18,19,20],"30":[0,1,3,4,6,7,10,13,14,20,22],"30000":[0,22],"30010":[],"30119421":8,"301475":[],"3014751":[],"3017":[],"3018":[],"3019":[],"301927":[],"3020":[],"3021":[],"30258509":[17,22],"302m":[],"303":6,"3037":[],"3038":[],"30384239":[],"3039":[],"303m":[],"3040":[],"3041":[],"30466214e":6,"304m":[],"305":[0,22],"30535506":[],"30552077":[],"30559547":[],"305m":[],"306":[0,22],"3063":[],"306m":[],"307":[0,22],"30702075":22,"3072":3,"30761405e":[],"30787294":6,"3079975":19,"307m":[],"308":[0,22],"30813073":17,"30839676":19,"30891693":[],"308917":[],"308m":[],"309":[0,22],"30936179":[],"309362":[],"30940":[],"30b53504a633":[],"31":[3,4,6,12,14,17,19],"310":[0,22],"311":[0,22],"31120247":[],"311m":[],"312":[],"3120271598582915":[],"31211671":17,"31228042":[],"31229747":17,"3123314713548606":6,"31276579e":6,"312m":[],"313":[],"31311243":17,"31318084":5,"31377492":17,"314":[],"31424359":[],"314244":[],"31447174":[],"31457796":5,"315":6,"3155":[0,5,6],"315746":[],"31574634":[],"315977":[],"31597731":[],"316":[],"31605061":[],"31614188e":[],"31644071":[],"31650694":6,"31681097":11,"316811":11,"317":[],"31718909":11,"317367":11,"31768693":22,"317m":[],"31835835":19,"31866499":[],"31896852":8,"319803":[],"31980301":[],"319m":[],"31it":[],"32":[3,4,6,12,13,14,17,19],"3200":1,"32039227e":[],"32047562":[],"32066545e":5,"32068012":19,"3208":2,"320m":[],"32149601703519115":6,"3214960170351912":6,"3215":[],"32179365":[],"32183101":22,"32190363":22,"32309075":[],"32320052":[],"324":2,"32458459":[],"32459186":[],"324m":[],"3250":[1,6],"32512":[],"326238":22,"3263505":17,"326m":[],"32714903e":5,"32721178":[],"327212":[],"32750531e":[],"32766274":22,"32816737":[],"32903042":[],"329492":22,"3297":[],"32992274":[],"329923":[],"32it":[],"33":[3,4,12,14,17,20],"3303":[],"33066907e":5,"33078983":22,"3310":[],"33166055e":[],"331939":22,"331m":[],"332331":[],"333":7,"3331":[],"33327369":[],"333274":[],"33333333":13,"3337":[],"33611111111111114":[],"336801":[],"33680101":[],"33711888":[],"3384":[],"33900713":[],"33956555":17,"33m":[],"34":17,"3403":[],"34040204e":[],"340583":22,"340782":11,"34114547":5,"34158665":[],"341m":[],"342680":22,"34305928":[],"3436":[0,22],"3437":[0,22],"34498451":17,"3456":[],"345687771875474":17,"34568872":[],"34569596":5,"3457":[],"3458":[],"34585355":[],"3459":[],"3460":[],"34678929":17,"346810":[],"3469819128513336":[],"34740615":[],"3498":[],"34it":[],"35":[0,2,3,4,6,14,20,22],"35030572":19,"35074881":[],"350749":[],"35123041":22,"3514":[],"35140":[],"35147135":[],"35147532":22,"351636":11,"35182854":5,"35203688":[],"35207264":[],"352073":[],"3522":[],"3525":[],"3528556":[],"352856":[],"3529":[],"3530606977":[],"35319678":17,"35346808":17,"3538":[],"35396404e":[],"35401056e":[],"3543":[],"3544313922":6,"3546":[],"35470445e":5,"3548":[],"355":[],"3551":[],"35533773":6,"35533774":[],"3556":[],"35562617e":[],"3558":[],"355906":[],"35590603":[],"3560":[],"356399":22,"3567":[],"3572":[],"35724288e":[],"3575":[],"357508":22,"3576":[],"3577":[],"35771826":6,"35771842":[],"35793003441520066":19,"3581341341":4,"35821426":17,"3585":[],"3587":[],"35892474":[],"35894575":17,"359":5,"3593":[],"3594821":[],"3595":[],"3598":[],"359999999999985":[],"36":[0,2,5,6,19],"360":1,"3604":[],"3605":[],"3606":[],"360688":[],"3609":[],"36102113":[],"36117602":[],"3613":[],"3615":[],"361556":22,"3617":[],"3621311":5,"3624":[],"3627":[],"3628":[],"363295916323784e":6,"363295916414895e":[],"3632959170548605e":[],"3632959215700067e":6,"363295924430451e":[],"363834":[],"36383443":[],"363936":[],"36393643":[],"3643":[],"3644017":[],"364402":[],"364418e97433":[],"3645":[],"3646":[],"3647":[],"365350":[],"36535019":[],"3655":[],"3655222":5,"3659":[],"3665263":19,"3668":[],"36689784":[],"366898":[],"3669":[],"367":2,"3672":[],"3673":[],"3674":[],"3679":[],"3684":[],"3687":[],"3688":[],"368m":[],"369139":11,"36it":[],"37":[2,3,4,6,14,22],"3704":[],"370782966":4,"3711":[],"3713":[],"37157712":22,"3718":[],"3721":[],"3722":[],"3725":[],"3729":[],"37307168":[],"3739":[],"37396662":6,"37415316":[],"374291":[],"37429133":[],"3748":[],"3749":[],"3753":[],"375694":22,"3759":[],"3760":[],"3765":[],"376547":22,"376559":[],"37655936":[],"376834":[],"37683438":[],"37692363":[],"37703055":[],"37713991":[],"3772":[],"3773":[],"37732":[],"3776":[],"3777801602":6,"3779":[],"37835429e":[],"3784":[],"378664":[],"37866422":[],"37900111":6,"3791":[],"379203":[],"3794":[],"379647":[],"37964744":[],"37992857":[],"37it":[],"38":[2,3,4,14,19],"380":[],"38019139":17,"3802":[],"3803":[],"3804":[],"3805":[],"380739":[],"38073947":[],"3811":[],"38135733e":6,"3815":[],"381627865854956":[],"38162787":[],"38168549":19,"3817475779":6,"3818":[],"3819":[],"3820":[],"382187":22,"38222896":[],"3823886":[],"382389":[],"38246359":[],"382672":[],"38267217":[],"3827":[],"382951":[],"38295101":[],"38299798":22,"3830":[],"38302314":19,"3833":[],"38336316":[],"3834":[],"3837":[],"3838":[],"3839":[],"3842":[],"3850":[],"3851":[],"38533184":[],"38533185":6,"3854":[],"3858":[],"386":[],"38605872":[],"386059":[],"3861":[],"3862":[],"386294":11,"38629412":11,"38629436":[17,22],"38629844":17,"38637915":17,"3864":[],"3867":[],"3869":[],"387":[],"3871":[],"3872":[],"387482":[],"38748219":[],"3876":[],"388":[],"3881":[],"3882":[],"3885":[],"38868469":[],"3888":[],"3889":[],"389":[],"38901478":[],"38906684":[],"389067":[],"3891":[],"38916861e":6,"38962192e":6,"3898":[],"39":[0,2,3,4,14,20,22],"390":[],"3906":[],"39095416":[],"3914":[],"3915":[],"3916":[],"391602":[],"3917":[],"3922":[],"3925515884752442":[],"39272691":[],"3928":[],"3931":[],"39311435":[],"39384255":5,"393843":5,"3943":[],"3944":[],"39456996":[],"39493843":0,"3950":[],"3955":[],"39560937":[],"39579407":5,"3958":[],"39595799":22,"3960":[],"3962":[],"3970":[],"39706038":5,"39724390e":[],"3975":[],"397700":11,"39789527":[17,22],"3979":[],"39794864e":[],"3980313467":6,"3983":[],"39864527":22,"39924562":[],"399246":[],"3994":[],"3996":[],"399836":22,"39it":[],"3bdkrb":[],"3d":[2,3,4,6,13],"3f":[1,3,9],"3n":17,"3x":[2,8],"3x_i":2,"3y":8,"3yk470mj5p931p9dtkk0y6jw0000gn":[1,6,13,22],"4":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,17,19,22],"40":[1,6,20,22],"400":4,"4000":22,"4005":[],"4011":[],"40116777":[],"401168":[],"4012":[],"4017":[],"4017308":22,"40183706":17,"401842":11,"40214433":[],"4022":[],"40236901e":[],"4027":[],"4030":[],"40340043":[],"4034668048":[],"4038":[],"40389922":22,"4039":[],"404":[],"4045":[],"4048":[],"4050":[21,22],"4055":[],"405890":11,"4059":[],"40599799":[],"4068":[],"4069":[],"4075":[],"40754621":[],"4077":[],"408":[],"4082":6,"40829683":[],"408297":[],"4084":[],"4087":[],"4087793":5,"4088":[],"4089":[],"409":[],"40927184e":6,"40980089":5,"409801":5,"40a38ad763f1":[],"41":[2,17],"410":[],"4100":[],"4107":[],"410815":[],"41081513":[],"411":[],"4115":[],"4117":[],"41170104":[],"412":[],"41211579":[],"412116":[],"4128":[],"4131":[],"41351287":[],"413513":[],"41357064":[],"4143":[],"41433969":5,"4144":[],"41446721":19,"4146":[],"41511965e":1,"415201":22,"41542567":19,"4155":[2,15],"415534701258823":[],"41566661":17,"4162706317":6,"4167":[],"4176":[],"4177":[],"418506":11,"4186":[],"41876267":[],"418763":[],"41882036e":[],"41882037e":6,"4192423635":[],"41958102e":[],"4198":[],"41990268":[],"41it":[],"42":[1,3,4,8,9,10,14,17],"420":[],"42028578":17,"42037468e":[],"42078103":[],"421":[],"4212":[],"42130182":13,"422":[],"422275":17,"4224":[],"422480":[],"4224801":[],"423":[],"42340403e":[],"42394972":[],"424":[],"42441033":5,"42449643":[],"42450":[],"425":[],"4255":[],"4258989918":[],"426":[6,7],"42615374e":[],"42631342":[],"427017":[],"42732954":19,"4275":[],"4284066":17,"43":[0,1,3,4,7,14,17],"4304167":22,"43054282":5,"4310":22,"43135183":[],"43294696e":[],"43330971e":6,"43333886":17,"43482628":19,"434932":[],"43493232":[],"435163":22,"43552433":[],"435567":11,"43556723":11,"43560678":17,"43579948e":6,"436462435":4,"43761347":[],"43766686":11,"4379":[],"438060758":6,"438136":22,"43876695":[],"438767":[],"439230":6,"4399427":[],"439943":[],"44":[0,1,3,4,14,17],"44089210e":5,"4410":[],"4411":[],"441264":22,"44152248":17,"44198566":13,"442600":11,"442701":[],"44270138":[],"443217":22,"444":[],"446453":22,"44688507e":[],"44830642":17,"44970586e":1,"44it":[],"45":[3,4,14,20,22],"450":[],"450257":11,"4504":[],"452553":22,"45290829":[],"45393214e":[],"454027":[],"45402701":[],"4543859":[],"4557763":11,"455947":22,"456":[],"456418966187335":[],"457":2,"45741697":17,"457770268480242":[],"458027":22,"458078":11,"45960079":5,"45985488":[],"459855":[],"46":[3,4,14,20,22],"4601":[],"461":[],"461175":[],"462":7,"46284227":19,"46383925e":6,"463861":22,"464424":[],"4644244":[],"46508305":[],"46567887":[],"466":[],"46602982":[],"46650488":5,"466505":5,"46696223":[],"469":[],"46932688":[],"4694":[],"46984697e":6,"469868":[],"46986815":[],"47":[3,4,14,20,22],"4703":[],"47042744":5,"470714":22,"47075725":6,"47116868e":6,"47125748":5,"47132891":5,"47245463":[],"472455":[],"47387858":[],"47400238":[],"47432993":[],"4744":[],"4744219":[],"47478057":[],"47482507":19,"47485224":[],"475311":[],"47531107":[],"47610036":6,"47815203":11,"47920156":[],"47942814":[],"479465113":4,"48":[3,4,14],"480":22,"48089797":[],"48133064":[],"481979":6,"48212873":[],"48257387":[20,22],"48316523e":[],"483257001":13,"4837":[],"48420165":[],"48442336":22,"48476997":11,"48574149":[],"486873":[],"48687342":[],"48739546":17,"48871288":5,"488713":5,"489":[],"489522":[],"48952201":[],"48971452":19,"48994188":5,"48it":[],"49":[3,4,5,6,11,14],"490":[],"491":[],"49152":3,"492":[],"49242688":22,"49282737":17,"493":[],"49385454e":[],"4940954":[0,22],"4959161509356135e":[],"495916150936645e":6,"495916150936654e":[],"4959161509377256e":6,"495916150938325e":[],"49614357":[],"496337":[],"49633743":[],"49636583":[],"49672291":17,"49680475019226":22,"497":[],"498":[],"499":[],"4990":19,"499012":[],"49901244":[],"4992":19,"49932427e":5,"4997":19,"49974854":22,"49992743e":[],"4b5d3mupqma":[],"4c4c7f":[9,10],"4d":3,"4f":6,"4pm":[20,22],"4y":8,"4y_i":10,"5":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,17,19,22],"50":[1,2,3,4,6,7,8,10,13,14,22],"500":[1,3,4,6,9,10,13],"500000":[],"50000455":5,"50000553":5,"50000718":5,"50000855":5,"50000969":5,"50001063":5,"50001142":5,"50001207":5,"50001261":5,"50001306":5,"50001343":5,"50001374":5,"500014":5,"50001414":5,"50001422":5,"50001439":5,"50001454":5,"50001466":5,"50001476":5,"50001485":5,"50001492":5,"50001498":5,"50001502":5,"50001506":5,"5000151":5,"50001512":5,"50001515":5,"50001517":5,"50001518":5,"50001519":5,"50001521":5,"50001522":5,"50001523":5,"50001524":5,"50001525":5,"501":[],"501049":[],"50104946":[],"50105159":[],"5018":19,"50219982":22,"50227564e":6,"5031474174499113":[],"50314742":[],"50321091":5,"504167":[],"50416731":[],"504881":11,"50488131":11,"506":0,"50680321e":[],"50727059":[],"50754416":19,"50769230769231":[],"50799086":22,"507d50":[9,10],"50812169":22,"50846111e":[],"50846112e":6,"50it":6,"50j":13,"50x10":1,"51":[3,4,10,14],"510":1,"51004249":[],"51075117":22,"51126895e":[],"51131471":[],"511315":[],"51150176":17,"51174395":17,"511888":5,"51191552":6,"511977":[],"51197747":[],"512132":[],"51214899":[],"51265232":[],"51289697":[],"512897":[],"5138":[],"51389553":[],"514219":22,"51561271":[],"51664729":19,"51732028":17,"517350858882083":[],"5177783846":4,"517823":[],"51782322":[],"518030":[],"51803019":[],"5188328":[],"518833":[],"518895":22,"519842":[],"52":[3,4,14],"520931":[],"52093124":[],"5216048821598704":[],"521719":[],"52171908":[],"5222222222222223":1,"522758":[],"522836":22,"52307692307693":[],"5260627":[],"526744":11,"52713812":11,"52723079":[],"52773051":[],"52799362":[],"528115":[],"52811546":[],"52819229":22,"52874252":5,"529":[],"52911941":[],"52945798e":[],"53":[3,4,9,14],"5303329":11,"5305555555555556":1,"5312":[],"531280":22,"53189647":[],"53219937":22,"53254035":22,"53312754":[],"533941":11,"53394148":11,"53423784":[],"534362":22,"53479276":[],"534793":[],"53603432":[],"53611562":[],"53623614":22,"53697476":[],"53703498":6,"5378811":11,"53794784":[],"537948":[],"53815559":[],"53822787":22,"53846153846155":[],"539261":11,"53938383":5,"539384":5,"53952479":[],"539525":[],"54":[6,19],"540":[],"54016188":[],"540162":[],"54039921":5,"54041041e":[],"541605":22,"54163136":[],"544439":22,"54537329":19,"546166676":[],"546712":[],"54671213":[],"5472246386316972":19,"54722464":19,"54780216":[],"54845458":[],"548455":[],"54886137":[],"54894095":22,"54969168":22,"54it":[],"55":1,"5501":[],"55026099":[],"550321":[],"55202922":17,"552731":11,"55273102":11,"5539":[],"55505907":[],"555187":[],"55518724":[],"555496":[],"5554964":[],"55553537":[],"5555555555555556":1,"55571665":[],"55578041":[],"5566":[],"557795":11,"558080":[],"55808001":[],"558241":[],"55824107":[],"55854694":11,"5594":6,"56":1,"56033697":5,"561":[],"5611":[],"5615":[],"56183518":19,"56198284":5,"5625":[],"56302854":[],"563167":22,"56343926":22,"5639":[],"564":[],"564374":11,"56437897":[],"564379":[],"565":[],"565006":[],"56500639":[],"56536":[0,22],"56556315":17,"565651":[],"56565106":[],"566":[],"566074":11,"56607416":11,"56636616e":6,"567":[],"568":[],"56848886":22,"569":1,"56912044e":6,"56939714":5,"56992937":[],"57":[0,8,20,22],"570":[],"5700":[],"571":5,"571092":5,"57109235":5,"571105947979336e":[],"571105947979352e":6,"571105947979394e":6,"571105947979395e":[],"571105947979439e":[],"57154252":[],"57174058":[],"57201944e":6,"572069":22,"57266138":[],"57361898":[],"574465":11,"576431":11,"57643113":11,"57673618":[],"57810065":17,"57842073e":[],"578889":[],"57888946":[],"57it":[],"58":[10,20,22],"58084359":11,"58112299":5,"581123":5,"58171189":19,"58187347":17,"58312967":22,"583595":22,"58395707":[],"58428804":[],"58474054":17,"584804":[],"58671946":17,"5888888888888889":1,"589":[],"58986647":[],"59":2,"590":[],"591":[],"591317992":4,"591594":[],"59159438":[],"59182949":[],"59190877":17,"592":[],"593":[],"593040":[],"59304008":[],"59323905":22,"59367954":22,"5944444444444444":1,"59445979":5,"594460":5,"59468796":22,"59591979":[],"595920":[],"59592669":[],"59616454":[],"596165":[],"59654302":22,"59766":[],"597660":[],"59833875":[],"598392":[],"59839245":[],"59955801":[],"5cm":19,"5dd54edf2138":[],"5f":8,"5x":8,"5y":8,"6":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,17,19,20,22],"60":[1,2,3,6],"60000":4,"60133562":22,"60176806":22,"6019067271":4,"60236938":[],"60293962":5,"603494":[],"60349429":[],"603636":22,"60420593":5,"6052136":19,"60538875":[],"60619654":[],"6063219":[],"606439":[],"60673226":11,"606760":5,"60685864":[],"60791699":[],"6079169911277265":[],"608028":[],"60802823":[],"60815105":6,"6084611325305795":17,"60943791":[17,22],"60980325":17,"60it":6,"61":[2,7],"61033524":[],"6111111111111112":1,"61123608":17,"612939":22,"613579":22,"61399851":[],"613999":[],"61406871":[],"614133":[],"61413333":[],"61463451":[],"614808":11,"6149274949460215":[],"61576236e":[],"61634314":22,"61702282":6,"617572":[],"61757228":[],"618":[],"61808351":[],"618982":22,"6199381169260247":[],"62":[],"621102":22,"62168613":[],"62170669":[],"621707":[],"62249103":17,"62364974":[],"62373464":11,"62432074":22,"625":7,"62620724":17,"626635268":6,"62683307":17,"62767384":[],"62894215":5,"62896882":[],"629961":[],"63":[0,1,6,7],"6300745149331701":[],"630224":[],"63025821e":6,"63207808":[],"63249532e":6,"63270833":[],"63367582":[],"633676":[],"633949":22,"63395187":[],"63430285":[],"63498144":5,"63675140":[],"6371293350711955":[],"637545":[],"63754524":[],"63860687":[],"63862189":[],"63901111":[],"63it":[],"64":[1,2,3,4,7,13,17,22],"64012627":5,"64064128":17,"64113381e":[],"64141716e":[],"642380":[],"64238022":[],"64293754":[],"6431453":[],"64425009":[],"645":[],"64528459":11,"645285":11,"64615384615385":[],"646283":11,"647":6,"64742912e":6,"647473":11,"6489862":17,"649339":[],"64933923":[],"649382":11,"64x50":1,"65":[1,2,7,8,9],"65136857":[],"65280103":22,"6530742540053943":[],"65444431":17,"65522261":[],"65578316":19,"6562":[],"65626043":[],"65628853":[],"657041":22,"65885453":5,"659306":[],"65it":6,"66":2,"66054752":[],"66087937":[],"66111673":13,"66204648":6,"66219404":6,"66226149":[],"66247212":[],"662854":[],"66285434":[],"6628996975186953":[],"66292841":[],"66295776":[],"662958":[],"66310422":[],"6638":[],"66410989":[],"66560":[],"66614025":22,"66619972":[],"666200":[],"66620847":19,"66638078":22,"666597":22,"6669838269597004":[],"667":[],"667239":22,"668172":22,"668186":[],"66818635":[],"66934291":[],"66981186":17,"66it":[],"67":2,"67047975e":6,"67054028":22,"671089":[],"67258699":17,"672721":22,"67314874e":[],"67588315":[],"67591616":[],"67697934":[],"67838309":[],"67882608":[],"67970864":[],"679709":[],"68":2,"68029036":22,"6808538439837775":[],"68176047e":[],"68192193":5,"68246089":[],"682464":5,"68246434":5,"68279358":[],"6834195":[],"68485505":17,"68534263e":6,"68542204":5,"68545647e":[],"6869":[],"68719389":[],"687194":[],"6887363571":4,"689230294669661":[],"68929213e":6,"689345":22,"68944595":[],"689519":11,"68965135":[],"69":[2,7,19],"690":[],"69023787":[],"690569639355314":[],"69061276":[],"690617":22,"69069n_":19,"69115646":17,"692":1,"69295955":[],"6943316601792833":19,"69481746":17,"69484813e":[],"69493539":[],"69504801":6,"6960326":[],"69634577e":6,"69695259":5,"6984511994530214":[],"69908626":6,"69985355":[],"6999536":11,"69it":[],"6e75736fdab1":[],"6f7a6bd7d79f":[],"6m":[],"6n_":19,"6pm":22,"7":[0,1,2,3,4,5,6,7,8,9,11,12,13,14,15,17,18,19,21,22],"70":[1,2,6,7],"70127680":[],"701370":5,"70179437":[],"70205195":[],"70354373":[],"703716d317a7":[],"70434005":[],"7050":[],"70598996":[],"70653767":4,"70710678":5,"70721787":[],"707218":[],"70727837":22,"70769586":[],"70831425":[],"70832814":5,"709698":22,"70980493":[],"70it":6,"71":[1,2],"71131626":[],"7119":[],"712018":11,"713163":22,"7134":[],"713487":[],"71348713":[],"71350226":[],"71441535":13,"7151":[],"71721168":[],"71760245":17,"718165":5,"71822416":5,"718697":[],"71869727":[],"72":2,"72057967":22,"72101205":22,"72174172":11,"722047011333792":[],"72228205":22,"72261919":0,"72271878e":6,"72347283":[],"7236674":5,"72373129":[],"72394787":17,"724":3,"72509099":17,"72522848":[],"72594302":17,"72671218":19,"72859758":5,"7293182":[],"72981762":8,"73":6,"73005463":19,"7306310662842432":11,"731000":22,"73174557":[],"73287103e":[],"733096":22,"73406033e":[],"73484667":[],"735738558766299":[],"73573856":[],"73752910":[],"7386068":17,"73it":[],"74":6,"740":[],"74081822":8,"741264":[],"74126425":[],"742975":[],"74297504":[],"74368436":[],"743u":[],"7448615806559786":[],"7469898175164704":[],"74840212":5,"7484669886413582":[],"749765":22,"75":[2,5,6,8,11,22],"7501749450963715":[],"750445":22,"750u":[],"75106135":[],"75118364":[],"751275":5,"75127504":5,"751699":11,"75170092":5,"75350216":17,"75361646":19,"753846153846155":[],"7546383166870465":[],"75517445":[],"756232":[],"75623206":[],"756352":22,"75703965":[],"757040":[],"758193":[],"75819326":[],"75838233":[],"75it":[],"76":[2,20,22],"76060096":[],"76063234":19,"76066069":[],"763u":[],"7643536":[],"765":7,"76529528":[],"76674796":[],"76731400e":[],"76802186":[],"768813":[],"76881337":[],"76923076923077":[],"76936315":5,"7694444444444445":1,"77":[2,20,22],"77034458":[],"770345":[],"7705527590466072":11,"77085375":19,"77152076":5,"7718":9,"773329728649545":[],"77332973":[],"77333117e":[],"774300":[],"77494715":22,"775":[],"77559332":19,"77618224":[],"77627886":[],"77632220e":[],"77636e":13,"77662945":[],"7767978193240488":[],"77711437":[],"77714169":8,"77754132e":[],"7782028952":4,"77865169":[],"77954956e":5,"78":2,"78011544":[],"78156479e":[],"78184120e":6,"78286771":17,"7843182645426894":[],"7846153846154":[],"785061":22,"7851533175757255":5,"78596961":13,"78674758":22,"787349":[],"7873493":[],"78752269":[],"78941903":5,"78988962e":[],"79":2,"79009329":[],"790818":5,"79081838":5,"79093776":[],"79111643":5,"791123":[],"79135075":17,"79145214e":[],"7923086060375724":19,"79230861":19,"793167":22,"79394867":[],"7939646":[],"794282":11,"79441434":13,"79449156":[],"79512696":13,"79552752":22,"79602861":[],"79754246":[],"797e":6,"79856831e":[],"798761":[],"79876149":[],"7bsq":[],"7c394b1e8b71":[],"7d7d58":[9,10],"7f2b3a6174c2":[],"7jexgh5soo":[],"7m":[],"7odqolophta":[],"8":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,17,19,22],"80":[0,1,2,5,6,8],"800":[4,7],"800615":[],"80162359":[],"802796":[],"80279641":[],"80280228":22,"80315282":[],"803153":[],"80354994":6,"803804":[],"80380438":[],"80469739":5,"8049181":17,"8055555555555556":1,"80561191":[],"80609615e":6,"80609616e":6,"8064":[],"80661365":[],"806614":[],"80728853":19,"80734875":[],"807349":[],"80738685":[],"8074242":22,"80747253":[],"80842254":[],"808423":[],"80847477e":6,"80994952":13,"81":[1,2],"81048318e":6,"8108619":[],"81160425":5,"81187794":[],"81333804":6,"81333805":[],"81388724e":[],"814":[7,11],"815563":[],"81592628":17,"815am":[20,22],"81633628":11,"816454":22,"81671821":[],"81681019":22,"816847":22,"8175":[],"81912272":22,"8192798":17,"81955926":22,"81974332":[],"82":2,"82073684":17,"8219235992494145":[],"8219236":[],"82198978":5,"82358522":19,"823585220707946":19,"82454365":17,"82484316":22,"82650876":[],"826509":[],"8265786":5,"82747653":[],"827477":[],"82773778":[],"828190347382744":19,"82819035":19,"829648415811072":[],"82964842":[],"82997013e":5,"83":[2,22],"8305555555555556":1,"8338786":22,"834027":11,"83402742":11,"83512277":5,"836874":[],"83687444":[],"83698677":[],"83757843":13,"839818":22,"83982725":22,"83999999999999":[],"83it":6,"84":2,"84062065":[],"84203538":[],"84228957e":[],"84232163":[],"842436":22,"84292394":[],"842u":[],"84310736":19,"84355903e":1,"84443254e":1,"84569271":[],"84653115":17,"84780262":6,"84854738":[],"848618":5,"84861838":5,"84886051":[],"848861":[],"84923989e":6,"84924834":[],"84942942":22,"84977962":11,"84994524":5,"85":[1,2],"850164":5,"8503720991789538":[],"85065653":19,"85086629":17,"85091337":[],"85120833":17,"85263220":6,"8527777777777777":[],"85278920e":[],"853241":[],"85324115":[],"853835":22,"853u":[],"8548082":17,"8557822":17,"85601992":5,"85694362":22,"85758696":[],"858":[],"858185":22,"8583333333333333":1,"85843684":22,"85953586":[],"85959007":[],"86":2,"8608479":[],"860848":[],"861":[],"86117291":5,"86134827":5,"86145244":11,"861676":22,"86171505":[],"86252988":6,"86361743":22,"8638888888888889":1,"86425056":[],"864251":[],"86478158":[],"86546962":[],"86550074":19,"86623151":[],"86630":[],"8666666666666667":1,"86810":[],"86879198":[],"868792":[],"86893619":[],"869":[0,22],"86905621":[],"86925797":[],"869258":[],"87":[],"870":[0,22],"8702784034":4,"8705211":17,"871":[0,22],"87191952":[],"871920":[],"872":[],"8722222222222222":1,"87243817":19,"873":[0,22],"87327414":[],"87381451":5,"874":[0,22],"874951":[],"87495119":[],"875":1,"8759":13,"876":6,"87625493":[],"87647541":[],"876664":[],"87666423":[],"87667593906086":19,"87667594":19,"8768":[],"878123":22,"878297":[],"87836018":[],"87849647":22,"8792323":17,"879271":[],"87927126":[],"87927601":22,"87940752":[],"87it":[],"88":[2,13],"88001352":17,"88017651":[],"880177":[],"88031314":[],"88046261":5,"8805555555555555":1,"88063413":17,"88118231":[],"88137798":11,"88168312e":6,"881788":[],"8826033":19,"883":[],"88336879":5,"884":[],"88477619":[],"885":[],"88512489":[],"88529063e":6,"8855417382991412":[],"88554174":[],"88560514":19,"88595926":22,"886":[],"8866190885623907":19,"88661909":19,"88679947":[],"887":[],"887366":[],"88736621":[],"88746795":19,"8879":[],"88871662":[],"8888888888888888":1,"889080":[],"88908038":[],"8894":[],"889686":[],"89":2,"89045167":17,"8916666666666667":[],"89274639":[],"89288636":11,"89298533":[],"89335182":[],"893352":[],"893489":[],"89348922":[],"89410423":5,"8944444444444445":1,"89545727":13,"89550839":[],"89565264":[],"89582298":19,"8962476":[],"896248":[],"89873772":[],"89876748":[],"8991514":[],"89944994":[],"899450":[],"8f":6,"8g":6,"8n":17,"8x8":1,"9":[0,1,2,3,4,5,6,7,8,9,11,12,13,14,17,18,19,20,22],"90":[1,2,6],"900449":[],"9005135872087155":[],"90054363":[],"90066122":17,"9007164":17,"90075537":5,"9011":6,"90220243":5,"90266948":5,"90268858":[],"9027777777777778":1,"9033":[],"903824":[],"90382431":[],"904":[],"9040":9,"90475506e":6,"90540529":[],"9055555555555556":1,"90559087":[],"905591":[],"90595152":17,"906747":5,"90694878":17,"9083333333333333":[],"90884627":[],"90895045":[],"90940378":[],"90999452e":[],"91":[0,20,22],"910":[],"9111111111111111":1,"91124889":19,"91128596":5,"912u":[],"913":[],"91379157":[],"913791573406831":[],"91383439":[],"91396388":[],"914":[],"91416375":[],"91479093":[],"91492986e":6,"915":[],"91511388":[],"91549644":[],"916":[],"91616374":[],"916164":[],"9166666666666666":[],"91682433":[],"917":[],"91760278":5,"918":[],"91812702":5,"918992":22,"919":[],"9196398947631166":22,"91it":6,"92":[6,20,22],"92087142":19,"9212905":[],"921291":[],"92143477":[],"921435":[],"92208477":[],"922085":[],"92272314":[],"922u":[],"92343595":[],"923602":22,"92373266":22,"924018":[],"92461411":[],"92477093":[],"924e":6,"925":1,"92507116e":1,"9252772":[],"92578916":5,"92603747":[],"92626212":[],"92631966":11,"926320":11,"926583":[],"92658312":[],"92754397":[],"927544":[],"9277777777777778":1,"92811987":[],"92817032":[],"92819235":[],"92857143":7,"92888885":22,"92921648":19,"92968793":17,"92it":[],"93":[],"93037171":[],"930372":[],"9305555555555556":1,"930583":[],"930683":[],"931":[0,22],"93155188":5,"93158979":5,"93188452":[],"931885":[],"93248252":[],"932483":[],"932u":[],"933":5,"93325497":22,"93414191":[],"93492130e":6,"93579127":[],"93586895":11,"935u":[],"9361111111111111":[],"936762":[],"93676229":[],"936856":[],"93685631":[],"937":19,"937082":22,"93799826":5,"938":19,"9387":[],"939":[0,19,22],"94":[7,19],"9400":[],"94054854":[],"940549":[],"940776":[],"94077605":[],"94107596":[],"941866404575299":[],"94212937":[],"94226022e":6,"9424":6,"94284104":5,"94320205":5,"94321297":17,"9444444444444444":1,"945":[],"94548496":[],"94591015":[17,22],"946":[],"94639099":11,"946393":[],"94659383":[],"946957":5,"947":[],"9472222222222222":1,"94735055":[],"947903":[],"94790323":[],"948":[],"94822514":6,"9482527":5,"948641":[],"949":[],"94905663":19,"94915262":[],"94986593":11,"95":[1,7,11],"95008046":6,"95054046":22,"95079764":[],"95231424":5,"9524":6,"9527777777777777":1,"95284275":5,"95302":11,"953065564":1,"95351665":5,"9538239":22,"954":19,"95446837":[],"9549351910143222":[],"954988":[],"954u":[],"9555555555555556":1,"95569422":[],"955820c21e8b":4,"956563":11,"95684892":5,"95703":13,"95714723":[],"957147232685324":[],"957421":[],"95742107":[],"958228616652075":[],"9582286166520774":5,"958476":[],"95994091":22,"95it":[],"96":[6,7,11],"960":19,"9601304850018328e":[],"960130485007504e":6,"960130485007934e":[],"9601304850213484e":[],"96013048502692e":6,"96024953":5,"96032148":[],"96084663":5,"961":19,"962":19,"9626883":17,"962990":22,"9635449873404844":[],"9637117593816477":6,"96390357":[],"9640435":5,"964268":[],"96426825":[],"964735":[],"96473528":[],"96489434":[],"9649652536":4,"96527903":[],"96551427e":[],"965548":22,"96601782":[],"96606158":[],"96620033":[],"96653373":[],"96670977":[],"96686324e":[],"96688672":5,"966899":22,"9674916":5,"967536":11,"9675364":11,"9678":[],"967809":11,"96812218":17,"96863851":[],"96987657":[],"96992454":[],"96it":6,"97":7,"97005689":5,"970057":[],"970477":5,"97047717":5,"97065296":[],"97108e":13,"97117751":[],"97202":[],"9722222222222222":1,"97230501":[],"97243128":5,"97300836":5,"97434186":17,"97477238":22,"97497404e":6,"975":1,"97507735":5,"97547354":[],"97547354476579":[],"975510299261579":[],"9760832":[],"97705827":5,"977418":[],"97758848":5,"9777777777777777":1,"977880":[],"97788031":[],"9780387310732":21,"9780387848570":21,"9781492032632":21,"97840468":22,"978553":5,"97898392":6,"97926491":5,"97it":6,"98":[0,1,7],"980":[],"98017611":[],"98036405":[],"9805555555555555":1,"98091621":5,"981321":22,"98139097":5,"98153145":17,"98248312":5,"98249059":[],"982491":[],"98266587":[],"98275501":5,"982758":[],"98275836":[],"98316352":11,"983164":11,"983310":22,"98346748":[],"9835443722554817":[],"98399675":[],"98413059":5,"984525":5,"98454786":5,"98467494":[],"985":19,"98566191":5,"986":19,"9861111111111112":1,"986699":5,"98680716":5,"98699753":17,"98716878":5,"98740124":19,"98756882":[],"98794823":[],"9879924":[],"98808176":5,"98822371":6,"9888888888888889":1,"989":19,"9890348":5,"9893149172528393":[],"9893447":5,"9898254753574576":[],"98982548":[],"9898ff":[9,10],"99":[6,7,11,13],"990":[],"99009525":5,"9902552771282336":[],"99049330":[],"99051150":6,"99088801":5,"991":19,"99115119":5,"99157584":[],"99176998":5,"992":19,"99242921":5,"99265097":5,"99274513":[],"993":19,"99316252":5,"99353454":[],"993535":[],"993537":[],"99353748":[],"99371056":5,"99374388":22,"993865":[],"99389612":5,"993972":[],"99397245":[],"9940672992288855":19,"9943201":5,"99435648":[],"9947756":5,"99492986":5,"99498108":[],"99519225":[],"99528218":5,"99539415":5,"9955282554647219":[],"9956582":22,"99566069":5,"99578809":5,"99594988":[],"995950":[],"996":5,"99608161":5,"9963961":5,"99650061":5,"9967458":5,"99700706":5,"99709215":5,"99724883":[],"99729756":5,"99751458":5,"99758326":5,"99775587":5,"99775949":[],"99793613":5,"99799099":5,"99813653":5,"99820454":22,"99828624":5,"99829953":[],"9983295":5,"99845267":5,"998577":5,"99861053":5,"99871521":5,"99881845":5,"99884384":5,"99893323":5,"999":[9,19],"99901896":5,"99903755":5,"99911427":5,"99918546":5,"99919837":5,"99926459":5,"9993237":5,"99933188":5,"99938942":5,"9994385":5,"99944272":5,"99949306":5,"99953381":5,"99953475":5,"99957911":5,"99961294":5,"99965056":5,"99967865":5,"99970988":5,"9997332":5,"99975913":5,"99977416":[],"99977849":5,"99980002":5,"9998161":5,"99984732":5,"99987324":5,"99989476":5,"99991263":5,"99992698":11,"999927":11,"99992746":5,"99993978":5,"99995":5,"9999555851685968":[],"999955585168597":6,"9999840939906267":[],"9999858320366368":[],"9qcu8vcxxru":[],"9x":6,"9y":6,"\u00f8yvind":6,"abstract":1,"boolean":4,"break":[0,4,6,11,14,22],"byte":[17,22],"case":[0,1,2,3,4,5,6,7,11,12,13,14,16,17,22],"catch":[0,22],"char":[],"class":[0,1,3,4,6,7,8,9,11,12,13,19,22],"const":[],"default":[0,1,2,4,6,7,13,17,22],"do":[0,2,3,4,5,6,8,9,10,11,12,13,14,15,17],"ekstr\u00f8m":4,"eng\u00f8i":[],"export":9,"f\u00f8470":[20,22],"final":[0,1,2,3,4,5,6,7,8,9,10,11,13,14,18,19,20,22],"float":[0,3,4,5,9,11,13,14,17,22],"function":[2,3,4,5,9,14,15,16,17],"import":[0,1,2,3,4,6,7,8,9,10,11,12,13,14,19],"int":[0,1,2,3,4,5,6,11,13,14,17,19],"long":[0,1,3,4,12,13,22],"m\u00f8svatn":6,"new":[0,1,2,3,5,6,7,8,9,10,11,13,14,17,22],"null":22,"public":[0,3,4,14,16,22],"return":[0,1,2,3,4,5,6,7,8,9,11,13,14,17,19,22],"s\u00f8rli":[],"s\u00f8rlie":[],"sch\u00f8yen":6,"short":[4,5],"steinsv\u00e5g":[],"super":5,"switch":0,"throw":[3,6,19],"true":[0,1,2,3,4,5,6,7,8,9,10,12,13,14,15,17,19,22],"try":[0,1,2,4,5,6,7,8,9,10,11,13,14,15,16,17,19,22],"var":[1,5,6,10,11,13,19,22],"while":[0,1,3,4,5,6,7,8,9,11,12,13,19,22],A:[2,3,5,6,7,10,11,12,13,16,17,18,19,20,21],AND:2,And:[0,3,4,5,6,9,13,16,19],As:[0,1,2,3,4,5,6,8,10,12,13,17,19,22],At:[0,4,6,13,22],BE:[0,22],Be:[2,16,22],Being:13,But:[0,1,2,3,5,6,9,10,19],By:[0,3,5,6,12,13,17,22],For:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,21,22],IF:6,IN:21,If:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,15,16,17,19,22],In:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,19,21,22],Is:11,Ising:[5,12],It:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,16,17,19,22],Its:[1,2,4,11],NO:[7,11],No:[3,4,6,8,9,14,22],Not:[0,1,5,6,22],OR:19,Of:19,On:[0,3,15,18,19,20,21,22],One:[0,1,3,4,5,6,7,8,11,12,13,19],Or:[0,1,6,22],Such:[0,6,12,19],That:[0,5,7,10,11,12,14,19,22],The:[4,10,13,14,15,17,18,19,20,21],Then:[0,1,6,8,9,10,11,12,13,14,17,22],There:[0,3,4,5,6,8,9,11,12,14,17,18,19,20,22],These:[0,3,4,5,8,9,10,11,12,13,14,15,17,19,20,22],To:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,17,19],With:[0,5,6,8,9,10,11,12,14,17,19,22],_0:[5,8,10,11,13],_1:[2,5,6,8,10,11,12,13,14,17],_2:[2,5,8,11,12,13,17],_3:17,_4:17,_9:13,_:[0,1,2,4,5,6,7,8,9,10,11,12,13,17,22],_________________________________________________________________:[],__call__:[],__class__:10,__doc__:6,__future__:[8,9],__getitem__:[],__init__:[1,3,4,14],__main__:2,__mosek:[],__name__:[2,10],__traceback__:[],_api:[3,4,14],_asarrai:[],_auto10:[6,12],_auto11:6,_auto12:6,_auto1:[2,3,4,5,6,7,12,13,17,19],_auto2:[2,3,4,5,6,12,13,17,19],_auto3:[3,4,5,6,12,13,17],_auto4:[4,6,12,13,17],_auto5:[4,6,12,13,17],_auto6:[4,6,12,17],_auto7:[4,6,12,17],_auto8:[6,12],_auto9:[6,12],_ax:[],_base:8,_build:[0,16,21,22],_build_call_output:[],_c:1,_call:[],_call_flat:[],_check_1d:[],_check_optimize_result:[7,11],_compon:11,_config_pb2:[3,4,14],_coordinate_desc:6,_copy_docstring_and_deprec:[],_cpgg0jyh8m:[],_decor:[0,22],_depth:9,_fraction:9,_get_lin:[],_getitem_multilevel:[],_handl:[],_i:[0,1,2,5,6,7,8,11,12,13,15,22],_inference_funct:[],_interpolatefunctionerror:[],_is_primit:[],_j:[0,1,2,3,5,6,8,13],_jit_compil:[],_k:13,_l:12,_lambda:[6,22],_leaf:9,_logist:[7,11],_m:10,_make_vjp:[2,13],_maybe_define_funct:[],_multilayer_perceptron:1,_n:[2,5,8,11,13],_node:[2,9,13],_notokstatusexcept:[],_np:[],_num_output:[],_p:[5,8],_plot_arg:[],_process_traceback_fram:[],_r:[],_ratio:11,_sampl:9,_select_forward_and_backward_funct:[],_split:[6,9],_src:[],_stateful_fn:[],_stateless_fn:[],_sy:[3,4,14],_t:13,_test:6,_trace:[2,13],_valu:[2,13],_varianc:11,_weight:9,a0:3,a0faa0:[9,10],a1:[0,22],a2:[0,22],a3:[0,22],a4:[0,22],a_0:[0,22],a_1a:[0,22],a_2a:[0,22],a_3:[0,22],a_3a:[0,22],a_4:[0,22],a_4a:[0,22],a_:[0,1,17,22],a_h:1,a_i:[0,1,2,12,22],a_j:[1,12],a_k:[0,1,12],a_ndim:[],aaron:21,ab:[0,2,5,13,14,22],ab_channel:16,abandon:1,abbrevi:18,abid:19,abil:[0,10,22],abl:[0,1,4,5,6,7,10,12,13],abort:[],about:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,16,17,20],abov:[0,1,3,4,5,6,7,8,9,10,11,12,13,14,15,17,19,21,22],abovement:6,abscissa:13,absolut:[0,2,5,6,13,22],acceler:13,accept:[0,3,6,9,22],access:[0,3,11,19],accid:[4,6],accmod:[],accompani:[0,22],accomplish:[8,9,13],accord:[0,1,2,5,6,9,12,13,14,15,19,22],accordingli:11,account:[0,3,5,13,15,19,22],accumul:[12,13,19],accur:[0,3,4,6,10,13],accuraci:[0,1,3,4,5,6,7,9,10,11,12,22],accuracy_scor:[0,1,10,22],accuracy_score_numpi:1,achiev:[0,1,5,6,8,12,17,22],aco:19,acquaint:[16,22],acquir:[1,16,22],acr:0,across:[1,3,6,9,16,22],act:[1,3,17],action:19,activ:[0,2,3,4,9,18,20,22],actual:[0,1,4,5,6,8,11,17,19,22],ad:[1,3,4,5,8,13,15,17],ada_clf:10,adaboostclassifi:10,adadelta:13,adagrad:[],adam:[1,3,4,20,22],adapt:[4,6,13,21],add:[0,1,2,3,4,5,6,8,10,11,12,15,19,22],add_lin:[],add_outgrad:2,add_subplot:[1,7,12,14],addendum:5,addit:[0,2,3,5,6,7,8,9,10,12,13,15,16,17,19,20,21,22],addition:[12,13],address:[1,9,11,13,22],adjac:[3,12],adjoint:5,adjust:[0,5,12,13],admir:[0,22],advanc:[4,6,12,21,22],advantag:[1,3,5,6,10,13,17],adversari:22,afecionado:22,affect:3,affin:[0,3,8,11],afford:3,aficionado:22,aforement:14,african:0,after:[0,1,2,4,5,6,9,11,12,13,15,16,17,19,22],afterward:[0,22],ag:[0,7,18,22],ag_0:2,again:[0,1,4,5,6,7,8,10,11,12,13,15,19,22],against:[1,4,7,10],agegroup:7,agegroupmean:7,aggreg:[9,10],agorithm:10,agre:[5,6,19],agreement:13,ahead:9,ai:[0,21],aid:11,aim:[0,1,4,6,7,11,14,15,16,17],ainv:5,airplan:3,aka:5,al:[0,2,4,15,21,22],alarm:[5,7],algebra:[0,3,5,13,16],algo:[],algorithm:[0,1,2,4,5,6,7,8,13,14,16,17,19,21,22],align:[0,2,5,6,7,8,13,19,22],all:[0,1,2,3,4,5,6,7,9,10,11,12,13,14,15,16,17,18,19,20,21,22],allevi:[1,13],alloc:[3,17],allow:[0,1,2,3,5,6,8,10,13,15,16,17,22],almost:[0,1,6,8,11,13,19,22],alon:[2,9],along:[2,3,4,5,6,9,10,11,16,17,22],alpha:[0,1,2,3,4,6,7,8,9,10,13,14,19,22],alpha_0:3,alpha_1:3,alpha_2:3,alpha_:10,alpha_i:[3,13],alpha_k:13,alpha_m:10,alpha_n:3,alpha_opt:13,alreadi:[2,3,4,5,6,10,12,16,17,19,22],also:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,22],alter:1,altern:[0,1,4,5,6,7,8,9,11,13,17,22],although:[0,1,5,6,8,10,13,22],alwai:[0,3,5,6,12,13,19,22],am:4,ame2016:[0,22],american:0,among:[0,3,5,9,10,12,17,22],amongst:5,amount:[0,1,3,4,6,8,10,14,16],an:[1,2,3,5,6,7,8,9,11,12,13,14,15,16,17,19,20,21],an_:19,anaconda3:[],anaconda:[0,1,15,16,22],analog:13,analys:6,analysi:[1,3,4,7,14,15,17,21],analyt:[2,3,5,6,7,12,13,15,16,22],analyz:[0,1,3,4,5,6,14,19,22],andrew:1,angl:[0,3,9],anharmon:3,ani:[0,1,2,3,4,5,6,7,8,9,10,12,14,19,22],anim:[4,12],ann:12,annot:[0,1,3,7,8,22],announc:22,anoth:[0,1,3,4,5,6,7,8,10,11,12,13,17,19,22],anp:2,ans_vspac:2,ansatz:[0,22],answer:[0,1,3,5,6,17,20,22],antialias:[2,6],anticip:4,anymor:[1,8],anyon:[4,8],anyth:[1,19],anytim:[20,22],apach:1,apart:[11,13],api:[1,3,4,14,16,22],appar:2,appear:[0,1,3,13,17,19,22],append:[1,3,4,8,9,13,22],appendcon:[],appendvar:[],appli:[0,1,2,3,4,6,7,8,9,10,11,12,13,15,19,21,22],applic:[0,1,3,4,5,6,7,9,12,13,17,19,21,22],apply_gradi:4,approach:[1,2,4,5,6,9,10,11,12,13,16,19,21],appropri:[2,6,9,12,13,16,19],approv:22,approx:[0,2,3,6,10,11,13,19,22],approxim:[0,1,2,3,4,5,6,7,10,11,13,19,22],apt:[0,15,16,22],aq:19,ar:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22],aragorn:22,arang:[1,3,4,6,7,9,10,12,13,22],arbitrari:[1,4,6,8,12,13,19],arbitrarili:[0,1,11,22],arc:6,architectur:[3,4,12],area:[0,3,6,21,22],arg:[0,2,13,22],argc:[],argmax:[1,11],argmin:[4,10,14],argnum:[2,13],argnum_0:2,argnum_1:2,argsort:11,argu:[1,13],argument:[0,2,3,5,6,11,12,13,22],argv:[],argval:2,aris:[0,6,12,13,19,22],arithmet:[0,13,17,22],arm:6,arma:[],armadillo:17,around:[0,1,4,5,6,11,19,22],arr:2,arrai:[0,1,2,3,4,5,6,7,8,9,11,12,13,14,16,19],arrang:[3,22],arraybox:13,arriv:[0,6,9,11,17,19,22],arrow:12,arrowprop:8,art3d:13,art:[0,1,15,16,22],articl:[0,3,4,6,10,22],artifici:[0,2,7,12,21,22],artificialneuron:12,arug:13,arxiv:[3,4],as_fram:[],asap:22,asarrai:[0,2,6,9],asc:[],ascii:[],ashrafi:[],ask:[5,6,11,12],aspect:[0,6,16,22],assembl:[0,3,22],assert:4,assess:[0,6,22],assici:4,assign:[0,7,8,9,12,13,14,18,20,21,22],associ:[0,6,9,12,14,19,22],assum:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,17,19,22],assumpt:[0,3,5,6,9,11,19,22],ast:[0,5,6,22],astronomi:22,astyp:[4,9,10],asymmetri:[0,22],asymptot:[4,6],async_wait:[],atla:22,atoi:[],atom:[0,22],attempt:[0,4,6,7,8,10,22],attend:18,attent:[0,17,22],attr:[],attract:[0,10,22],attribut:[0,9,13,22],attributeerror:13,audi:[0,22],audio:[3,4],august:[15,22],aurelien:[0,15,18,21,22],austfjel:6,author:[0,1,3,4,10,14,19,22],authour:22,auto:[6,9,10,19],autocor:19,autocorrelation_tim:19,autocorrelform:19,autocovari:19,autoencod:[4,16,22],autoencond:16,autograd:[16,22],autograph:[3,4,14],autom:[0,16,21,22],automac:17,automag:22,automat:[0,1,2,3,4,11,16,17,22],automobil:3,autonom:4,avail:[0,1,4,6,10,11,15,16,17,18,20,21,22],averag:[0,1,3,6,9,10,13,14,19,20,22],avg:[],avoid:[0,4,5,6,9,11,13,17,22],avx2:[],avx:[],awai:[2,3,6],awar:[2,10],award:[20,22],ax:[0,1,2,3,4,6,7,8,9,10,11,12,13,14,17,22],axes3d:[2,6,13],axes_grid1:6,axessubplot:[],axhlin:8,axi:[0,1,2,3,4,6,7,8,9,10,11,12,13,14,17,19,22],axiom:5,axlabel:[0,22],axvlin:[4,8],axvspan:4,b1:8,b2:8,b3:8,b:[0,1,3,4,5,6,8,9,10,12,13,14,15,19,20,22],b_0:0,b_1:[0,2,12,13],b_2:[0,13],b_5:13,b_:[0,1,17],b_group:9,b_i:[0,1,2,12,22],b_ia_:[0,22],b_ia_i:0,b_index:9,b_is_vec:[],b_j:[1,12],b_k:[0,1,12,13],b_m:12,b_meta:[],b_score:9,b_valu:9,bachelor:[18,20],back:[0,3,4,5,6,8,9,10,15,17,19,22],backbon:17,backend:[1,4],background:[21,22],backpropag:1,backtrack:9,backup:17,backward:[1,2,4,12,17],backward_pass:2,bad:6,badli:19,bag:[9,16,22],bag_clf:10,baggin:22,baggingboot:10,baggingclassifi:10,baggingtre:10,balanc:6,band:17,bandwidth:17,bar:[0,6,11,15,22],barber:21,bare:[4,10],base:[0,1,3,4,5,7,8,9,10,14,16,19,20,21,22],basi:[5,7,8,10,11,12,13,17],basic:[2,6,8,12,13,14,16,19,22],batch:[3,4,11,12,13],batch_shap:4,batch_siz:[1,3,4],batchnorm:4,bay:7,bayesian:[5,16,21,22],bbupeevmxtg:[],bc298b802fe2:[],beam:22,becattini:20,becaus:[0,1,2,3,4,5,6,8,9,12,13,14,22],beccatini:22,becom:[0,1,2,5,6,7,9,12,13,19,22],been:[0,1,2,3,4,5,6,11,12,13,16,17,22],befor:[0,1,2,3,4,5,6,7,8,12,13,14,17,19,22],beforehand:[0,19,22],begin:[0,1,2,3,4,5,6,7,8,9,11,12,13,14,17,19,20,22],behav:[1,6,13],behavior:[0,1,13,22],behaviour:12,behind:[0,1,6,8,13,22],behnoosh:[],being:[0,1,2,3,4,5,7,8,10,11,12,13,19,22],believ:[9,17],belong:[7,8,9,13,14],below:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,17,19,22],benchmark:10,bendik:[],benefici:[1,13],benefit:[0,1,4,11,13,15,16,22],bengio:[1,18,21,22],benign:[1,7],bennosh:[],besid:[4,5],bessel:5,best:[0,1,2,3,4,5,6,7,8,9,10,12,13,20,22],beta:[0,1,3,5,6,7,10,11,13,22],beta_0:[0,1,3,5,6,7,13,22],beta_0x_:[0,22],beta_1:[0,1,3,5,6,7,10,13,22],beta_1x_0:[0,22],beta_1x_1:[0,7,22],beta_1x_2:[0,22],beta_1x_:[0,22],beta_1x_i:[7,13],beta_2:[0,3,13,22],beta_2x_0:[0,22],beta_2x_1:[0,22],beta_2x_2:[0,7,22],beta_2x_:[0,22],beta_3:3,beta_:[0,3,6,7,13,22],beta_i:[0,3,5,22],beta_j:[0,5,6,13,22],beta_k:13,beta_linreg:13,beta_m:10,beta_mg_m:10,beta_n:3,beta_p:7,beta_px_p:7,betavalu:5,better:[0,1,2,3,4,6,9,10,11,12,13,22],between:[0,1,2,3,4,5,6,7,8,9,11,12,13,14,19,22],beyond:[0,1,5,6,8,13,22],bf:[13,14,17,19],bgd:13,bia:[0,1,2,3,5,8,9,10,12,13,22],bias:[1,2,3,5,6,9,12],big:[0,1,2,5,6,14,22],bigger:[1,6],bigr:12,bike:9,bilbo:22,bilek:[],billion:[3,12,16],bin:[0,7,19],binari:[0,3,5,7,9,10,12,22],binarycrossentropi:4,bind:0,binomi:[16,19,22],binsboot:6,bioinformat:[0,22],biolog:[1,12],bios1100:[16,22],bird:[0,3,22],birth:22,bishop:[18,21,22],bit:[1,4,17,19,22],bitwis:[3,4,14,19],bivari:2,bk:[0,13],bla:[17,22],black:[8,9,14],bledso:22,blob:22,block:[6,10,16,17,19,22],blockingavg:[],blockingstd:[],blockingvar:[],blocksiz:[],blocksizemax:[],blocksizemin:[],blogpost:4,blue:[0,3],bluntli:22,bmatrix:[0,1,3,5,7,8,11,13,17,22],bmi:1,bodi:[0,1,4,12,22],bold:1,boldfac:[0,5],boldsymbol:[0,1,2,3,5,6,7,8,10,11,13,14,15,22],boltzmann:[12,16,22],book1:21,book:[21,22],boost:[1,9,16,22],boostrap:10,bootavg:[],bootstd:[],bootstrap:[1,13,16,22],bootvar:[],bootvec:[],borrow:22,boston_dataset:0,bot:8,both:[0,1,4,5,6,8,9,10,13,14,15,16,17,19,20,22],bottl:7,bound:[0,8,12],boundari:[2,4,8,11,12],boundkei:[],box:[2,4,9],boxed_arg:2,boyd:[8,13],bracket:[4,19],brain:[1,7,12],branch:9,breast:[5,7,11],breviti:13,brew:[0,15,16,22],brg:8,briefli:[0,22],bring:[0,5,6,10,22],broad:[0,22],brought:[13,16,22],brownle:4,browser:22,brunton:[],brute:[3,5,11],bs:[8,9,10],buffer_s:4,bui:4,build:[0,4,5,6,10,17,19,22],built:[0,1,3,4,6],bunch:11,busi:0,bx:[],bzl:[],c1:[8,11],c2:[8,11],c95af3df0cdd:[],c:[0,1,2,4,5,6,7,8,9,10,11,12,13,14,15,16,17,19,20,21],c_0:19,c_1:12,c_2:12,c_3:12,c_4:12,c_:[0,8,9,10,13,19],c_i:[12,13],c_k:19,ca:[1,22],cabc613b8702:[],cach:10,cal:[0,8,10,12,13,15,22],calcul:[0,1,2,4,5,6,8,9,10,11,12,13,14,15,17,19,22],california:[],call:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,19,20,22],callabl:[],callback:[],calor:0,cambridg:[13,21],can:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,19,20,21],cancel:[0,13,22],cancellation_manag:[],cancer:[5,10],cancerpd:7,candid:[8,9,10],cannot:[0,1,4,5,6,7,8,9,18,19,22],canopi:[0,15,16,22],canva:22,cap:5,capabl:[0,1,8,13,16,22],capac:[2,20],capita:0,captur:[4,11,12],captured_input:[],car:[3,4],card:[0,7,22],cardin:1,care:11,carefulli:13,carlo:[0,6,16,19,21,22],carri:[2,6,7],cart:10,carvalho:[],casella:21,cast:1,cat:[3,4],categor:[0,1,3,9,11,22],categori:[0,1,3,7,10,12,14,22],categorical_crossentropi:[1,3],caus:[0,5,6,19,22],causal:0,causat:[0,22],cax:1,cb:[6,22],cbar:1,cbook:[],cc:[0,1,5,13,22],ccc:[5,12],cd_fast:6,cdf:19,cdot:[0,2,6,12,13,14,17,19,22],celebr:13,cell:[0,2,3,4,6,8,9,10,13,14,15,22],center:[0,1,6,7,8,9,11,14,19,22],centr:[],central:[0,3,5,6,8,17,22],centroid:[14,19],centroid_differ:14,centuri:3,certain:[0,3,6,7,9,19,22],cg:13,cha:0,chain:[0,1,13,16,19,22],chanc:[1,5,13,19],chang:[0,1,2,3,4,5,6,8,9,11,12,13,14,17,19,22],channel:3,chapter3:0,chapter:[0,6,10,11,17,21,22],charact:[0,3,5,22],character:[8,9,10,12,19],characterist:[0,1,3,10,13,22],charg:[0,22],charl:0,chase:4,chat:22,chd:7,chddata:7,cheap:5,cheaper:[1,13],check:[0,1,3,4,5,6,11,13,17,22],checkmark:3,checkpoint:4,checkpoint_dir:4,checkpoint_prefix:4,chemic:[],chen:10,chiaramont:2,choic:[0,1,2,3,4,6,9,12,13,14,17,22],choleski:[5,17],choos:[2,3,6,9,10,11,13,14],chosen:[0,1,2,6,8,9,10,13,19,22],chosen_datapoint:1,christian:21,christoph:[18,21,22],cifar10:3,cifar:3,cin:[],circ:[1,12],circl:[0,8,12],circuit:3,circumfer:9,circumv:[1,5,13],ckpt:4,clariti:19,class_nam:[3,9],class_val:9,class_valu:9,class_weight:[],classic:[7,9,13],classif:[0,3,5,6,7,8,11,12,16,21,22],classifi:[0,1,4,7,9,10,11,22],classificaton:1,classifii:10,clean:1,clear:[1,5,10,12,13],clearli:[0,3,5,6,7,8,19],clever:[1,10],clf3:0,clf:[0,6,8,9,10,22],clf_lasso:6,clf_ridg:[6,22],clip:[3,19],clone:20,close:[0,1,2,4,6,8,9,11,12,13,14,19,21,22],closer:[3,5,13],closest:[8,11,13,14],closur:[16,22],cloud:[16,22],cluster:[0,1,4,6,11,16,22],cluster_label:14,cm:[1,2,3,6,8,13],cmap:[0,1,2,3,4,6,8,9,10,22],cmap_arg:6,cmath:[],cmb:18,cmd:9,cmu:[],cn_:19,cnn:12,cnn_kera:3,cntk:[16,22],co:[0,2,3,6,9,13,22],code:[3,4,6,7,8,15,16,17,19,21],coef0:8,coef:[0,22],coef_:[0,5,6,8,9,13,22],coeff:5,coeffici:[0,3,5,6,7,8,9,13,15,17,22],coerc:[0,6,22],coin:[10,19],coin_toss:10,col:[0,11,22],colab:[16,22],cold:9,colinear:0,collaps:8,collect:[0,2,6,10,11,16,19,21,22],collinear:5,color:[0,3,4,6,8,9,10,19],color_channel:3,color_cod:6,colorbar:[1,6],colsample_bytre:10,colsaobject:10,colspec:[0,22],column:[0,1,2,5,6,7,8,9,11,12,17,22],columntransform:9,com:[4,6,16,21,22],combin:[1,2,5,6,7,10,19],come:[0,1,3,4,5,12,13,14,15,22],command:[0,1,22],comment:[0,4,5,6,15,22],commerci:[0,15,16,22],commod:[0,22],common:[0,1,3,5,6,7,9,11,13,14,19,22],commonli:[0,1,4,6,7,9,13,14],commun:[0,12],commut:3,commutatitav:3,compact:[0,1,3,5,6,7,9,11,12,13,14,22],compair:0,compar:[0,3,4,5,6,11,13,15,17,22],comparison:[2,4,13],compat:[3,4,7,14],compet:[0,22],competit:10,compil:[0,1,3,4,13,15,16,17,22],complet:[0,2,3,4,9,12,22],completenn:12,complex:[1,5,8,9,11,12,13,15,22],complic:[0,1,9,13,22],compon:[0,1,3,4,5,6,7,9,14,16,22],components_:11,compos:[9,12,13,14,16,22],compphys:[0,6,16,18,20,21,22],compress:[0,22],compris:6,compromis:5,compulsori:[16,22],comput:[0,1,2,3,4,5,6,7,8,10,11,12,13,15,16,17,18,19,21,22],computation:[0,3,6,9,13,19,22],computationalscienceuio:22,con:[],concat:22,concaten:[2,4,6,14],concav:[1,13],concentr:[0,10],concept:[0,2,16,22],conceptu:[12,13],concern:[0,1,4,7,22],concic:22,conclud:[0,5,13],conclus:1,cond:2,conda:[0,1,15,16,22],condit:[0,2,4,5,6,8,9,11,13,19,22],conduct:[16,22],condwav:2,coneqp:[],confid:[0,5,6,7,8,22],config:[3,4,14],config_pb2:[3,4,14],configur:3,confirm:[5,12],confus:[5,6,7,10,17],confusion_matrix:9,congruenti:19,conjug:[4,8],conjugaci:13,conjunct:3,connect:[0,1,3,4,9,11,12,13,17,22],consequ:[5,6,8,10,12,13],conserv:[5,14],consid:[0,1,2,3,5,6,7,8,9,10,12,13,17,19,22],consider:[0,1,5,13,22],consist:[0,1,2,3,4,6,12,13,19],constant:[0,2,3,4,5,6,8,12,13,14,19,22],constitu:[0,22],constitut:[2,6],constrain:[1,3,5,7,11],constraint:[5,6,8,13],construct:[0,1,2,3,5,6,7,8,9,10,11,17,19,22],contact:[0,22],contain:[0,2,3,4,5,6,7,8,9,11,12,13,14,17,19,21,22],contemporari:22,content:[1,16,17,22],context:[6,10,13],contigu:17,continu:[0,1,2,3,4,5,6,7,8,9,10,12,13,17,19,22],contour:[9,10,13],contourf:[8,9,10],contrast:[1,4,9,10,12],contribut:[0,3,5,13,19,22],contributor:[0,22],control:[0,1,3,9,13,15,16,22],conv2d:[3,4],conv2dtranspos:4,conv:[3,4],convei:22,conveni:[0,5,6,12,13,17,22],convent:12,converg:[1,2,4,5,6,7,8,11,13,14],convergencewarn:[1,6,7,8,11],convert:[0,1,3,4,5,9,11,13,14,17,22],convert_phas:[3,4,14],converter_error_data_pb2:[3,4,14],converttomatrix:4,convex:[4,5,7],convinc:13,convolut:[1,4,16,22],cool:[4,9],coolwarm:6,coordin:[5,12,14],coorel:0,copi:[0,1,2,14],core:[2,3,4,10,13,14,22],corel:22,coronari:7,corr:[0,5,7,11],correalt:[11,16],correct:[0,1,2,3,4,5,7,13,17,19,22],correctli:[1,2,6,7,10],correl:[0,1,3,5,6,7,10,12,13,16,19,22],correlation_matrix:[0,5,7,11],correspond:[0,3,5,6,8,9,11,12,15,16,17,19,22],cortex:12,cosin:[3,6],cost:[0,2,3,5,6,7,8,9,12,13,22],cost_deep_grad:2,cost_funct:2,cost_function_deep:2,cost_function_deep_grad:2,cost_function_grad:2,cost_grad:2,cost_sum:2,costol:13,could:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,17,19,22],coulomb:[0,22],count:[0,9,18,19,20,22],countor:13,coupl:[4,5,6],cours:[0,1,3,5,11,18,20],courvil:[18,21,22],cout:[],cov:[5,6,11,17,19,22],cov_xi:[5,11],cov_xx:[5,11],cov_yi:[5,11],covari:[0,7,16,17,22],covariance_matrix:[5,11,14],cover:[0,5,16,20,21],covert:[0,22],covxi:19,covxx:19,covxz:19,covyi:19,covyz:19,covzz:19,cpj4mh7m9no:[],cpu:1,cpu_feature_guard:[],craft:3,crawford:22,creat:[1,2,3,4,5,6,9,10,11,12,13,16,22],create_biases_and_weight:1,create_convolutional_neural_network_kera:3,create_neural_network_kera:1,create_x:[5,11],credit:[0,7,20,22],crim:0,crime:0,criteria:[0,4,9,10,14,19,22],criterion:[9,10,13],critic:[6,22],cross:[0,1,3,7,9,10,13,16,19,22],cross_entropi:4,cross_val_scor:6,cross_valid:[7,10],crossvalid:6,crucial:[1,19],cs231:3,cs:[18,20],csr_matrix:[17,22],cstdlib:[],csv:[0,4,6,7,9,22],ctnk:1,ctx:[],cubic:0,cumbersom:5,cumsum:[10,11,22],cumul:[7,10,19],cumulative_heads_ratio:10,cup:5,current:[1,2,3,4,6,13,14,21],curs:0,curv:[6,7,10,12],curvatur:13,custom:[6,14],custom_cmap2:[9,10],custom_cmap:[9,10],cutpoint:9,cv:[6,7,10],cvxbook:13,cvxopt:[5,8],cyber:[],cycl:[1,12],d1:[],d2:[],d2_g_t:2,d3:[],d670a873ab0c:[],d985fb40c43d:[],d:[1,2,3,4,5,6,7,8,9,10,11,13,14,17,19,20,22],d_f:13,d_g_t:2,d_net_out:2,da:3,dagger:[5,17],dai:[1,9,16],dalen:[],damp:3,daniel:[20,22],darget:9,darkr:19,dat:[0,22],dat_id:[0,6,7,9,22],data1:14,data2:14,data3:14,data4:14,data:[2,4,5,8,10,12,13,14,17,21],data_handl:[],data_id:[0,6,7,9,22],data_indic:1,data_modul:[],data_panda:22,data_path:[0,6,7,9,22],data_url:[],databas:1,databookuw:[],datafil:[0,6,7,9,22],datafram:[0,4,5,7,9,11,22],datapoint:[1,5,6,7,11,13],dataset:[0,4,6,7,8,9,10,11,13,14,15,22],datatyp:4,date:[15,22],daughter:10,david:21,dbh:1,dbo:1,dcomposit:17,ddot:2,dead:1,deadlin:18,deal:[0,1,3,5,6,8,11,13,14,17,19,22],dealt:0,debt:7,debug:[0,5,6],decad:[0,3,22],decai:[0,13,19,22],decemb:[18,20,22],decent:10,decid:[0,2,3,5,6,9],decim:[0,22],decis:[0,1,8,11,16,21,22],decision_funct:8,decision_tre:9,decisiontreeclassifi:[9,10],decisiontreeregressor:[0,9,10],declar:[0,4,17,22],decompos:[5,6,17],decomposit:[0,6,12,22],decompost:5,deconvolut:3,decor:[0,22],decorrel:[10,13],decreas:[1,2,4,5,6,10,11,13],deduc:[0,22],deep:[3,7,12,13,16,18,21,22],deep_neural_network:2,deep_param:2,deep_tree_clf1:9,deep_tree_clf2:9,deep_tree_clf:[9,10],deepen:[5,16,22],deeper:[0,3,4,22],deeplearningbook:21,deer:3,def:[0,1,2,3,4,5,6,7,8,9,10,11,13,14,19,22],def_covari:19,def_funct:[],default_tim:4,defect:5,defici:5,defin:[0,2,3,4,5,6,7,8,9,10,11,12,13,14,15,17,19],definit:[1,2,5,6,7,8,10,11,12,13,17,19],defint:19,defun:[],defvjp:2,degre:[3,5,6,8,9,10,11,15,19,22],del:1,delet:6,delimit:4,deliv:[18,22],delta:[0,2,3,6,8,12,13,14,22],delta_0:3,delta_1:3,delta_2:3,delta_3:3,delta_4:3,delta_5:3,delta_:[1,17],delta_h:[0,1,22],delta_j:[3,12],delta_k:12,delta_l:[1,3],delta_momentum:13,delta_n:[0,3,22],delug:16,delv:[0,22],demand:13,demonstr:[0,3,5,6,7,11,12,16,22],den:4,denomin:[1,5],denot:[1,2,6,7,13,19],dens:[1,3,4],dense_1:[],densiti:[0,2,6,19,22],depart:[20,22],depend:[0,1,2,4,5,6,7,8,11,12,13,15,16,17,19,22],depict:19,deploy:[0,15,16,22],deprec:[2,6,13,22],deprecate_nonkeyword_argu:[0,22],depth:[0,3,9,10,17],deriv:[0,1,2,6,7,8,10,11,13,16,22],derivati:13,derivative_fn:13,descend:[5,9,11],descent:[0,1,3,7,8,12,22],descr:[],describ:[0,2,4,5,6,8,10,11,12,13,17,22],descript:[0,8,9,22],design:[0,1,3,4,5,6,7,10,11,12,13,15,22],designmatrix:[0,22],desir:[0,2,4,5,13,14,22],despit:[1,12],destroi:17,det:[5,17],detail:[0,6,11,13,14,17],detect:[3,8,12],determin:[0,2,3,4,5,6,8,9,10,11,12,13,17,19,22],determinist:[7,13,19],dev:1,develop:[0,3,5,8,10,11,12,16,17,22],deviat:[0,1,2,4,5,6,19,22],device_nam:[],devis:12,df1:22,df:[4,8,11,13,22],di:0,diag:[5,8],diagnost:[1,10],diagon:[0,5,7,13,17,19,22],diagonaliz:5,diagram:10,diagsvd:6,dice:[6,19],dict:[6,8],dict_kei:[],dictionari:0,did:[0,1,5,6,7,10,11,14,22],die:1,diff1:2,diff2:2,diff:2,diff_ag:2,diffeent:8,differ:[0,1,2,3,4,5,6,7,9,10,11,12,13,14,15,16,17,19,21,22],differenti:[0,3,16,17,22],differential_oper:[2,13],difficult:[0,1,6,10,13,19,22],difficulti:[0,1,13,22],diffonedim:2,digit:[0,1,3,4,6,18,20,22],dilemma:13,dilut:1,dim:[4,11,14,17],dimens:[0,1,2,3,4,5,8,11,14,17,22],dimension:[0,4,5,6,9,11,13,14,16,17,22],dimensionless:[0,3,22],diment:17,dimnsion:4,diod:3,direct:[0,1,2,4,11,12,13,14,22],directli:[1,4,5,6,19],directori:[],disabl:[3,4,14],disadvantag:[0,22],disappear:[3,6],disc_loss:4,disc_tap:4,discard:[6,11],disciplin:[0,3,12,22],disclaim:19,discord:22,discourag:13,discov:[0,22],discover:5,discret:[1,3,5,7,13],discrimin:[4,7,10,11],discriminator_loss:4,discriminator_loss_list:4,discriminator_model:4,discriminator_optim:4,discuss:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,19,21,22],diseas:7,disguis:6,disord:[1,7],displai:[0,1,3,4,5,6,7,8,9,10,11,12,14,19,22],displaystyl:[0,5,22],displot:[],disregard:[0,22],dissimilar:[11,14],dist:14,distanc:[0,8,9,11,14,19],distance_list:9,distinct:[3,7,8,9,10,14],distinctli:8,distinguish:[0,4,7,8,19,22],distplot:0,distribut:[0,1,4,6,7,10,11,13,14,15,16,17,22],distrubut:[0,15,16,22],div:[],dive:[0,8,17,22],diverg:[1,13],divid:[0,1,3,5,6,7,8,9,11,12,19,22],divis:[6,8,9,13,17,19],dna:7,dnn1:4,dnn2_gru2:4,dnn:[0,1,2,4,12,22],dnn_kera:1,dnn_model:1,dnn_numpi:1,dnn_scikit:[0,1,22],doc:[0,6,16,18,20,21,22],document:[4,7,11,13],doe:[0,1,2,3,4,5,6,8,10,11,12,13,17,19,22],doesn:[3,9,12],dog:[1,3,4],domain:[5,8,13],domin:[0,22],don:[0,1,3,5,6,8,11,13,15,16,22],done:[0,2,3,4,5,6,9,10,11,13,17,22],dot:[0,2,3,5,6,7,8,9,10,11,12,13,17,19,22],doubl:[3,4,17,22],doubli:1,down:[0,3,6,9,11,12,13,22],download:[0,1,3,5,6,17,21,22],downsampl:3,dozen:1,dq:6,drag:13,dramat:11,drastic:4,draw:[4,6,10,13],drawback:[0,1,3,13],drawn:[1,4,6,7,11,19,22],drive:[3,4],driven:3,drop:[0,1,5,6,11,13,19,22],dropna:[0,6,22],dropout:4,ds:[],dt:[2,3,13,19],dtype:[0,1,2,3,4,14,17,22],dualiti:6,dub:[0,22],due:[1,2,5,6,8,10,12,13,20,22],dummi:0,dure:[0,1,3,4,8,9,11,16,22],dwell:0,dwh:1,dwo:1,dx:[2,3,8,19],dx_1:19,dx_1p:6,dx_2p:6,dx_mp:6,dx_n:19,dxp:6,dy:[1,8,19],dynam:4,dysth:[],dz:8,e7cu:[],e:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,19,20,22],e_:[0,2,22],each:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,16,17,18,19,20,22],eager:[],eapprox:[0,22],earli:[1,13],earlier:[0,5,7,8,9,11,12,13,22],earthexplor:6,eas:[6,9,14],easi:[0,5,6,7,8,9,10,11,12,13,16,17,22],easier:[5,6,8,9,13,19,22],easiest:13,easili:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,17,22],eastern:[20,22],ebind:[0,22],eblock:9,econometr:22,economi:5,ecosystem:[16,22],ect:18,edg:3,edgecolor:6,edu:13,educ:[0,22],eface79dac2c:[],eff:19,effect:[1,4,10,13,19],effic:1,effici:[0,3,10,13,16,17,19,22],efron:6,egrad:13,eig:[5,11,13,17,19,22],eigen:19,eigenpair:[5,11],eigenvalu:[0,5,8,11,13,17,22],eigenvector:[5,11,13],eight:[17,22],eigval:[17,19,22],eigvalu:[11,13],eigvec:[17,19,22],eigvector:[11,13],eispack:[17,22],either:[1,5,6,7,8,9,10,11,13,15,19,22],ekstrom:[],elabor:19,elarn:3,electr:[0,3,12,22],electron:22,electur:[],eleg:11,element:[1,2,3,4,5,6,7,8,11,12,13,16,17,18,21],elementari:[10,13,17],elementwis:[3,13],elementwise_grad:[2,13],elessar:22,elif:[2,14],elim:17,elimin:[3,8],els:[1,2,3,4,7,9,12,13,17],elu:1,elus:[0,22],email:[18,20,22],embed:[0,11],embodi:6,emit:19,emner:21,emphas:[0,10,16,22],emphasi:[0,16,21,22],empir:[1,11,19],emploi:[0,1,5,6,11,13,19,22],employ:[0,22],empti:[6,10],emul:12,en:[16,21],enabl:11,enbodi:6,encod:[0,3,5,9,11,14,22],encompass:[0,19,22],encount:[0,1,5,6,7,13,19,22],end:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,17,19,20,22],end_box:[2,13],end_nod:[2,13],end_valu:[2,13],endl:[],endpoint:[3,6],energi:[0,4,6],enet_coordinate_desc:6,enforc:12,eng:21,engin:[0,1,3,4,16,22],english:[],enorm:3,enough:[0,6,13,22],ensembl:[1,9],ensur:[0,1,2,3,5,6,11,13,19],ensure_initi:[],entail:22,enter:[5,6],enthought:[0,15,16,22],entir:[1,3,7,9,16,19,22],entiti:[9,12,17,22],entri:[0,5,8,11,12,17,22],entropi:[1,3,7,10,13,22],enumer:[0,1,2,3,4,6,8,22],env:[0,1,2,3,4,6,7,8,11,13,14,19,22],environ:[2,16],eo:[0,6,22],eol:[0,22],eosfit:[0,22],epoch:[0,1,3,4,12,13,22],epsilon:[0,5,6,7,13,22],epsilon_0:[0,22],epsilon_1:[0,22],epsilon_2:[0,22],epsilon_:[0,22],epsilon_i:[0,22],eq:[3,13,14,17,19],eqnarrai:[3,5,6],equal:[0,1,2,3,4,5,6,8,9,11,12,13,14,15,17,19,22],equat:[1,3,4,5,6,7,8,9,10,11,13,14,17,19],equilibrium:[2,12],equiv:[3,13,17,19],equival:[0,1,5,7,8,11,13,16,17,22],erf:19,eriador:22,eridg:22,err:[0,10],err_:6,err_sqr:2,errat:13,errno:[],erron:2,error:[1,2,4,5,6,7,9,11,12,13,15,16,17,19],error_estimate_corr_tim:19,error_handl:[],error_hidden:1,error_output:1,escap:13,especi:[1,3,9,12,13],essenti:[0,5,6,9,10,12,14,19],establish:[0,6,10,11,15,22],estim:[0,1,5,6,7,10,11,13,16,19,22],estimated_mse_fold:6,estimated_mse_kfold:6,estimated_mse_sklearn:6,et:[0,2,4,15,21,22],eta0:[8,13],eta:[0,1,3,8,12,13,22],eta_:13,eta_t:13,eta_v:[0,1,3,22],etc:[0,1,3,5,7,8,9,11,12,13,14,15,16,17,19],ethic:[16,22],etsim:[],euclidean:[0,14],evalu:[0,2,3,4,5,6,9,13,19,22],evalut:13,even:[0,1,3,4,5,6,8,9,10,11,12,13,14,16,17,19,22],evenli:4,event:[5,7,10,19],eventu:[0,5,6,11,12,13,20],everi:[0,1,2,3,4,5,6,9,10,11,12,13,14,16,19,20,22],everyth:[4,12],everywher:[4,13],evolv:[0,22],exact:[0,2,5,11,12,13,17,19,22],exactli:[0,3,4,6,12,16],exam:22,examin:6,exampl:[5,11,12,13,15,16,17,19,21],exce:[1,12,13],excel:[0,1,4,5,10,22],except:[3,4,6,8,9,17],excess:[0,22],excit:[0,22],exclud:[1,6,12],exclus:[0,1,3,6,19,22],execut:[2,5,13],executing_eagerli:[],exemplifi:13,exercic:[20,22],exercis:[5,16,18,20],exhaust:6,exhibit:[0,5,6,8,22],exist:[0,1,2,3,5,6,7,8,9,13,17,22],exit:[5,17],exp:[0,1,2,5,6,7,8,10,11,12,13,15,19,22],exp_term:1,expand:[5,7,11,13],expans:[0,3,5,8,10,12,13,22],expect:[0,1,5,6,7,11,12,13,15,16,22],expectation_value_of_h_wrt_p:19,expens:[6,10,13],experi:[0,1,6,8,13,16,22],experiment:[0,3,4,6,9,14,19,22],experimental_get_tracing_count:[],expert:[1,9],explain:[0,6,9,10,11,13,22],explained_variance_ratio_:11,explanatori:[0,22],explicit:[0,3,6,13,17,22],explicitli:[0,4,22],explod:1,exploit:[0,3,12,13,22],explor:[1,4,6,8,13,16],expon:1,exponenti:[0,1,5,6,10,13,19,22],export_graphviz:9,export_text:9,exporttext:9,expos:[16,22],express:[0,2,3,5,6,7,10,12,13,17,19],exptmean:19,exptvari:19,extend:[0,2,7,11,13,16,22],extens:[0,12,15,16,22],extent:[0,1,6,21,22],extern:[3,6,9],extra:[1,3,5,20,22],extract:[0,3,5,6,7,8,11,13,17,22],extrapol:[0,22],extrem:[0,1,4,5,6,7,8,9,13,17],extremum:13,extrins:11,ey:[0,5,6,13,14,17,22],f11:[0,22],f12:[0,22],f13:[0,22],f1:13,f1_grad:13,f1d:13,f2:13,f2_grad_x1:13,f2_grad_x1_analyt:13,f2_grad_x2:13,f2_grad_x2_analyt:13,f3:13,f3_grad:13,f3_grad_analyt:13,f3ckh:[],f4:13,f4_grad:13,f4_grad_analyt:13,f5:13,f5_grad:13,f6:13,f6_for:13,f6_for_grad:13,f6_grad_analyt:13,f6_while:13,f6_while_grad:13,f6d7a289d493:[],f7:13,f7_grad:13,f7_grad_analyt:13,f8:13,f8_grad:13,f9:[0,13,22],f9_altern:13,f9_alternative_grad:13,f9_grad:13,f:[0,1,2,3,4,5,6,7,8,10,12,13,14,17,19,20,22],f_0:[3,10],f_1:[10,13],f_2:[12,13],f_3:12,f_:10,f_d:19,f_grad:13,f_grad_analyt:13,f_i:[0,6,12],f_m:[3,10],f_n:3,f_raw:2,f_vec:2,f_wrap:2,face:13,facecolor:[6,8,19],facil:[0,15,16,22],facilit:12,fact:[0,1,3,5,9,11,12,13,22],factor:[0,1,3,5,6,9,10,11,13,17,19,22],factori:13,fade:6,fafab0:[9,10],fahimeh:[20,22],fail:[0,6,7,8,11,13,20,22],failur:7,fairli:[1,2,19],fake:4,fake_loss:4,fake_output:4,fall:[8,9,18],fals:[0,1,2,3,4,5,6,7,9,10,14,17,22],famili:[0,7,8,19],familiar:[0,3,5,6,8,15,16,17,19,22],famou:[6,12],far:[0,3,4,5,6,8,11,12,13,14,22],fashion:[0,9,10,22],fast:[1,3,6,10,12,13,16,19,22],faster:[1,11,13],fastest:[13,17],favor:7,favorit:19,fc:3,fdf8a5d7c717:[],fdfcc778e1f8:[],fe5b9d300cc0:[],featur:[0,1,3,5,6,7,8,10,11,12,13,16,19,22],feature_nam:[0,1,7,9],feautur:9,fed:1,feed:[0,2,3,11,16,22],feed_forward:1,feed_forward_out:1,feed_forward_train:1,feedback:[4,22],feeddorward:4,feedforward:[1,4,12],feel:[0,5,6,11,13,15,16,20,22],feet:0,fei:22,fetch:6,fetch_california_h:[],fetch_openml:[],few:[1,3,4,5,9,19,22],fewer:[0,9,11,22],ffnn:[1,12],fgakzw6k1qq:[],field:[0,3,6,12,16,22],fifth:[0,6,15,22],fig:[0,1,2,3,4,6,7,12,13,14,22],fig_id:[0,6,7,9,22],figaxi:19,figsiz:[0,1,2,3,4,6,7,8,9,10,22],figur:[0,1,2,3,4,5,6,7,8,9,10,12,13,14,15,16,22],figure_id:[0,6,7,9,22],figurefil:[0,6,7,9,22],file:[0,2,3,4,5,6,7,9,13,14,22],file_prefix:4,filenam:22,filenotfounderror:[],fileout:[],filepath_or_buff:[0,22],fill:[5,9],filter:[3,4],filtered_flat_arg:[],filtered_tb:[],financ:[0,22],find:[0,1,2,3,5,6,7,8,9,10,11,12,13,14,15,16,19,22],find_top_boxed_arg:2,fine:[0,14,15,22],finish:2,finit:[3,5,6,12,13,19],first:[0,1,2,3,5,6,7,8,9,10,11,13,14,15,17,19,20,21],firsteigvector:11,fit:[1,3,4,5,6,7,8,9,11,12,13,15,19],fit_beta:6,fit_intercept:[0,5,6],fit_mod:9,fit_transform:[0,6,8,9,11],fiti:[0,22],five:[0,9,22],fix:[0,3,4,6,10,11,12,13,22],fixedformatt:6,fixedloc:6,fkkt:[],flag:4,flat:[12,13],flatbuff:[3,4,14],flatten:[1,3,4,5,17],flexibl:[1,6,8,10,12,22],flip:[20,22],float32:[4,9],float64:[4,17,22],flop:[5,17],flow:[1,4,12],fluctuat:5,fly:11,flyvbjerg:[],fm:[0,22],fma:[],fmax:3,fmesh:13,fn:7,focu:[0,3,4,5,6,15,16,21,22],focus:[1,6,7,17],fold:[6,9],folder:[0,1,4,6,13,22],follow:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22],font:[0,7,19,22],fontdict:19,fontsiz:[1,6,8,9,10,19],fontweight:1,footprint:3,foral:8,forc:[0,5,6,10,11,22],forcast:4,forecast:[4,12],forelesningsvideo:[],forest:[0,1,9,16,22],forget:11,form:[0,3,4,5,6,7,8,9,11,12,13,16,17,19,22],formal:[3,4,14,19],format:[0,1,2,3,4,6,7,8,9,10,11,16,19,21],format_data:4,formatstrformatt:[6,13],formul:[4,6,11,14],formula:[3,13,19],forth:[4,12],fortran2003:[16,22],fortran90:19,fortran:[0,15,16,17,22],fortun:[0,11],forward:[0,3,6,16,17,22],forward_backward:[],forward_compatibility_horizon:[3,4,14],found:[1,2,4,5,6,12,13,22],foundat:[16,22],four:[4,5,6,8,12,17,18,20,22],fourier:[0,22],fourierdef1:3,fourierdef2:3,fourierseriessign:3,fourth:[12,22],fp:7,fr:[],frac:[0,1,2,3,5,6,7,8,9,10,11,12,13,14,15,17,19,22],fractal:[],fraction:9,frame:[7,22],framework:[1,8,10,19],frank:[5,11],frankefunct:[5,6,11],fredli:[20,22],free:[0,6,11,13,15,16,17,19,20,21,22],freecodecamp:16,freedom:5,freeli:[0,22],frequenc:[3,6,7,19],frequent:[0,8,9,13,22],frequentist:16,fresh:10,frida:[],fridai:[20,22],friedman:[6,18,21,22],friendli:4,frodo:22,frog:3,from:[0,1,2,3,4,6,7,8,9,11,13,14,16,17,19,20,21,22],from_cod:9,from_logit:[3,4],from_tensor_slic:4,fromnumer:2,front:[0,4,5,15,22],fstream:[],fulfil:[2,5,12],full:[0,1,3,5,7,9,10,13,19,22],full_matric:5,fulli:[3,6,12,18,19],fun:[2,13,16,22],fun_nam:[],func:[0,2,22],functionali:11,functool:[3,4,14],fundament:[0,6,16,22],funtion:2,further:[2,7,9,22],furthermor:[0,3,5,6,7,11,12,13,16,22],futur:[0,4,8,9,22],futurewarn:[0,22],fx:[],fy:[15,18,20,21,22],fys5419:[21,22],fys5429:[21,22],g0:2,g42mrgv128v34gnnhxwk9nrc0000gp:[],g:[0,1,2,3,4,6,8,9,10,11,13,14,19,22],g_0:2,g_1:[2,10],g_2:[2,10],g_:[2,9,10],g_analyt:2,g_dnn_ag:2,g_euler:2,g_i:2,g_m:[3,10],g_n:3,g_re:2,g_t:2,g_t_d2t:2,g_t_d2x:2,g_t_dt:2,g_t_hessian:2,g_t_hessian_func:2,g_t_jacobian:2,g_t_jacobian_func:2,g_trial:2,g_trial_deep:2,g_vec:2,gain:[1,5,7,9,10,13],galleri:[0,22],game:4,gamge:22,gamma1:8,gamma2:8,gamma:[0,2,8,9,10,11,13,22],gamma_0:10,gamma_1:10,gamma_1x:10,gamma_:[0,22],gamma_i:[0,8,19,22],gamma_j:13,gamma_k:13,gamma_m:10,gamma_x:[0,22],gap:[6,8],gate:[4,12],gather:[0,1,12],gaug:12,gaussbacksub:17,gaussian:[4,5,6,8,14,19],gaussian_point:14,gaussian_rbf:8,gave:13,gbc:[18,22],gca:[2,6,8,13],gd:1,gd_clf:10,gdclassiffiercgain:10,gdclassiffierconfus:10,gdclassiffierroc:10,gdm:13,gdregress:10,ge:[1,5,7,19],gemv:[],gen:[],gen_loss:4,gen_tap:4,gender:[0,22],genener:4,gener:[0,1,2,3,5,6,8,10,11,12,13,14,15,17,19,21],generallay:12,generate_and_save_imag:4,generate_imag:4,generate_latent_point:4,generate_simple_clustering_dataset:14,generated_imag:4,generator_loss:4,generator_loss_list:4,generator_model:4,generator_optim:4,genexpr:[],genom:16,geodes:11,geometr:[0,13,22],geometri:5,georg:21,geotif:6,geq:[2,5,8,9,13],geron:[0,15,18,21,22],get:[0,1,2,3,4,5,6,7,9,10,11,13,15,16,17,19,20,22],get_dummi:9,get_loc:[],get_next_color:[],get_paramet:2,get_split:9,get_yaxi:8,get_yticklabel:6,getsolutionslic:[],getval:[],gg:[],gibb:[16,22],gif:4,gini:10,gini_index:9,ginvers:13,git:[0,15,16,22],giter:13,github:[0,6,15,16,18,20,21,22],gitlab:[0,15,16,22],give:[0,1,2,3,5,6,7,8,9,10,12,13,14,16,19,22],given:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,17,19,22],global:[6,7,13],glorot:1,gmail:[],gnew:13,go:[0,1,3,5,6,8,9,11,12,13,22],goal:[0,7,9,22],goe:[0,1,2,5,6,13,14,17,22],golden:13,gone:5,gong:1,good:[1,3,4,5,6,9,10,11,13,16,19,21],goodfellow:[4,18,21,22],googl:[1,4,16,22],got:[1,6],gov:6,gp:21,gpu:[1,13,16,22],grad:[2,13],grad_analyt:13,grade:18,gradient:[0,3,4,7,8,9,12,16,22],gradient_desc:[],gradientboostingclassifi:10,gradientboostingregressor:10,gradients_of_discrimin:4,gradients_of_gener:4,gradienttap:4,gradual:[1,14],grai:[4,6],graph:[1,9,11,12,13],graph_debug_info_pb2:[3,4,14],graph_from_dot_data:9,graph_funct:[],graphic:[0,1,9,22],grasp:[0,22],gray_r:[1,3],grayscal:3,great:[5,13],greater:[1,7,19],greatli:13,greedi:9,green:[0,3,9,19],grei:4,grid:[1,3,6,7,8,12,19],grossli:13,ground:[0,22],group:[0,6,7,9,14,16,18,20,22],groupbi:[0,22],grow:[1,3,9,10],growth:[0,22],gru:4,guarante:[0,4,13,19,22],guess:[1,4,10,13,14],guestrin:10,guid:1,guilherm:[],h1:2,h21:[],h:[0,1,5,6,8,13,19,20,21,22],h_1:[2,13],h_2:[2,13],h_:[0,13,22],h_m:10,ha:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,17,19,22],haa:[20,22],habit:0,had:[0,1,6,7,13,22],hadamard:[1,12,13],half:[1,8,9],halv:10,hand:[0,1,2,3,5,11,12,13,15,16,17,18,19,20,21,22],handi:3,handl:[0,1,2,5,9,11,16],handle_unknown:9,handsid:12,handwrit:12,handwritten:[1,5,22],handwrittennot:22,happen:[1,2,3,4,5,6,10,13,19],hard:[1,7,8,10,13],hardcopi:[16,22],harder:[0,1],harmon:3,hasn:1,hassl:[0,15,16,22],hast:[16,22],hasti:[0,6,15,18,21,22],hat:[0,1,5,6,7,9,10,11,12,13,17],have:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,19,20],haven:1,hdtta7prrfi:[],he:7,head:[0,4,10,19],header:[0,22],heads_proba:10,health:0,hear:[0,13,22],heart:[0,7,22],heatmap:[0,1,3,7,22],heavili:[0,22],heavisid:1,height:[1,3,6],held:13,help:[0,1,4,12,13,22],helper:[4,14],henc:[0,5,6,8,9,10,12,13,22],henrik:[20,22],her:7,here:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,19,22],hereaft:[0,8,12,22],hermitian:17,hessenberg:17,hessian:[0,2,5,13],heterogen:[9,10],hi:7,hidden:[1,3,4,12],hidden_bia:1,hidden_bias_gradi:1,hidden_layer_s:[0,1,22],hidden_neuron:4,hidden_weight:1,hidden_weights_gradi:1,hierarch:5,high:[0,1,2,3,4,5,6,9,10,11,13,14,16,17,22],higher:[0,1,3,5,6,8,13,22],highest:[1,2],highli:[0,3,4,10,16,17,21,22],highwai:0,hing:8,hint:13,hip:16,hire:[0,22],hist:[4,6,7,19],histogram:[0,6,7,19],histor:[7,11],histori:[3,4,12],histplot:[],hit:[],hitherto:5,hjorth:[20,22],hm6ay5ds6o0:[],hobbi:19,hoc:5,hoff:21,hold:[1,3,6,13,14],holder:[0,22],holomorphic_grad:[2,13],home:0,homepag:22,homework:[6,13],homogen:[1,3,9,10,13],honchar:2,hopefulli:[0,11,19,22],horizont:11,hors:[3,7],hot:[1,9],hour:[1,16,18,19,20,22],house_pric:[],how:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,19,22],howev:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,16,17,19,22],hs:[],hspace:[0,4,8,10,19,22],hstack:1,htf:[18,22],html:[0,7,11,16,18,20,21,22],http:[0,3,4,6,7,11,13,16,17,18,20,21,22],huang:[0,22],huber:[0,22],huge:[1,3,4,16],human:[0,1,3,6,9,12,22],humid:9,hundr:1,hungri:1,hybrid:18,hydrogen:[0,22],hyperbol:[1,4,12],hyperparam:8,hyperparamet:[3,4,5,6,9,13,22],hyperplan:11,i0:[0,22],i1:[0,6,8,12,22],i2:[0,8,12,22],i3:[0,12,22],i5:[0,22],i:[0,2,3,4,5,6,7,8,9,10,11,12,13,14,15,17,19,20,22],i_1:[5,6],i_2:[5,6],i_:13,ian:21,ic:1,id:[7,13],ida:[20,22],idea:[0,1,2,3,4,6,9,10,12,13,17,22],ideal:[0,2,6,8,13,19,22],idem:6,ident:[5,6,12,13,17],identical:[],identifi:[0,1,7,9,11,12,13,14,22],idum:[],ieor:19,ifi:21,ifs:[16,22],ignor:[0,1,3,9],ii:[17,19],iii:[17,22],ij:[0,1,3,6,8,12,14,17,19,22],ik:[0,17,22],illustr:[5,7,10,12,13,14,16,22],im:6,imag:[1,3,4,6,9,11,12,14,21,22],image_at_epoch_:4,image_batch:4,image_height:3,image_path:[0,6,7,9,22],image_width:3,imageio:6,imagenet:22,images_from_seed_imag:4,imagin:1,immedi:[0,3,4,6,15,16,22],implement:[0,2,3,4,5,6,8,9,10,11,12,13,14,19,22],impli:[3,5,6,7,13,17],implicit:3,implicitli:[11,19],importantli:3,impos:[0,6,11,12,22],imposs:[0,5,22],impress:[0,12,22],improv:[0,4,5,9,10,11,13],impur:9,imread:6,imshow:[1,3,4,6],in3050:[21,22],in3310:22,in4080:[21,22],in4300:[21,22],in4310:21,in5400:3,in5550:21,in_out_neuron:4,inaccur:13,inacio:[],inact:12,inadequ:[0,22],inch:6,includ:[0,1,2,3,4,5,6,7,11,12,15,16,19,20,21,22],include_bia:[6,9],incom:12,incorrect:1,incoveni:8,increas:[0,1,3,4,5,6,7,8,9,11,12,13,19,22],increasingli:19,ind:6,inde:[0,2,4,5,6,13,22],indefinit:4,indent:[],indentationerror:[],independ:[0,5,6,7,8,12,13,19,22],index:[0,1,3,4,10,14,16,17,19,21,22],index_col:[0,22],index_of:[],indic:[0,1,3,4,5,6,9,10,11,13,22],indispens:6,individu:[1,6,7,10,12,19,22],indu:0,indx1:2,indx2:2,indx3:2,indx:17,ineffici:[3,13],inequ:[8,13],inequaltii:[],inertia:13,inf1000:[16,22],inf1100:[16,22],inf1100l:[16,22],inf1110:[16,22],inf3000:22,inf4490:[],inf5860:[],infeas:9,infer:[0,1,4,6,21,22],infer_nrow:[0,22],inferenc:1,infil:[0,6,7,9,22],infin:[5,6,7,11],infinit:3,infinitesim:19,influenc:[6,10],influenti:1,info:22,inform:[0,1,3,4,6,9,11,12,13,14,17,21,22],infti:[3,6,13,19],ingeni:13,ingrad:2,ingredi:[0,9,22],inher:6,inherit:[17,22],initi:[0,1,2,6,10,13,14,17,19,22],initial_epoch:[],initialis:[],initialize_root:[],inject:14,inlin:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,17,19,22],inner:[0,13],innov:[],inp:4,inplac:13,input:[0,1,3,4,5,6,7,8,9,10,12,13,14,15,19,22],input_dim:1,input_shap:[3,4],inputs:1,inputs_shuffl:[0,1],insert:[3,5,6,8,10,19],insid:[0,4,7],insight:[0,1,5,16,22],insist:[6,13],inspir:[0,1,12,22],instabl:2,instal:[0,1,5,6,9,15],instanc:[0,1,2,4,6,9,11,13,22],instanti:10,instead:[0,1,2,3,4,5,6,8,9,11,13,14,17,19,22],institut:1,instruct:[0,1,15,22],int32:10,int64:[],int64index:22,int_0:19,int_:[3,6,19],int_a:19,intak:0,integ:[1,2,13,14,17,19,22],integer_vector:1,integr:[3,6,19,22],intellectu:22,intellig:[0,14,21,22],intend:[10,22],intens:1,intention:14,interact:[0,6,9,12,16,22],intercept:[0,6,8,11,13,22],intercept_:[0,6,8,9,13,22],interchang:[5,12,17],interconnect:1,interest:[0,1,2,3,4,5,6,7,8,9,12,16,19,22],interfac:[0,1,17],interior:[0,9,22],intermedi:17,intern:[1,10,12],interpol:[1,3,4,6,12],interpr:5,interpret:[0,1,3,4,6,9,10,12,13,14,17,19],interv:[0,3,5,6,7,13,19,22],intial:13,intract:[0,4],intrins:[3,11,17,19,22],intro:[16,21,22],introduc:[0,1,5,6,8,10,12,17,19,22],introduct:[1,2,4,13,21],introductori:[0,4,17,21,22],intuit:[0,5,6,8,12,13,22],inv:[0,5,13,22],invalid:1,invalu:[0,13,15,16,22],invari:1,invd:5,inver:8,invers:[0,3,6,13,15,22],invers_period:[],inverse_transform:8,invert:[0,5,7,10,13,22],invh:13,invok:[0,8],involv:[0,2,6,7,11,12],io:[0,16,18,20,21,22],iomanip:[],iostream:[],ip:[0,8,19,22],ipca:11,ipykernel_41811:6,ipykernel_42331:[],ipykernel_42376:[],ipykernel_42449:[],ipykernel_42456:[],ipykernel_42530:[],ipykernel_42541:[],ipykernel_42553:[],ipykernel_42573:[],ipykernel_42580:[],ipykernel_42586:[],ipykernel_47411:[],ipykernel_47448:[],ipykernel_47647:[],ipykernel_47724:[],ipykernel_47735:[],ipykernel_65914:22,ipykernel_9414:13,ipykernel_94478:1,ipykernel_94529:[],ipykernel_94582:[],ipykernel_96694:[],ipynb:[16,22],ipython:[0,5,7,9,11,14,15,16,22],iq:6,iri:[8,9],irreduc:6,irrelev:5,irrespect:[0,22],is_integ:[],isbox:[2,13],iscomplexobj:[],isinst:[],isn:5,isnul:0,isomap:11,isotop:22,issu:[1,9,17],it_arrai:13,item:[0,13,22],items:[17,22],iter:[1,2,4,6,7,8,11,13,14,19],itr:[],its:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,19,22],itself:[5,6,12,19],ix:[],j1:17,j:[0,1,2,3,4,5,6,8,9,11,12,13,14,17,19,21,22],j_:6,j_lasso_sk:6,j_ridge_sk:6,j_sk:6,jackknavg:[],jackknif:[6,16,22],jackknstd:[],jackknvar:[],jackknvec:[],jacobian:[2,13],jacobian_shap:2,jakobsen:[20,22],jargon:[],jason:4,jax:[16,22],jensen:[20,22],jerom:21,jhfgq77fpq:[],ji:[12,17],jit:13,jj:[0,5,6,22],jk:[0,1,6,12,17,22],jl:[0,22],jm:17,jnp:13,joao:[],joaogca:[],job:[2,8,10],join:[0,4,6,7,9,22],joint:[4,5],journal:[],judg:13,judgement:6,julia:[16,17],jump:19,junk:4,jupit:22,jupyt:[0,15,16,21,22],just:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,16,19,22],justif:[0,22],justifi:[3,10],jy:[],jydg2xzka5:[],k0:7,k1:7,k:[0,1,3,5,6,7,8,9,10,11,12,13,14,16,17,19,20,22],kaggl:6,kappa_d:19,karim:[],karl:[20,22],karlsen:[],karush:8,kate:22,katrin:[20,22],keep:[0,1,4,5,6,11,13,14,17,22],keepdim:[1,6,10,17],kei:[0,1,3,6,12],kept:[4,6,14],kera:[0,4,16,22],kernel:[0,1,3,16,22],kernel_regular:[1,3],kernel_s:4,kernelpca:11,kev:[0,22],kevin:[21,22],keyboardinterrupt:2,keyerror:[],keyword:[6,13,17,22],kfold:6,kg:1,ki:17,kick:[1,13],kiener:2,kilomet:6,kind:[0,2,3,4,8,12,13,14,22],kj:[6,12,17],kjm:[16,22],kkt:8,kktsolver:[],kl0m3:[],kl:19,km:[12,22],kmean:14,kmeanspoint:14,kn_k:14,know:[0,1,2,5,6,8,13,16,22],knowledg:[0,16,22],known:[1,3,4,5,6,7,8,9,12,17,19,21],kondev:[0,22],kp:19,kpca:11,kroneck:14,kuhn:8,kutz:[],kvalsund:[20,22],kwarg:[0,2,13,22],kwd:[0,22],kwown:[0,22],l0:7,l1:[0,1,3,7,22],l1_l2:[1,3],l1regl:5,l1regls_mosek2:[],l1regls_mosek:[],l2:[1,3],l:[0,1,2,3,5,6,7,8,10,11,12,13,17,19,22],l_1:7,l_2:[7,13],l_:17,l_j:12,la:13,la_i:12,la_k:12,lab:[16,22],label:[0,1,2,3,4,5,6,7,8,9,10,12,13,14,16,17,19,22],label_prob:[],labelencod:[7,10],labels:[6,8,9],labels_shuffl:[0,1],laboratori:18,lack:[0,22],lagari:2,lagrang:[8,11],lambda:[0,1,2,3,5,6,7,8,10,12,13,19,22],lambda_0:11,lambda_1:[5,8,11],lambda_2:[8,11],lambda_:11,lambda_i:[8,11],lambda_iy_i:8,lambda_jy_iy_j:8,lambda_k:8,lambda_n:[5,8],lamda:1,lamdbda:[],land:[0,8],landmark:8,landscap:13,langl:[0,6,11,19,22],languag:[0,1,4,8,15,16,17,21,22],lapack:[17,22],laplac:5,laptop:16,larg:[0,1,2,4,5,6,8,9,10,11,13,15,16,17,19,21,22],larger:[0,3,5,6,8,10,11,13,19,22],largest:[4,8,11],lasso:[0,7,16,22],lasso_sk:6,last:[0,1,2,3,4,5,6,7,8,9,10,12,13,14,15,17,19,20,22],latent:4,latent_dim:4,latent_point:4,latent_space_value_rang:4,later:[0,1,4,6,7,8,12,13,14,15,16,22],latest:[4,16],latest_checkpoint:4,latex:22,latter:[0,3,6,7,8,11,13,17,19,22],lattic:12,law:[0,22],layer:[0,4,13,14,22],lbfg:[7,9,10,11],lcc:[5,6],lda:11,ldot:[0,6,11,22],le:[5,7,10,13,19],lead:[0,1,3,5,6,7,8,9,10,11,12,13,17,19,22],leaf:9,leaki:1,leakyrelu:4,lear:13,learn:[3,4,5,6,7,8,9,10,12,17,18,20,21],learnabl:3,learner:10,learnig:22,learning_r:[8,10],learning_rate_init:[0,1,22],learning_schedul:13,least:[0,2,7,8,10,11,15,16,17,19],leat:13,leav:[0,1,3,5,6,9,11,22],lectur:[0,1,5,10,11,12,13,15,16,17,18,20,21],lecturenot:[0,16,21,22],lecturenovember11:[],lecturenovember12:[],lecturenovember19:[],lecturenovember25:[],lecturenovember26:[],lecturenovember4:[],lecturenovember5:[],lectureoctober14:[],lectureoctober15:[],lectureoctober1:[],lectureoctober21:[],lectureoctober22:[],lectureoctober28:[],lectureoctober29:[],lectureoctober7:[],lectureoctober8:[],lectureseptember10:[],lectureseptember16firstpart:[],lectureseptember16secondpart:[],lectureseptember17:[],lectureseptember23:[],lectureseptember24:[],lectureseptember2:[],lectureseptember30:[],lectureseptember3:[],lectureseptember9:[],lecturethursdayaugust26:[],lecturethursdayaugust27:[],left:[0,1,2,3,5,6,7,8,9,10,11,12,13,14,17,19,22],leftarrow:[8,12],legend:[0,2,3,4,5,6,7,8,9,10,13,22],len:[0,1,2,3,4,5,6,8,9,10,11,12,17,22],len_index:[0,22],length:[0,1,2,3,4,8,9,13,16,22],length_of_sequ:4,leq:[0,5,7,8,13,14,19,22],less:[0,1,3,4,5,6,8,9,13,16,19,22],lessen:1,let:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,17,19,22],letter:[0,17,19,22],level:[0,1,5,6,9,16,17,18,20,22],li:[8,11,22],lib:[0,1,2,3,4,6,7,8,11,13,14,22],liblinear:[8,10],librari:[0,1,2,3,4,5,6,9,10,11,15,17,19,21],licens:[0,1,15,16,22],lie:[0,6,11,19],life:[0,1,8,12,22],lifetim:13,like:[0,1,2,3,4,5,6,7,9,10,11,12,13,15,16,17,19,22],likelihood:[0,1,5,9,22],lim_:19,lima:[20,22],limit:[0,5,6,7,8,11,12,17,22],lin_clf:8,lin_model:0,lin_reg:9,linalg:[0,2,3,4,5,6,8,11,13,14,17,19,22],line1:8,line2:8,line2d:13,line3:8,line:[0,2,3,4,6,8,9,10,11,13,14,15,22],linear:[1,3,5,6,7,9,10,11,12,16,19],linear_model:[0,5,6,7,8,9,10,11,13,22],linear_regress:6,linearli:5,linearloc:[6,13],linearregress:[0,6,7,9,22],linearsvc:8,liner:[1,3],linerar:10,linewidth:[0,2,4,6,8,9,10],link:[0,4,9,12,16,20,22],linlag:5,linpack:[17,22],linreg:[0,22],linspac:[0,2,3,4,6,8,9,10,13,15,17,19,22],linu:4,linuek:[],linux:[0,1,15,16,22],liquid:[0,22],list:[0,1,2,3,4,9,16,22],listcomp:2,listedcolormap:[9,10],lite:[3,4,14],lite_const:[3,4,14],literatur:[1,7,14,21],littl:[1,3,9,12],live:8,ll:[0,19,22],lle:0,lloyd:[4,14],lmb:[0,2,5,6],lmbd:[0,1,3,22],lmbd_val:[0,1,3,22],lmbda:13,ln:[1,13],lo:[],load:[0,1,4,6,7,9,10],load_boston:0,load_breast_canc:[1,7,9,10,11],load_data:[3,4],load_digit:[1,3],load_iri:[8,9],loc:[0,3,6,7,8,9,10,22],local:[0,1,2,3,7,12,13,22],locat:[2,3,8],lock:[],log10:[0,2,5,6],log1p:2,log:[0,1,2,3,4,5,6,7,9,10,11,13,14,17,22],log_:[0,22],log_clf:10,logarithm:[0,5,7,17,22],logic:[0,1,9,22],logist:[0,1,2,8,9,10,11,12,13,16],logistic_predict:[],logisticregress:[7,9,10,11],logit:7,logreg:[7,9,10,11],logspac:[0,1,3,5,6,22],longer:[2,3,8,10,14,17,19,22],loocv:6,look:[0,1,2,3,4,5,6,7,8,9,10,11,13,17,19,22],lookup:[3,4,14],loop:[1,4,6,10,12,14,16,17,22],lose:1,loss:[0,1,3,4,5,6,7,8,10,11,13,17,22],loss_fil:4,lossfil:4,lost:4,lot:[0,1,4,6],low:[0,6,9,10,11,22],lower:[0,1,3,6,9,10,17],lowercas:[17,22],lowest:[9,13,19],lr:[1,3,4,10],lstat:0,lstm:4,lstm_2layer:4,lstsq:[0,22],lt:6,lu:[0,5,22],lubksb:17,luckili:2,ludcmp:17,lux:17,lvert:1,lw:[0,22],m:[0,1,2,3,5,6,8,9,10,11,12,13,17,18,19,20,21,22],m_1:14,m_:[9,12],m_h:[0,22],m_k:14,m_l:12,m_n:[0,22],m_p:[0,22],m_t:13,ma:11,mac:[],machin:[1,3,4,5,6,7,9,10,11,12,15,17,18,21],machinelearn:[0,6,16,18,20,21,22],machinelearningmurphi:[],mackai:21,made:[0,1,3,4,5,6,7,9,11,12,22],mae:[0,22],magic:4,magnitud:[1,6,7,13],mai:[0,1,2,3,5,6,7,8,9,11,12,13,16,17,19],mail:[18,20],main:[0,1,3,4,5,6,7,9,17,21,22],mainli:[0,5,6,7,9,22],maintain:6,major:[1,6,9,10,13,17,22],make:[1,2,3,4,5,6,7,8,11,12,13,16,17,19,21],make_axes_locat:6,make_moon:[8,9,10],make_pipelin:[0,6,10],make_vjp:[2,13],makedir:[0,6,7,9,22],makeplot:[0,22],malcondit:17,malign:[1,7,9],mammographi:5,manag:[0,2,3,15,16,22],mandatori:[20,22],mani:[0,1,3,4,5,6,7,8,9,11,13,14,16,17,19,21,22],manifold:11,manner:3,manual:6,map:[0,1,2,6,7,8,11,12,14,19,22],margin:[0,5,8,22],mari:[],marit:[0,22],mark:22,marker:[0,7,17,22],markov:[16,22],marsaglia:19,mask:[],mass:[0,1,5,13],massag:[0,22],masses2016:[0,22],masses2016ol:[0,22],masses2016tre:0,masseval2016:[0,22],master:[6,18,20,22],mat1100:[16,22],mat1110:[16,22],mat1120:[16,22],mat3155:[],mat4155:[],mat:[16,22],match:[0,1,4,5,13,14,22],materi:[4,5,7,13,17,20],math:[3,7,12,13,17,19,21,22],mathbb:[0,4,5,6,7,8,11,12,13,14,17,19,22],mathbf:[0,5,6,7,8,13,17,22],mathcal:[1,5,6,7,13],matheemat:3,mathemat:[0,6,11,12,13,16,17,19,21,22],mathemati:22,mathrm:[0,1,3,4,5,6,7,8,9,10,11,12,13,14,19,22],matmul:[1,2,5],matmul_adjoint_1:[],matmul_vjp_0:[],matmul_vjp_1:[],matnat:21,matplotlib:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,19,22],matplotlibdeprecationwarn:[6,13],matric:[0,1,3,4,6,7,8,11,13,16],matrix:[0,2,3,4,6,7,8,10,13,15,19],matshow:1,matter:[2,3,13],max:[0,1,2,3,4,9,10,12,13,20,22],max_depth:[0,9,10],max_diff1:2,max_diff2:2,max_diff:2,max_it:[0,1,7,8,11,13,22],max_iter:14,max_leaf_nod:10,max_queue_s:[],max_sampl:10,maxdegre:[0,6,10],maxdepth:10,maxim:[1,4,5,7,8,11],maximum:[0,1,2,3,5,7,8,9,10,13,14,22],maxpolydegre:[5,6],maxpooling2d:3,mbox:[5,6],mc:[],mccorduck:22,mcculloch:12,mcint:[],mcintsqr2:[],md:11,mdoel:4,mdyt6uwokt0:[],mean:[1,2,3,4,5,6,7,9,10,11,12,13,14,15,16,17,19],mean_absolute_error:[0,22],mean_divisor:14,mean_i:19,mean_matrix:14,mean_squared_error:[0,4,6,7,10,22],mean_squared_log_error:[0,22],mean_vector:14,mean_x:19,meaning:[0,4,7,22],meansquarederror:[0,22],meant:[2,3,7,10,13],meantempvec:[],meanvec:[],measur:[0,1,2,5,6,9,11,12,14,19,22],mechan:[0,4,19,22],median:[0,22],medicin:12,medium:[4,8,13],medv:0,meet:[0,20],mehta:[0,22],memori:[3,4,11,12,13,17,22],mention:[0,12,13,19,22],mere:[0,15,22],mersienn:[],meshgrid:[2,5,6,8,9,10,11],messag:[5,13],messi:2,met:[0,3,8,22],metadata:[],meteorolog:9,meter:6,method:[0,1,2,3,4,5,7,8,11,12,14,16,17,19,21,22],metion:6,metric:[0,1,3,4,6,7,9,10,14,15,22],metropoli:[16,22],mev:[0,19,22],mgd:13,mglearn:[16,22],mgrid:13,mhjensen:[1,2,6,7,8,11],mi:10,mia:[20,22],michigan:22,microsoft:21,mid:1,midel:4,midpoint:9,might:[0,1,2,4,6,9,13],mild:9,miller:[],millimet:6,million:[0,22],mimic:12,min:[0,2,5,8,9,22],min_:[0,2,5,14,22],min_samples_leaf:9,mind:[0,6,13,22],mindboard:4,mine:[16,22],mini:[1,11,12,13],minibatch:[1,11,13],minibathc:13,miniforge3:[0,1,2,3,4,6,7,8,11,13,14,22],minim:[0,1,2,3,5,6,7,8,9,10,11,12,13,14],minima:[0,1,7,13,22],minimum:[0,1,2,6,8,9,11,13],minmaxscal:0,minor:[6,13,19],minst:1,minu:7,mirror:9,misc:6,misclassif:[8,9,10],misclassifi:[8,10],miser:0,mismatch:1,miss:[0,7,10],mistak:4,mit:21,mix:[1,2,22],mixtur:13,mk48pfcxgyk:[],mk:[9,17],mkdir:[0,6,7,9,22],ml:[0,1,10,13,17],mlab:19,mle:[5,7],mline:[],mlir:[],mlir_graph_optimization_pass:[],mlp:1,mlpclassifi:1,mlpregressor:[0,22],mm:17,mn:[12,19],mnist:[1,11],mod:19,mode:[18,20,22],model:[2,3,5,7,8,9,10,11,13,14,15,16,19,21],model_select:[0,1,3,5,6,7,9,10,11,22],modelanalyz:[3,4,14],moder:10,modern:[0,6,7,16,22],modif:[2,12,13],modifi:[0,1,3,5,7,8,10,12,13,22],modul:[0,3,4,7,8,9,11,14,17,22],modular:19,modulenotfounderror:[3,4,8,9,14],modulo:19,moe:11,moment:[5,6,13,19],monitor:13,monoton:[5,12,19],mont:[0,6,16,19,21,22],montecarlocycl:[],moor:[5,6],more:[0,1,2,4,5,7,8,9,10,11,12,13,14,16,19],moreov:[0,3,22],morten:[20,22],mortenimac:[],mosek:[],most:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,19,22],mostli:[1,11],motion:[0,13,22],motiv:[1,4],move:[0,3,4,5,6,7,9,12,13,14,19,22],mp4:[],mpl:[0,7,22],mpl_toolkit:[2,6,13],mplot3d:[2,6,13],mplregressor:1,mse:[0,4,5,6,9,10,15,22],mse_simpletre:10,mselassopredict:5,mselassotrain:5,mseownridgepredict:6,msepredict:5,mseridgepredict:[0,5,6],msetrain:5,msg:[0,22],msle:[0,22],mt19937_64:[],mt:[7,12],mu0:19,mu1:19,mu2:19,mu:[0,6,11,13,19,22],mu_:[6,19],mu_i:6,mu_n:11,mu_x:19,much:[0,1,2,3,4,5,6,8,9,10,11,12,13,17,19,22],mul:[],multi:[0,1,3,7,16,22],multiclass:[1,7],multidimension:[11,12,22],multilay:1,multinomi:7,multipl:[2,4,5,6,7,12,13,19],multipli:[3,5,6,11,13,17,19],multiplum:8,multivari:[0,2,10,11,16,19,22],multivariate_norm:[11,14],murphi:[11,21,22],must:[0,1,2,5,6,8,10,12,13,14,19,22],mutat:7,mutual:[1,3,6,13],mx_:19,myenv:[0,1,2,3,4,6,7,8,11,13,14,22],myriad:[0,15,16,22],mz1:19,mz2:19,n1:17,n2:17,n:[0,1,2,3,4,5,6,7,8,10,11,12,13,14,15,17,19,22],n_0:[12,19],n_:[1,2,3,8,12,19],n_b:[],n_boostrap:[6,10],n_bootstrap:6,n_categori:[1,3],n_cluster:14,n_compon:11,n_epoch:13,n_estim:10,n_examples_to_gener:4,n_featur:1,n_filter:3,n_hidden:2,n_hidden_neuron:[0,1,22],n_i:19,n_input:[0,1,3],n_instanc:9,n_iter_i:[7,11],n_job:10,n_k:14,n_l:[12,19],n_layer:1,n_m:9,n_neuron:1,n_neurons_connect:3,n_neurons_layer1:1,n_neurons_layer2:1,n_point:14,n_sampl:[6,8,9,10,14],n_split:6,n_step:4,n_t:2,n_x:2,nabla:[1,13],nabla_:[2,13],nabla_w:13,nag:13,naimi:[0,22],naiv:7,naive_kmean:14,najafi:[20,22],nall:[0,22],name:[0,1,3,4,5,6,7,8,9,10,12,13,14,15,16,17,19,20,22],nameerror:[6,10,15],namespac:[3,4,14],narrow:13,nary_f:[2,13],nary_op_arg:[2,13],nary_op_kwarg:[2,13],nary_oper:[2,13],nation:[1,5],nativ:[16,22],natur:[0,1,4,8,9,12,13,19,21,22],navier:12,nb:19,nb_:17,nbconvert:22,nboot:[],nd:14,ndarrai:[2,6],ndef:13,ndim:[],ne:[9,10,17,19],ne_xcl2ctm0:[],nearest:[1,3,6,11],nearli:13,neat:22,neccesari:6,necess:2,necessari:[0,1,3,4,8,14,22],necessarili:[0,4,11,19,22],necesserali:5,neck:7,need:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,17,19],neg:[0,1,3,5,6,7,10,13,17,19,22],neg_mean_squared_error:6,neglect:19,neglig:19,neighbor:[3,6,11],neither:[4,13],neq:[13,14,19],nervou:12,nest:[2,9,12],nesterov:13,net:[2,4,12],netlib:[17,22],network:[0,9,13,16,21],neural:[0,13,16,21],neural_network:[0,1,2,22],neuralnetwork:1,neuron:[1,2,3,4,12],neutral:[0,22],neutron:[0,22],never:[1,4,6,9,19],new_box:[2,13],new_chang:13,new_hobbit:22,new_root:[2,13],new_trac:[2,13],new_tracing_count:[],newaxi:[0,3,6,9],newli:[0,22],newton:[1,7,8,13,19],next:[0,1,2,3,4,5,6,8,9,13,14,22],next_guess:13,next_input:4,nf8_grad:13,nfrom:13,ng:1,ngini:[],ni:14,nian:[],nice:[0,1,5,11,22],nichola:[],nicholaskarlsen1102:[],nimport:13,niter:13,nitric:0,nlambda:[0,5,6],nlevel:[],nlp:21,nm:19,nm_n:[0,22],nmse:6,nn:[2,5,6,12,17],nn_model:1,nnmin:2,node:[1,2,3,9,10,12],node_constructor:2,nois:[0,4,5,6,8,9,10,13,15,22],noise_dimens:4,noisi:[1,6],non:[0,1,3,5,6,7,9,10,11,12,13,14,17,19,22],none:[0,1,2,4,5,9,10,13,19,22],nonlinear:[3,6,8,9,11,12],nonneg:[6,9,13],nonparametr:6,nonsens:19,nonsingular:17,nonumb:[3,7,8,13,17],nor:[1,4,13],norm:[0,1,5,6,8,11,13,22],normal:[3,4,5,6,7,8,9,10,11,12,13,15,16,17,19,22],normali:[17,22],normalize_kwarg:[],norvig:22,norwai:[6,22],notat:[0,2,5,6,13,14,19,22],note:[0,1,2,3,4,5,6,7,8,11,12,13,14,15,16,17,19,21,22],notebook:[0,1,3,9,15,16,22],notesexercise5week452022:22,noth:[1,2,5,8,12,14,19],notic:[4,5,12,13,17,19,22],notimplementederror:2,notion:3,notrace_primit:[],novel:[3,6,10],novemb:[1,18,20,22],now:[0,2,4,5,6,7,8,10,11,12,14,15,16,17,19,22],nowadai:[0,1,3,9,16,22],nox:0,np:[0,1,2,3,4,5,6,7,8,9,10,11,13,14,15,17,19,22],npr:2,nprint:13,nsampl:6,nspin:[],nt:2,nthi:[0,22],ntrained_model:6,nu:19,nuclear:5,nuclei:[0,19,22],nucleon:[0,22],nucleu:[0,22],num:4,num_allow_arg:[0,22],num_coordin:2,num_hidden_neuron:2,num_it:2,num_neuron:2,num_neurons_hidden:2,num_output:[],num_point:2,num_tre:10,num_valu:2,number:[1,3,4,5,6,7,8,9,10,11,12,13,14,15,17,18,20,22],numberid:7,numberparamet:3,numer:[0,5,6,9,10,11,12,13,16,17,21,22],numpi:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,19],numpy_vjp:2,numpy_wrapp:2,nunmpi:5,nvalu:[],nx:[2,13],nx_test:6,nx_train:6,nx_train_mean:6,ny:19,ny_pr:6,ny_train:6,ny_train_mean:6,o:[0,6,7,8,9,11,15,17,20,21,22],obei:[6,11,13],object:[0,1,2,4,6,8,10,13,17,22],objsens:[],obliqu:5,observ:[0,1,3,5,6,7,8,9,10,11,12,13,14,19],obtain:[0,1,5,6,7,8,9,10,12,13,14,17,19,22],obviou:[5,6,11,19],obviouli:22,obvious:[0,4,5,6,17,22],oc:[],occupi:0,occur:[0,6,8,9,17,19,22],octob:[18,20,22],od:0,odd:[0,3,7,22],odenum:2,odesi:2,oen:0,off:[1,3,4,5,9,13,19],offer:[6,11,16,17,18,20,22],offic:[20,22],offici:[18,22],ofil:[],ofstream:[],often:[0,1,3,4,5,6,7,8,9,10,11,12,13,14,16,17,19,22],ofter:[17,22],oh6i_oscwpc:[],ol:[0,13,15,22],old:[1,5,10,13],ols_sk:6,ols_svd:6,olsbeta:[0,5],olxksel3p4a:[],omega:[2,3,6],omega_0:3,omit:[0,5,22],on_train_batch_begin:[],onc:[1,6,9,11,13],one:[0,1,3,4,5,6,7,8,9,10,11,13,14,16,17,19,20,22],oneapi:[],onednn:[],onehot:1,onehot_vector:1,onehotencod:9,ones:[0,2,5,6,8,9,10,11,13,17,22],ones_lik:4,onl:3,onli:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,17,19,22],onlin:[11,18],onto:[5,11],op_nam:[],opbdi:[],open:[0,1,4,6,7,9,15,16,18,20,22],oper:[0,1,3,5,6,10,11,12,13,15,16,19,22],operation:19,ophint:[3,4,14],oplu:19,opmiz:13,opportun:[0,22],oppos:[6,13],opposit:[1,5,8],opresolvertyp:[3,4,14],opt:[1,5,22],optim:[0,2,3,4,5,6,7,9,10,11,14,15],optimis:[1,3],optimizer_v2:[],option:[0,1,3,5,6,7,8,11,17],optionalxlacontext:[],optmiz:[1,8,13],oral:22,orang:0,order:[0,1,2,3,5,6,7,8,9,10,11,12,15,17,19,22],ordinari:[0,2,3,7,11,13,15,16],oreilli:21,org:[0,3,4,7,11,16,17,21,22],organ:[6,7,10,17],orient:[1,5,19],origin:[0,3,5,6,8,11,12,13,17,22],orthogn:5,orthogon:[0,5,6,8,11,13,17,22],orthonorm:5,os:[0,1,4,5,6,7,8,9,20,22],oscar:1,oscil:[3,13],oslo:[0,15,16,18,20,22],osx:[0,15,16,22],other:[0,1,2,3,5,6,7,8,10,13,14,15,16,18,19,20,21],otherwis:[0,1,4,7,13,17,22],ouput:[5,7,12],our:[1,2,3,6,7,8,9,10,12,14,15,16,17,19],ourmodel:0,ourselv:[0,5,6,8,11,13,22],out:[0,1,2,4,5,6,7,8,9,10,11,12,13,16,17,19,22],out_fil:9,outcom:[0,7,9,10,12,19],outdoor:9,outer:[6,12,13],outfil:4,outfilenam:[],outgrad:2,outlier:[0,8,22],outlin:[6,10,11],outlook:9,outperform:10,output:[0,1,3,4,5,6,7,8,9,10,12,13,17,19,22],output_bia:1,output_bias_gradi:1,output_shap:4,output_weight:1,output_weights_gradi:1,outputlayer1:12,outputlayer2:12,outsid:4,over1:13,over:[0,1,3,4,5,6,9,10,12,13,17,22],overal:[1,10],overcast:9,overcom:[12,13],overdetermin:[0,22],overfit:[0,1,3,6,9,10,13],overflow:[1,5],overhead:12,overlap:[3,7,8,9],overlin:[0,5,6,9,10,11,14,17,22],overst:[0,22],overtrain:4,overview:3,own:[4,5,6,8,12,13,16,17],owner:0,ownmsepredict:0,ownmsetrain:0,ownridgebeta:[0,6],ownypredictridg:0,ownytilderidg:0,oxid:0,oyvinssc:[],p0:2,p1:2,p:[0,1,2,3,4,5,6,7,8,9,10,11,13,14,17,19,22],p_:[2,4,8,9],p_hidden:2,p_i:[5,19],p_j:19,p_n:19,p_output:2,p_x:19,pack:[0,22],packag:[0,1,2,3,4,5,6,7,8,11,13,14,15,16,19],pad:[3,4],page:[0,16,22],pai:[0,1,9,13],pair:[0,2,3,9,16,19,22],pamilla:22,panda:[0,4,5,6,7,9,11,15,16],panel:22,paper:1,paradigm:[0,22],parallel:[10,13,16,17,22],param:2,paramat:2,paramet:[0,1,2,3,4,5,6,7,8,9,10,12,13,19],parameter:[0,6,10,22],parametr:[0,6,15,22],paramt:[3,5],parent:2,parent_argnum:[],park:[],parser:[0,22],part:[0,1,3,5,6,10,17,18,19,20,22],partial:[0,1,5,6,7,8,10,11,12,13,19,22],particip:[16,18,20,22],particl:[0,4,13,19,22],particular:[0,1,2,3,5,6,9,10,11,12,13,19,21,22],particularli:[5,6,8,11,13,19],partit:[1,4,9],partli:[6,22],pass:[2,3,12,14],past:[10,19],patch:[6,19],path:[0,4,6,7,9,15,16,22],patient:7,patter:4,pattern:[0,3,4,12,18,21,22],pauli:[0,22],pc:[11,16],pca:[0,7,16,22],pcolor:6,pcolormesh:6,pd:[0,4,5,6,7,9,11,22],pde:2,pdf:[0,3,4,5,6,9,21,22],pedagog:[0,22],penal:6,penalti:[6,13],penros:[5,6],pentagon:13,peopl:[0,1,9,13,16],per:[0,1,6,18,20,22],percentag:[0,10,11,20],perceptron:[0,1,7,22],peregrin:22,perfect:[0,1,13,22],perfectli:[4,6],perform:[0,2,3,4,5,6,8,10,11,12,13,14,15,16,17,19,22],performac:4,perhap:[0,5,13,22],perimet:1,period:[1,4,19],permut:11,persist:13,person:[5,6,7,18,20,22],perspect:21,pertin:12,petal:[8,9],peter:21,petersen:[],phantom:19,phase:[6,12],phenomena:19,phi:8,phi_k:8,philip:[],philosophi:13,phone:[20,22],photo:4,phrase:[0,22],physic:[0,1,4,7,12,13,19,20,21,22],pi:[2,3,5,6,7,9,12,13,19],pick:[1,9,10,11,13,14],pickl:1,pictur:[0,22],pie:[16,22],piec:[11,14],pillow:[0,15,16,22],pinv:[5,6,13],pip3:[0,1,15,22],pip:[0,1,15,16,22],pipelin:[0,6,8,10],pippin:22,pit:4,pitfal:6,pitt:12,pixel:[1,3,4],pixel_height:[1,3],pixel_width:[1,3],place:[0,4,6,8,13,17,22],plai:[0,3,4,5,6,8,11,16,22],plain:[8,10,12,13,14],plan:[6,9,20,21,22],plane:[8,9],plateau:5,platform:[16,22],plausibl:12,pleas:[6,7,11,13,20,22],plenti:1,plethora:[3,12],plot:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,19,22],plot_confusion_matrix:[7,10],plot_count:6,plot_cumulative_gain:[7,10],plot_data:1,plot_dataset:8,plot_decision_boundari:[9,10],plot_import:10,plot_max:4,plot_min:4,plot_model:4,plot_numb:4,plot_predict:8,plot_regression_predict:9,plot_result:4,plot_roc:[7,10],plot_surfac:[2,6,13],plot_train:9,plot_tre:[9,10],plt:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,17,19,22],plu:[0,3,5,7,22],pm:8,pmatrix:2,pml:21,pn:3,png:[0,4,6,7,9,22],point:[0,1,2,3,5,6,7,8,9,10,11,13,14,15,17,19,20,22],point_1:4,point_2:4,poisson:[16,19,22],poli:[6,8],poly100_kernel_svm_clf:8,poly3:0,poly3_plot:0,poly3dcollect:13,poly_featur:[8,9],poly_features10:9,poly_fit10:9,poly_fit:9,poly_kernel_svm_clf:8,polydegre:[0,5,6,10],polygon:13,polym:12,polynomi:[0,5,6,7,8,9,10,11,15,22],polynomial_featur:6,polynomial_svm_clf:8,polynomialfeatur:[0,6,8,9],polytrop:[0,6,22],pool:3,pool_siz:3,poor:[1,13],poorli:0,pop:2,popul:[0,5,22],popular:[0,1,3,6,7,8,9,11,12,15,16,17,19,22],popularli:[0,22],portabl:10,portion:[11,13],pose:[0,4,5,6,11,19,22],posit:[0,1,2,3,5,7,8,10,11,13,14,17,19,22],possibl:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,15,16,17,19,20,22],posterior:5,postpon:[0,22],postul:5,potenti:[0,3,5,6,12,13,22],potr:[],potrf:[],pott:12,power:[0,1,5,6,8,9,12,13,22],pp:[5,6],practic:[0,5,6,7,8,19],practition:[0,1,3,22],pre:22,preced:[1,11,12,19],preceed:4,preceq:8,precis:[0,2,5,11,13,17,19,22],pred:6,predicit:0,predict:[0,1,5,6,7,8,9,10,15,16,21,22],predict_prob:1,predict_proba:[7,10],predictor:[0,5,6,7,9,10,11,22],prefer:[0,1,6,8,9,11,13,15,16,22],prepar:[0,6,17,22],preprocess:[0,4,6,7,8,9,10,11],prerequisit:0,presenc:13,present:[0,5,6,7,9,12,13,17,19,22],preserv:[3,11,17],press:[13,21],pretrain:[1,4],pretti:[0,4,8,9,15,16,22],prev_centroid:14,prevent:[13,19],previou:[0,1,2,3,4,5,6,8,10,11,12,13,17,19],previous:[2,3,9,10,19],price:[0,4,9,13],primal:8,primari:[0,7,22],prime:19,primit:2,princip:[0,5,7,16,22],principl:[0,6,7,8,14,22],print:[0,1,2,3,4,5,6,7,8,9,10,11,13,14,17,19,22],print_funct:[8,9],printout:[0,22],prior:[0,5,6,22],privat:[0,22],prob:[1,19],probabilist:[0,21,22],probabl:[0,1,3,4,6,7,10,13,16,22],problem:[0,3,4,5,6,7,8,9,10,11,12,16,17,19],probml:21,proce:[0,5,6,7,8,9,10,11,13,17,22],procedur:[2,4,5,6,8,10,11,13],proceed:17,process:[0,2,4,6,9,10,12,13,15,16,17,19,21,22],prod:21,prod_:[1,5,7],produc:[0,3,4,5,6,9,10,11,12,13,16,17,19,22],product:[0,1,3,5,6,7,8,12,13,16,17,22],profess:[0,22],program:[0,1,4,5,6,8,12,14,15,16,17,18,19,20,22],programm:17,progress:[1,4,14],prohibit:6,project1:6,project:[0,1,2,3,5,11,13,16,18,20],project_root_dir:[0,6,7,9,22],promin:12,promis:8,promot:[20,22],prone:9,pronounc:[13,16,22],proof:[0,11,12,13,22],propag:[2,3,13],proper:[0,2,6,7,22],properli:[1,6,8,10,13],properti:[0,1,3,12,13,17,22],proport:[0,1,5,9,11,13,19,22],propos:[1,4,6,10,22],propto:[5,13],protect:[],protobuf:[3,4,14],proton:[0,22],prove:[3,13],provid:[0,1,3,4,5,6,8,9,10,12,13,15,16,17,19,22],proxi:[1,13],prune:9,pseudo:[17,19],pseudoinv:5,pseudoinvers:[5,6],pseudorandom:[6,19],psycholog:[0,22],pt:13,ptratio:[],punish:[0,1,22],pure:[3,9,19],purest:9,puriti:9,purpos:[0,3,10,12,14,22],put:[1,22],putarow:[],putboundslic:[],putclist:[],putobjsens:[],putqobj:[],py:[0,1,2,3,4,5,6,7,8,11,13,14,22],pycod:22,pydata:16,pydot:9,pyhton2:22,pylab:[0,7,22],pylint:[3,4,14],pypi:16,pyplot:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,17,19,22],pythagora:5,python2:[0,15,22],python3:[0,1,2,3,4,6,7,8,11,13,14,15,16,22],python:[1,2,3,4,5,6,8,11,12,13,14,19],pytorch:[0,16,22],pywrap_tf:[],q:[5,6,8,11,19],qn_bavhmd8u:[],qp:8,qquad:[2,11,13,17],qr:[5,6,17],quad:[1,13,17],quadrat:[0,8,9,13,15,22],qualit:[4,9,19],qualiti:[0,9,15,16,22],quantifi:1,quantil:10,quantit:[0,6,9,22],quantiti:[0,2,5,6,7,9,10,11,12,14,17,19,22],quantum:[4,12,21,22],quartil:0,quench:5,queri:9,question:[0,5,6,9,11,12,13,20,22],qugan:4,quick:[4,19],quick_execut:[],quickli:[1,3,9,11,13],quit:[1,5,6,9,10,12],quot:[4,22],r2:[0,5,6,22],r2_score:[0,22],r2score:[0,22],r:[0,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,19],r_1:9,r_2:9,r_j:9,r_m:9,rad:0,radial:[0,8,12],radioact:19,radiu:[0,1],rag:2,rain:9,rais:[0,2,13,22],ramp:1,ran0:19,ran1:19,ran2:19,ran3:19,rand:[0,4,5,6,9,10,13,15,17,22],rand_max:[],randint:[6,9,13],randn:[0,1,2,5,6,9,11,13,15,22],random:[0,1,2,3,4,5,6,8,9,13,14,15,16,17,22],random_devic:[],random_forest_model:10,random_index:13,random_indic:[1,3],random_st:[0,7,8,9,10,11],randomforestclassifi:10,randomli:[1,6,9,13,14],randomnumbergener:[],rang:[0,1,2,3,4,5,6,7,9,10,11,12,13,14,17,19,22],rangl:[0,6,11,19,22],rangle_x:19,rank:5,rankdir:4,raphson:[1,8,13],rapidli:[0,22],rare:[1,13,22],rate:[0,1,2,3,4,8,9,10,12,13],rather:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,17,19,22],ratio:[4,7,9,10,11],rational:[0,22],ravel:[5,6,7,8,9,10,11,13,17],raw:3,raw_df:[],rbahrf:[],rbf:[8,11,12],rbf_kernel_svm_clf:8,rbf_pca:11,rc:[0,19],rcond:[0,22],rcparam:[0,1,3,7,8,9,10,19,22],rd:[],rdbj50lv3go:[],re:[2,4,13],reach:[1,4,5,6,7,9,10,11,12,13,14],read:[0,2,3,4,5,6,7,8,11,12,17,18,19,21],read_csv:[0,6,7,9,22],read_fwf:[0,22],reader:[0,6,17,19,22],readi:[0,1,5,6,8,10,11,12,17,22],readili:1,readthedoc:16,real:[0,1,2,4,7,10,11,12,13,17],real_loss:4,real_output:4,realist:8,realiti:19,realiz:[1,12],realli:[0,1,22],rearrang:13,reason:[0,1,3,4,10,13,21,22],reassign:1,rebuild:[],recal:[5,6,9,10,11,12,17,19,22],recalcul:[],recast:3,receiv:[1,3,10,12,19],recent:[0,2,3,4,6,8,9,10,13,14,15,21,22],recept:[3,12],receptive_field:3,recip:[0,6,7,17,22],reciproc:5,recogn:[0,4,5,10,22],recognit:[0,1,3,12,18,21,22],recommend:[0,2,3,4,5,6,8,13,15,16,17,21],reconsid:9,reconstruct:11,record:[10,18,20,22],recreat:[],rectangl:[9,13],rectangular:5,rectifi:[1,3,12],recur:[0,16,22],recurr:[0,1,16,22],recurs:[9,16,17,22],recycl:[],red:[0,3,4,6,8,9],redefin:[0,10,22],reduc:[1,3,5,6,9,10,11,13,22],reduct:[0,10,11,16,19,22],refer:[0,1,2,3,5,6,7,11,12,13,14,17,21,22],referenc:2,refin:12,refit:6,reflect:[0,1,4,5,19,22],refresh:[16,22],refreshprogrammingskil:22,reg:[10,11],regard:[1,9,13],regardless:12,region:[3,4,6,9,12],regist:[6,19],reglasso:5,regr_1:[0,9],regr_2:[0,9],regr_3:[0,9],regress:[1,8,11,12,15,16,17],regressor:[0,7,10,22],regridg:[0,5,6],regular:[0,3,4,5,6,7,9,13,20,22],regularis:6,reilli:[0,15,21,22],reinforc:[0,8,16,22],reiter:1,reject:7,rel:[0,4,6,7,9,12,13,19,22],relat:[0,1,3,4,5,11,13,14,17,19,22],relationship:[0,4,9,22],relativeerror:[0,22],releas:[1,6,13,16,22],relev:[0,1,5,7,11,15,16,19,22],reli:[0,6,8,22],reliabl:[7,19],relu:[3,4],remain:[1,2,4,6,12,17,19],remaind:19,reman:2,remark:1,rememb:[0,8,13,17,22],remind:[0,5,11,13,17,19],remov:[0,4,5,6,22],render:[0,22],reorder:[5,7],reorgan:[0,22],repeat:[0,1,3,4,5,6,9,10,11,13,14,17,19,22],repeated:22,repeatedli:[0,6,10,13],repet:3,repetit:[6,22],rephras:13,replac:[0,1,3,4,5,6,10,12,14,15,16,22],replica:6,report:22,repositori:[0,4,22],repres:[0,1,2,3,4,5,6,7,8,9,10,12,13,19,22],represent:[0,1,3,6,19,22],representd:3,reproduc:[0,5,6,9,12,15,16,19,22],repuls:[0,22],request:[0,13,22],requir:[0,1,3,4,5,6,8,9,11,12,13,17,22],res1:2,res2:2,res3:2,res_analyt:2,res_analytical1:2,res_analytical2:2,res_analytical3:2,resaml:6,resampl:[0,7,10,16,22],rescal:[0,11,12],rescu:5,reseach:6,research:[0,4,13,16,21,22],resembl:[6,19],reserv:[1,5,6,19],reset:[],reshap:[0,1,2,3,4,6,8,9,10,15,17,22],residenti:0,residu:[0,5,13,22],resiz:5,resourc:22,respect:[0,1,2,3,5,6,7,8,10,11,12,13,14,19,22],respond:12,respons:[0,7,9,12,22],rest:[0,5],restat:[0,12,22],restor:4,restored_discrimin:4,restored_gener:4,restrict:[0,3,9,12,22],result:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,19,22],result_typ:[],retail:0,retain:[5,6],return_data:14,return_kwarg:[],return_sequ:4,return_x_i:9,reus:[1,3,6],reveal:[0,12,22],revers:[1,17],review:[16,17],revisit:14,revolut:22,reward:[0,4,22],rewrit:[0,3,5,6,7,8,10,11,12,13,17,19],rewritten:[2,6,8,10,19],rewrot:13,rf:10,rgb:3,rgoj5yh7evk:16,rh:6,rho:[0,10,13,22],rho_1:10,rho_2:10,rho_m:10,rich:[0,22],ride:9,rideclass:9,ridedata:9,ridg:[7,11,13,16,22],ridge_sk:6,ridgebeta:5,right:[0,1,2,3,5,6,7,8,9,10,12,13,14,17,19,22],right_sid:2,rightarrow:[0,1,5,6,8,11,12,13,19,22],rigor:[0,22],ring:6,rise:[0,22],risk:[0,13,15,22],rival:4,river:0,rm:[0,19],rmse:0,rmsporp:13,rmsprop:[1,3,4,13],rnd_clf:10,rng:19,rnn1:4,rnn2:4,rnn:[4,12],rnn_2layer:4,rnn_input:4,rnn_output:4,rnn_train:4,rntrick1:19,rntrick2:19,rntrick3:19,rntrick4:19,ro:[0,13,22],robert:21,robust:[0,22],robustscal:0,roc:[7,10],role:[0,2,5,6,8,16,22],roll:6,room:[0,20,22],root:[0,5,9,13,19,22],rot:22,rotat:[1,8,9,10],rotation_matrix:9,roughli:[1,3],round:[0,7,9,13],routin:[13,17,22],row:[0,1,2,5,6,7,9,11,17,22],rr:5,rrr:5,rthe:[],rug:13,rule:[0,1,5,6,13,22],run:[0,1,2,4,5,6,8,9,11,13,15,16,22],runtim:[1,6,14],runtimewarn:[1,6],russel:22,rust:[0,15,16,17,22],rustad:[],rvert:1,rvert_2:1,s:[0,1,2,3,4,5,6,7,9,11,12,13,16,17,19,22],s_1:6,s_:[3,6],s_i:[6,7],s_j:6,s_k:6,saddl:13,safe:[],sai:[0,1,2,3,4,5,6,7,8,9,10,11,12,17,19,22],said:[6,9,13],sake:[0,5,7,11,22],sale:[0,22],sam:22,same:[0,1,2,3,4,5,6,8,9,11,12,14,17,19,22],samm:10,sampl:[0,1,2,3,4,5,6,7,8,9,10,13,14,15,16,17,19,22],sample_vari:14,sample_weight:[],sampleexptvari:19,samwis:22,sastri:11,satisfactori:[0,22],satisfi:[1,2,3,6,8,13,17,19],satur:[1,6],save:[0,4,6,7,9,13,22],save_fig:[0,6,7,9,10,22],savefig:[0,4,6,7,9,19,22],savetxt:4,saw:5,scalabl:10,scalar:[2,5,6,10,13],scale:[0,1,3,5,6,7,8,9,10,11,12,13,15,16,17,20,22],scale_mean:4,scale_std:4,scalei:[],scaler:[0,7,8,9,10,11],scalex:[],scan:[5,7],scari:5,scatter:[0,1,6,7,8,9,14,22],scenario:[6,13],schedul:[13,20],scheme:[1,13],schigsog2l:[],schrage:19,scienc:[0,1,10,12,13,16,18,19,20,21],scientif:[0,15,16,22],scientist:[0,22],scikit:[3,5,6,7,8,9,10,13,16,17,18,21],scikit_learn:0,scikitlearn:22,scikitplot:[7,10],scipi:[0,3,5,6,13,15,16,17,22],scl:6,score:[0,1,3,6,7,9,10,11,15,20,22],scores_kfold:6,scratch:[1,13],sdg:13,sdt_bfla8ua:[],seaborn:[0,1,3,6,7,22],seamless:[0,15,16,22],search:[0,1,3,5,9,13,22],sec:6,second:[0,2,3,4,5,6,7,8,9,11,12,14,15,16,17,19,20,22],secondeigvector:11,secondli:12,section:[4,11,17,19],sector:[0,22],see:[0,1,2,3,4,5,6,7,8,10,11,12,13,15,16,17,19,22],seed:[0,1,2,3,4,5,6,8,9,11,13,14,15,19,22],seed_imag:4,seek:[1,2,8],seem:[1,3,4],seemingli:[0,22],seen:[0,1,3,5,10,12,19,22],segment:13,seismic:6,seldomli:[0,22],select:[1,5,6,8,9,10,11,18,19,20,21,22],self:[1,5],sell:4,semest:[7,18],semi:[8,13],semilogx:6,send:[5,12,13,20,22],senior:[18,20],sens:[0,4,6,8,22],sensibl:3,sensit:[0,5,6,9,13,22],sent:2,sentenc:[4,12],sep:[],separ:[0,1,2,4,6,8,9,12,14,15,16,19,22],septemb:22,sequenc:[2,3,4,7,9,10,12,13,16,17,19,22],sequenti:[1,3,4,10,12,19],seri:[0,1,2,3,4,5,6,10,11,12,13,17,22],serif:[0,7,19,22],serv:[0,1,2,3,5,7,13,21,22],session:[1,18,20,22],set:[1,4,5,6,7,8,10,11,13,14,16,17,19,20],set_major_formatt:6,set_major_loc:6,set_stream:[],set_tick:[1,8],set_ticklabel:1,set_titl:[0,1,2,3,7,12,14,22],set_xlabel:[0,1,2,3,7,12,22],set_xlim:[7,12],set_xticklabel:1,set_ylabel:[0,1,2,3,7,22],set_ylim:[7,12],set_ytick:7,set_yticklabel:[1,6],set_zlim:6,seth:4,setiosflag:[],setminu:6,setosa:[8,9],setosa_or_versicolor:8,setp:6,setprecis:[],setse:[],setup:[1,4,6,8,16,22],setw:[],sever:[0,3,5,6,7,8,9,11,12,13,16,17,19,22],sgd:[1,3],sgd_clf:8,sgdclassifi:8,sgdreg:13,sgdregressor:13,sgn:5,sh:[],shallow:13,shape:[0,1,2,3,4,5,6,7,8,9,10,11,13,14,15,17,22],shape_bas:2,share:[1,3,22],she:7,shift:[1,6,12,19],ship:3,shire:22,shortcom:13,shorten:4,shorter:19,shorthand:22,shortli:[17,22],should:[0,2,3,5,6,8,9,11,12,13,15,17,19,22],should_sync:[],show:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,17,19,22],show_shap:4,shown:[0,4,5,7,8,11,12,13,17],showpoint:[],shrink:[3,5,6,8,11],shrinkag:[5,6],shrunk:11,shuffl:[0,1,4,6,13],side:[0,2,5,8,12,13,17,22],sigh:[16,22],sigma0:19,sigma1:19,sigma2:19,sigma:[0,1,5,6,7,10,11,12,13,17,19,22],sigma_0:5,sigma_1:5,sigma_2:5,sigma_:[5,17,22],sigma_fn:[7,12],sigma_i:[0,5,22],sigma_j:5,sigma_m:[6,19],sigma_n:[11,19],sigma_t:13,sigma_x:19,sigmoid:[1,2,4,7,8,10,12],sigmundson:6,sign:[1,2,7,8,10,19,20],signal:[1,3,10,12],signatur:[],signifi:4,signific:1,significantli:[1,13,19],sigurd:[],sim:[4,5,6,13,19],similar:[0,1,2,3,4,5,6,7,8,9,10,11,14,16,17,22],similarli:[0,1,3,5,8,10,13,19,22],simpl:[1,2,3,5,6,7,8,10,11,12,14,15,16,17,19],simple_rnn:[],simplepredict:10,simpler:[0,1,5,6,7,13,16,22],simplernn:4,simplest:[0,1,3,4,9,10,12,14,22],simpletre:10,simpli:[0,1,2,4,5,6,8,9,10,11,12,15,16,17,19,22],simplic:[2,5,6,7,8,9,10,11,12,14],simplicti:5,simplifi:[0,6,9,15,16,22],simplist:[3,6,19],simul:6,simultan:6,sin:[0,1,2,3,4,9,12,13,17,22],sinc:[0,1,2,3,5,6,7,8,9,10,11,13,17,19,21,22],sine:[3,12],singl:[0,1,2,3,5,6,7,8,9,12,13,17,19,22],singular:[0,6,13,17,22],sinusoid:3,site:[0,1,2,3,4,6,7,8,11,13,14,18,22],situat:[0,4,5,7,13,19,22],six:[3,4,14,19],size:[0,1,2,3,4,5,6,8,9,10,11,13,17,19,22],sketch:10,ski:9,skill:[0,22],skip:11,skiprow:[],skl:[0,6,22],sklearn:[0,1,3,5,6,7,8,9,10,11,13,14,22],skplt:[7,10],sl:6,slack:8,slice:[2,17,22],slide:[0,3,15,19,22],slight:[6,13],slightli:[1,2,3,5,6,7,10,19],slope:[8,11,12],slow:[0,2,8,13],slower:[5,17,22],slowest:17,slowli:12,slp:1,small:[0,1,2,3,5,6,8,9,10,11,12,13,16,17,19,22],smaller:[0,1,2,5,6,8,9,11,13,19,22],smallest:[0,4,14,15,22],smallest_row_index:14,smooth:[0,3,6,13,22],sn:[0,1,3,6,7,22],sne:11,sneak:22,so:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,16,17,19,20,22],soar:6,social:[0,22],societ:22,soft:[1,7,10,12],soften:8,softmax:[3,7],softwar:[0,8,15,16,17],sol:8,sole:[0,6,22],solid:[0,7,22],solitem:[],soltyp:[],solut:[0,1,2,3,5,6,8,10,11,13,17,19,22],solutionsummari:[],soluton:2,solv:[0,1,3,5,6,8,10,11,12,13,17,22],solve_expdec:2,solve_ode_deep_neural_network:2,solve_ode_neural_network:2,solve_pde_deep_neural_network:2,solveod:2,solveode_popul:2,solver:[2,7,8,9,10,11,17],some:[0,1,2,3,4,5,6,7,8,9,10,11,12,14,19],some_model:6,somehow:4,someth:[0,1,3,4,7,9,11,19,22],sometim:[0,1,11,12,13,14,22],soon:[17,20],sophist:[0,22],sopt:13,sort:[5,6,9,11,19],sound:[3,5],sourc:[0,1,3,6,15,16,17,19,22],space:[0,1,4,5,8,9,11,12,13,14,19],span:[0,3,5,9,11,17,22],spare:1,spars:[3,6,17,22],sparse_mtx:[17,22],sparsecategoricalcrossentropi:3,sparsiti:10,spatial:[1,2,3,12],spdiag:[],speak:19,special:[6,7,10,12,13,17,19,22],specif:[0,1,2,3,4,5,6,7,8,9,11,12,16,17,19,21,22],specifi:[0,3,5,6,7,9,11,13,14,19,22],specifici:[0,10,22],spectacular:3,spectral:1,speech:[0,1,3,4,12,22],speed:[1,2,4,13],spend:19,sphere:0,spin:6,spite:[0,22],spline:8,split:[1,3,4,5,6,8,9,10,11,14,19],splite:0,splitter:[1,10],spmatrix:[],spontan:19,spot:3,spread:[0,11,19,22],springer:[21,22],spuriou:13,sqquar:[],sqrsignal:3,sqrt:[0,3,4,5,6,8,10,11,13,19],squar:[1,2,3,4,7,8,9,11,13,14,15,16,17,19],squarederror:10,squaredeuclidean:14,squash:12,squeez:[],srand:[],srtm:6,srtm_data_norway_1:6,sse4:[],stabil:5,stabl:[0,4,5,6,7,9,11,16,22],stack:[2,3,4],stacklevel:[0,22],stage:[5,13],stai:[0,2,4,5,11,22],stand:[0,5,9,12,22],standard:[0,1,4,5,6,7,8,10,12,15,17,19,22],standard_basi:2,standardscal:[0,6,7,8,9,10,11],stanford:13,start:[0,1,2,3,4,5,6,8,9,10,11,12,13,14,17,19,20,22],start_box:[2,13],start_nod:[2,13],start_tim:14,startpoint:[],stat:6,state:[1,2,4,5,6,7,8,10,11,12,13,16,19],statement:[0,7,17],statist:[0,1,3,4,7,9,10,11,12,13,14,17,18,21],statu:[0,7,11,22],stavang:6,std:[0,4,6,22],stdev:[],stdout:[],steep:13,step:[0,1,2,4,6,7,9,10,11,12,13,14,17,22],step_fn:[7,12],step_length:13,steps_list:9,steps_per_epoch:[],stereo:3,stian:[],still:[0,2,3,5,6,11,13,19],stimuli:12,stk2100:[21,22],stk3155:[15,18,20],stk4021:[21,22],stk4051:[21,22],stk4155:[18,20],stk5000:21,stk:[21,22],stochast:[0,1,5,6,8,11,12,15,22],stock:4,stoke:12,stone:[0,7,22],stop:[1,4,7,9,11,13,14],storag:5,store:[0,1,2,3,6,11,13,19,22],storehaug:[20,22],str:[1,3,4],straight:[0,6,8,13,22],straightforward:[0,2,3,5,6,8,9,10,13,17,22],strategi:[0,1,9,22],stratifi:6,streamtyp:[],strength:[0,5,14],stretch:11,strict:[8,13],strictli:[8,13],stride:[4,17],strike:6,string:1,stroke:7,strong:[3,6,9,10,12,17,19],strongli:[0,8,16,17],stronli:0,structur:[0,1,2,3,6,9,10,12,16,22],stuck:[1,13],student:[0,18,20,21,22],studi:[0,3,4,5,6,7,8,11,12,13,16,21,22],studier:21,style:[0,7,9,17,22],sub:[9,12],subarg:[2,13],subdivid:[0,17,22],subfield:[0,22],subject:[6,8,19],submit:22,subplot:[0,1,3,4,6,7,8,9,10,13,14,22],subplots_adjust:[8,19],subprogram:[17,22],subract:0,subroutin:[0,22],subscript:1,subsequ:[1,4,5,6,12,17,19],subset:[1,6,9,12,13,16,22],subspac:[0,8,11],substanti:[9,10],substep:11,substitut:[3,6,12,17],subsubset:9,subtask:6,subtl:1,subtract:[0,4,5,6,11,13,17,19],subtre:9,subval:[2,13],succeed:[0,4,22],success:[3,7,9,13,19],successfulli:[4,9],sucess:[],sudo:[0,15,16,22],suffer:[0,1,2,5,10,22],suffici:[1,6,8,11,13],suggest:[1,13,21],suit:[8,12],suitabl:[0,19],sum:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,17,19,22],sum_:[0,1,2,3,5,6,7,8,9,10,11,12,13,14,15,17,19,22],sum_i:[0,2,5,6,8,13],sum_j:6,sum_ja_:0,sum_k:[6,8,12,17],sum_logist:13,sum_m:3,sum_n:3,sum_nx_:3,summar:[5,6,9],summari:[1,3,4,10,18],summat:[0,3],sunni:9,superfici:3,superscript:[1,12],supervis:[0,5,6,7,9,12,16,22],supplement:7,support:[0,1,9,10,11,13,16,22],suppos:[0,5,6,7,8,10,11,12,13,17,22],suppress:[5,13],sure:[0,1,4,6],surf:6,surfac:[0,6,22],surpass:6,surpris:[0,22],surround:[3,16],survei:[0,5,6,22],suyrzm0:[],svc:[8,9,10],svd:[0,6,11,22],svdinv:5,svm:[8,9,10,11],svm_clf:[8,10],swap:[],swapax:[],swath:5,sy:[3,4,13,14],symbol:[1,5,11,13,16,19,22],symmeteri:1,symmetr:[0,5,8,11,12,13,17,22],symmetri:6,sympi:[0,15,16,22],synonim:19,syntax:[1,13],syntaxerror:1,syrk:[],system:[0,1,3,4,6,7,9,10,12,13,15,16,17,22],systemat:[4,6],t0:[3,6,13],t1:[2,13],t2:2,t3:2,t:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,19,20,22],t_0:[2,9,13],t_1:13,t_:2,t_b:10,t_i:[1,2,5,12],t_j:12,t_k:9,tabl:[9,19,20,22],tabul:[0,22],tabular:22,tackl:4,tag:[2,3,4,5,6,7,12,13,14,17,19],taht:[0,22],tail:19,tailor:[2,8,11,22],taiwan:[0,22],take:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,16,17,19,22],taken:[0,1,3,6,10,13,17,22],tan:[2,3],tangent:[1,4,12,13],tanh:[1,4,7,8,12],tape:[],target:[0,1,3,4,5,6,7,8,9,10,11,12,22],target_nam:9,task:[0,1,3,6,9,11,12,14,22],tau:[3,5,19],taught:22,tax:0,taylor:[2,13],taylornr:13,tc:8,td:[1,6,13,22],teach:22,team:1,teaser:0,technic:[0,5,6,13,15,22],techniqu:[0,1,8,10,13,16,19,21,22],technolog:[0,1,22],tek5040:[],tell:[0,4,6,10,11,13,19],temp1:1,temp2:1,temp:1,temperatur:[0,9,22],temporarili:1,ten:[3,22],tend:[3,5,6,8,9,10,12,13,14],tendenc:[0,22],tension:6,tensor:3,tensorflow:[0,2,4,8,14,15,16,17,18,21,22],term1:[5,6,11],term2:[5,6,11],term3:[5,6,11],term4:[5,6,11],term:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,19,22],termin:[0,4,5,9,10,13,15,22],terrain1:6,terrain:6,test:[3,4,5,6,7,8,9,10,13,17,19],test_acc:3,test_accuraci:[1,3],test_error:6,test_imag:[3,4],test_ind:6,test_input:4,test_label:[3,4],test_loss:3,test_pr:1,test_predict:1,test_rnn:4,test_scor:[7,10],test_siz:[0,1,3,5,6,10,22],test_split:9,testerror:[0,6],testi:4,testpredict:4,testx:4,text:[0,1,2,4,5,8,9,11,13,15,17,19,21,22],textbook:[],textual:9,textur:1,tf:[1,3,4,13,14],tfe_py_execut:[],th:[0,1,2,5,6,7,9,12,13,14,15,17,19,22],than:[0,1,2,3,4,5,6,7,9,10,11,12,13,16,19,22],thank:[4,6],theano:[1,16,22],thei:[0,1,2,3,4,5,6,7,8,9,11,12,13,17,19],them:[0,1,3,4,6,8,9,10,11,12,13,17,22],theme:[0,22],themselv:[0,19,22],thenc:6,theorem:[2,6,7],theoret:[0,4,10,22],theori:[0,1,3,8,9,12,13,16,21,22],thereaft:[0,5,6,11,12,15,17,22],therebi:[0,5,7,11,22],therefor:[0,1,2,3,4,6,7,8,11,13,19,22],therein:11,thereof:[0,6,13,22],theta:[1,4,13,19],theta_:[1,13],theta_i:1,theta_k:[],theta_linreg:13,theta_t:13,thi:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,21],thing:[0,1,2,4,5,7,9,19,22],think:[0,1,3,4,6,9,12,13,14,19,22],third:[0,3,6,13,20,22],thirti:7,thorughout:22,those:[0,3,5,6,8,9,10,11,17,18,22],though:[1,2,3,4,13,17,19],thought:[6,14,19],thousand:[0,1,22],thread:[],three:[0,1,3,5,6,8,9,12,15,17,18,19,20,22],threshold:[1,3,9,10,11,12,13],through:[0,1,2,3,4,5,6,8,11,12,13,14,16,17,19,22],throughout:[0,4,5,14,16,17,19,22],thu:[0,1,2,5,6,7,8,10,11,12,13,20,22],thumb:[0,6,22],thursdai:[20,22],tibshirani:[6,18,21,22],tick_param:6,ticker:[6,13,19],tif:6,tight_layout:[1,7],tightli:11,tild:[0,5,6,7,11,15,19,22],till:[0,4,7,8,9,10,12,17,22],time:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,16,17,19,22],timefunct:[],timeit:4,timer:4,tini:1,tip:3,titl:[0,1,2,3,4,6,7,8,9,10,13,19,22],tmp:13,tmp_log:[],tn:[2,3,7],to_categor:[1,3,4],to_categorical_numpi:1,to_numer:[0,6,22],to_str:[],todai:3,togeth:[0,3,6,8,11,13,16,22],toi:14,told:13,toler:[2,6,14],tolist:4,tomographi:12,too:[0,2,4,5,6,9,11,13,15,19,21,22],took:[8,22],tool:[0,1,3,6,13,16],toolbox:8,top:[0,3,4,5,6,9,10,14,16,22],top_node_typ:2,top_trac:2,topic:[0,5,6,7,8,16],topolog:[1,3,12],toposort:2,torkjellsdatt:[20,22],toss:[10,19],total:[0,1,2,3,4,6,7,8,10,11,12,13,14,15,17,19,20,22],total_loss:4,totalclustervari:14,totalscatt:14,totalvari:[],toward:[1,2,7,12,13],town:0,tp:[4,7],tpng:9,tpu:[13,16,22],tqdm:6,tr:[],trace:[2,13],trace_stack:[2,13],traceback:[0,2,3,4,6,8,9,10,13,14,15,22],traceback_util:[],tracer:[2,13],track:[3,13,14,17],tract:0,tractabl:[0,22],trade:[5,9],tradeoff:[0,5,22],tradit:[0,1,4,6,22],train:[2,3,5,6,8,9,10,11,12,13],train_accuraci:[0,1,3,22],train_dataset:4,train_end:[0,1],train_error:6,train_funct:[],train_imag:[3,4],train_ind:6,train_label:[3,4],train_pr:1,train_siz:[0,1,3],train_step:4,train_test_split:[0,1,3,5,6,7,9,10,11,22],train_test_split_numpi:[0,1],trainabl:[],trainable_vari:4,trained_model:6,trainerror:0,traini:4,training_checkpoint:4,training_dataset:4,training_gradi:13,training_gradient_fun:[],training_loss:[],trainingerror:6,trainpredict:4,trainscor:4,trainx:4,trait:[0,22],trajectori:4,tran:[],transfer:9,transform:[0,5,6,7,8,9,10,11,12,13,16,17,22],transit:[6,12],translat:[1,4,6,10],transpos:[1,5,11,17],travers:[0,5],treat:[0,1,3,6,12,13,19,22],tree:[0,1,6,16,22],tree_clf:[9,10],tree_clf_:9,tree_clf_sr:9,tree_reg1:9,tree_reg2:9,tree_reg:9,trend:19,treue:7,trevor:21,tri:[2,3,4,9,13],triain:0,trial:[0,2,4,6,13,19,22],triangl:13,triangular:17,trick:[3,4,8,11,13,19],trickier:19,tridiagon:17,trillion:16,trivial:[0,1,5,11,19,22],troubl:[0,8,12],truck:3,true_beta:6,true_divid:1,true_fun:6,truli:22,tucker:8,tuesdai:[20,22],tumor:[7,9],tumour:7,tunabl:1,tune:[4,9,13,17,22],tup:[],tupl:[2,13],turn:[0,1,5,6,7,8,9,10,11,12,13,17,19,22],tutori:[1,4],tv:2,tveito:2,tweak:[1,4,10,19],twice:13,twist:11,twister:[],two:[0,1,2,4,5,6,7,9,10,11,12,13,14,15,17,18,19,21,22],tx:13,tx_1:13,txt:4,ty:13,type:[0,1,3,6,8,10,13,17,19],typeerror:[2,13],typic:[0,1,2,3,4,5,7,9,10,12,13,19,22],u:[0,2,5,6,10,11,12,17,22],u_:17,u_i:12,u_m:10,ua:[0,22],ubuntu:[0,15,16,22],uci:0,uio:[20,21],un:14,unari:[17,22],unary_f:[2,13],unary_oper:[2,13],unary_to_nari:[2,13],unbalanc:[6,9],unbias:[0,5,6,22],uncent:6,uncertainti:[0,5,22],uncertitud:19,unchang:[1,3],uncorrel:[10,19],undefin:5,under:[0,1,5,6,10,13,15,16,22],underdetermin:[0,22],underfit:[1,6],underflowproblem:5,undergo:5,undergradu:[18,20],underli:[0,1,9,13,19,22],underset:[4,14],understand:[0,1,3,5,6,10,13,14,16,22],understood:[8,13],undesir:8,undetermin:[5,8],undo:4,unexpect:6,unexpected:19,unfair:6,unfortun:[1,8,9,10],unicode_liter:[8,9],uniform:[0,1,5,6,11,13,15,19,22],uniform_real_distribut:[],uniformli:[13,19],unifrompdf:19,unimport:13,union:[5,6],uniqu:[0,2,6,13,14,17,22],unique_cluster_label:14,unit:[0,1,3,4,5,10,12,19,22],unitari:[5,6,17],unitarili:[17,22],uniti:19,univari:19,univers:[0,1,2,13,15,16,18,20,22],unix:1,unknow:[0,17,22],unknown:[0,1,3,4,5,6,8,10,13,17,22],unknowwn:12,unlabel:1,unless:[0,3,6,11,13,22],unlik:[1,3,8,13],unnecessarili:9,unord:3,unravel:1,unrol:[3,11],unseen:[0,7,9],unstabl:1,unsupervis:[0,1,4,12,16,22],unsymmetr:[17,22],until:[1,2,4,9,12,13,14],untouch:0,unusu:12,up:[1,3,4,5,6,8,10,11,13,14,16,17,19,20],updat:[1,2,10,12,13,14],uploa:22,upload:[16,21],upon:[0,1,6,7,11,17],upper:[0,8,9,17],uppercas:[17,22],upsampl:4,upscal:4,us:[4,5,6,8,9,10,11,12,14,15,17,18,19,21],usa:22,usag:[0,8,16,22],usd10000:0,usd:0,use_bia:4,use_multiprocess:[],usecol:[0,22],useless:1,user:[0,1,2,4,6,7,8,11,15,16,17,22],userwarn:6,usetex:19,usg:6,usr:19,usual:[0,3,4,7,12,13,14,22],ut:5,util:[0,1,3,4,6,7,10,14,22],ux:17,v0:19,v1:[3,4,14,19],v2:[3,4,14,19],v8ejbfezkui:[],v:[2,4,5,6,11,13,16],v_0:11,va:1,val:13,val_accuraci:3,val_loss:4,vale:2,valid:[0,1,4,7,9,10,13,16,19,22],validation_batch_s:[],validation_data:3,validation_freq:[],validation_split:4,validation_step:[],valu:[0,1,2,3,4,6,7,8,9,10,12,13,14,15,16,17,22],valuat:9,valueerror:[0,2,22],valy:4,van:[0,22],vandenbergh:[8,13],vandermond:[0,22],vanilla:[0,6,11,14],vanish:[1,4,13,19],var_x:19,varabl:8,varepsilon:[5,6],varepsilon_:[5,6],varepsilon_i:[5,6],vari:[0,1,3,5,6,10,15,22],variabl:[0,1,2,5,6,7,8,10,11,12,13,14,17,22],varianc:[0,1,5,7,9,10,11,13,14,16,17,19,22],variance_i:[5,11],variance_x:[5,11],variant:[0,1,6,8,12,13,22],variat:[3,4,11,22],varieti:[0,3,12,15,16,22],variou:[1,3,5,6,7,8,9,11,12,13,16,17,19],vartempvec:[],varvec:[],varydimens:4,vastli:3,vaue:1,vault:0,vdot:[2,13],vec:6,vector:[0,1,2,3,4,5,6,7,9,10,11,13,14,16],vector_mean:14,ventur:[0,8,15,16,22],verbos:[1,3,4],veri:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,19,21,22],verifi:[3,11,17,22],versatil:[8,22],versicolor:[8,9],version:[0,3,10,13,14,15,16,17,19,22],versu:1,vert:[0,1,5,6,7,8,9,11,13,22],vert_1:[5,6],vert_2:[5,6,11],via:[0,5,6,7,8,9,10,11,12,15,16,17,18,19,20,22],vidal:11,video:[0,1,12,16,18,20,22],view:[1,3,5,6,12,13,19,21,22],violat:8,virginica:9,viridi:[0,1,2,3,22],virtual:1,viscos:13,viscou:13,visibledeprecationwarn:2,vision:[0,3,22],visual:[0,3,11,12,15,16,22],visualis:1,viz:[6,8,19],vjiseqm2lci:[],vjp:[2,13],vjp_0:[],vjp_0_fun:[],vjp_1:[],vjp_1_fun:[],vjp_argnum:2,vjpfun:2,vjpmaker:[],vjpnode:[2,13],vmap:13,vmax:[1,6],vmc:[],vmin:[1,6],voic:3,volum:[0,3,22],vote:10,voting_clf:10,votingclassifi:10,votingsimpl:10,vrtx:[],vs:[0,4,6],vspace:[2,13],vstack:[5,11,17,19,22],vt:5,w1:8,w2:[8,11],w3:8,w:[0,1,2,3,4,5,6,7,8,10,11,12,13,14,17,19,22],w_1:[8,17],w_1x_1:8,w_1x_:8,w_2:[8,17],w_2x_2:8,w_2x_:8,w_3:17,w_4:17,w_:[1,12],w_hidden:2,w_i:[1,2,10],w_ix_i:12,w_j:17,w_m:17,w_output:2,w_px_:8,w_px_p:8,wa:[0,1,3,4,5,6,7,10,11,12,13,14,17,22],wai:[0,1,2,3,4,5,6,7,8,10,11,12,13,14,17,19,22],walk:9,walker:19,wang:[0,22],want:[0,1,2,3,4,5,6,8,9,10,11,12,13,14,15,16,19,22],warn:[0,1,4,8,22],warrant:6,wast:3,watch:16,wave:3,wavelet:8,we:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21],weak:[9,10,14],weather:[1,12],web:[16,18,20,22],webpag:22,websit:[6,17,18,22],wedg:[8,19],wednesdai:[20,22],wee:11,week:[0,5,6,7,18,20],weekli:[16,20,21,22],weight:[0,1,2,3,6,7,9,10,12,13,19],weigth:2,welcom:[8,16],well:[0,1,2,3,4,5,6,7,8,9,10,12,13,15,16,17,19,21,22],went:8,were:[0,1,3,4,5,6,7,8,10,11,12,14,19,22],wessel:[0,22],westbi:[],westby:[],what:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,19],whatev:3,when:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,17,19,22],whenev:[13,19],where:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,19,20,22],wherea:[6,19],wherein:[1,12],whether:[0,3,5,7,9,19,22],which:[0,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,22],whichev:[1,3],white:9,who:[0,18,22],whole:[1,3,4,5,9,11,13],whose:[0,6,10,19],whow:11,why:[0,1,3,6,13],wide:[0,1,3,6,7,12,15,16,17,22],widehat:6,width:[0,3,8,9,22],wieringen:[0,22],win:10,wind:9,wing:[20,22],winther:2,wiothout:6,wiscons:7,wisconsin:10,wisdom:6,wise:[0,1,5,12,13],wish:[0,2,5,7,8,11,13,14,17,22],with_std:0,wither:6,within:[0,2,3,4,7,9,12,13,14,19,21,22],withinclust:14,without:[0,1,5,6,8,9,11,12,13,22],won:[0,22],wonder:8,woodi:22,word:[0,1,3,4,5,6,7,14,19,22],work:[0,1,4,6,7,8,9,13,15,16,18,19,20,22],worker:[],workshop:22,world:[0,8,22],worldwid:[0,22],wors:[0,1,3,4,6,22],worst:[],worth:9,would:[0,1,3,5,6,7,8,9,10,11,12,13,17,19,22],wrap:[2,6,17,22],wrap_toco:[3,4,14],wrap_util:[2,13],wrapper:[0,22],write:[0,1,2,3,5,6,7,8,12,13,15,17,22],written:[0,2,3,5,11,12,13,16,17,19,22],wrong:[1,8],wrongli:10,wrote:[5,11],wrt:[2,10,13],wth:[10,13],www:[16,17,21,22],wx_1:8,x0:8,x1:[4,8,9,10,13],x1_exampl:8,x1d:8,x2:[8,9,10,13],x2d:[8,11],x2d_train:11,x2dsl:11,x3:8,x:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,17,19,22],x_0:[0,5,11,17,22],x_1:[0,2,5,6,7,8,9,10,11,13,17,19,22],x_2:[0,2,5,6,7,8,9,10,11,13,17,19,22],x_3:[8,17,19],x_4:17,x_:[0,2,3,5,6,8,10,11,13,14,17,19,22],x_center:11,x_data:1,x_data_ful:1,x_hidden:2,x_i:[0,1,2,5,6,7,8,9,10,11,12,13,14,17,19,22],x_input:2,x_ix_:[0,22],x_iy_i:8,x_j:[0,2,8,9,12,19],x_jy_j:8,x_k:[12,14,17,19],x_l:19,x_m:[6,12,17,19],x_n:[0,2,3,6,8,11,12,13,17,19,22],x_new:[9,10],x_offset:6,x_output:2,x_p:[3,7,9],x_poli:9,x_poly10:9,x_pred:4,x_prev:2,x_reduc:11,x_scale:8,x_small:13,x_test:[0,1,3,5,6,7,9,10,11,22],x_test_own:6,x_test_scal:[0,6,7,9,10,11],x_tot:4,x_train:[0,1,3,4,5,6,7,9,10,11,22],x_train_mean:6,x_train_own:6,x_train_scal:[0,6,7,9,10,11],x_val:1,xarrai:[16,22],xavier:1,xbnew:13,xcode:[0,15,16,22],xdclassiffierconfus:10,xdclassiffierroc:10,xg_clf:10,xgb:10,xgbclassifi:10,xgboost:9,xgboot:10,xgbregressor:10,xgparam:10,xgtree:10,xi:[8,13],xi_1:8,xi_:8,xi_i:8,xk:8,xla:[13,16,22],xlabel:[0,1,2,3,4,5,6,7,8,9,10,13,19,22],xlim:[6,10],xm:9,xmesh:13,xnew:[0,13,22],xp:19,xpanda:0,xpd:[5,11],xplot:0,xs:9,xscale:0,xsr:9,xt_x:13,xtest:6,xtick:[3,6,8,9],xtrain:6,xu:[0,22],xx:[0,17,22],xy:[0,6,8,17,22],xytext:8,xz:[17,22],y1:4,y2:4,y3:4,y:[0,1,3,4,5,6,7,8,9,10,11,12,13,14,15,17,19,22],y_0:[0,5,11,17,22],y_1:[0,5,8,9,11,13,17,22],y_1y_1:8,y_1y_1k:8,y_1y_2:8,y_1y_2k:8,y_1y_n:8,y_1y_nk:8,y_2:[0,5,8,9,11,17,22],y_2y_1:8,y_2y_1k:8,y_2y_2:8,y_2y_2k:8,y_3:[0,9,17],y_4:17,y_:[0,1,5,6,10,11,17,22],y_data:[0,1,5,6,22],y_data_ful:1,y_decis:8,y_fit:0,y_i:[0,1,5,6,7,8,9,10,11,12,13,15,17,22],y_if_:10,y_ix_:[0,22],y_ix_i:[7,8,13],y_iy_jk:8,y_j:[6,8,12],y_k:12,y_m:17,y_model:[0,4,5,6,22],y_n:[8,13],y_ny_1:8,y_ny_1k:8,y_ny_2:8,y_ny_2k:8,y_ny_n:8,y_ny_nk:8,y_offset:6,y_plot:9,y_pred1:9,y_pred2:9,y_pred:[0,1,4,6,7,8,9,10],y_pred_rf:10,y_pred_tre:10,y_proba:[7,10],y_scaler:6,y_test:[0,1,3,4,5,6,7,9,10,11,22],y_test_onehot:1,y_test_predict:0,y_tot:4,y_train:[0,1,3,4,5,6,7,9,10,11,22],y_train_mean:6,y_train_onehot:1,y_train_predict:0,y_train_scal:6,y_val:1,ye:[3,6,7],year:[0,16,22],yet:[0,1,6,8,11,13,22],yhd5w:[],yi:13,yield:[0,2,5,6,8,10,12,13,14,17,19,22],yk:8,ylabel:[0,1,2,3,4,5,6,7,8,9,10,13,19,22],ylim:[3,6],ym:9,ymesh:13,yn:0,yo:[8,9,10],yoshua:[1,21],you:[0,1,2,3,4,5,6,8,9,10,11,13,15,16,17,19,20,21],young:[0,22],your:[1,2,4,5,6,8,11,13,16,17],yourself:[11,13,22],youtu:[],youtub:16,ypred:6,ypredict2:13,ypredict:[0,13,22],ypredictlasso:5,ypredictol:[0,5],ypredictown:6,ypredictownridg:6,ypredictridg:[0,5,6],ypredictskl:6,yridg:22,ys:9,ytest:6,ytick:[3,6,8,9],ytild:[0,6,22],ytildelasso:5,ytildenp:[0,22],ytildeol:[0,5],ytildeownridg:6,ytilderidg:[5,6],ytrain:6,yvqgvcsovpw:[],yx:[17,22],yy:[17,22],yz:[17,22],yzbxji6lgl0:[],z:[0,1,2,3,4,5,6,7,8,9,11,12,13,17,19,22],z_0:[17,22],z_1:[17,22],z_2:[17,22],z_:[1,2,12,17,22],z_c:1,z_h:1,z_hidden:2,z_i:[1,12],z_j:[1,12],z_k:12,z_m:1,z_mod:9,z_o:1,z_output:2,zaman:19,zaxi:6,zero:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,17,19,22],zeros_lik:4,zfill:4,zip:[2,4,6,13],zl:[],zm_h:[0,22],zn:0,zone:0,zoom:22,zx:[17,22],zy:[17,22],zz:[17,22]},titles:["3. Linear Regression","14. Building a Feed Forward Neural Network","15. Solving Differential Equations with Deep Learning","16. Convolutional Neural Networks","17. Recurrent neural networks: Overarching view","4. Ridge and Lasso Regression","5. Resampling Methods","6. Logistic Regression","8. Support Vector Machines, overarching aims","9. Decision trees, overarching aims","10. Ensemble Methods: From a Single Tree to Many Trees and Extreme Boosting, Meet the Jungle of Methods","11. Basic ideas of the Principal Component Analysis (PCA)","13. Neural networks","7. Optimization, the central part of any Machine Learning algortithm","12. Clustering and Unsupervised Learning","19. Exercises week 34","Applied Data Analysis and Machine Learning","2. Linear Algebra, Handling of Arrays and more Python Features","Teaching schedule with links to material","1. Elements of Probability Theory and Statistical Data Analysis","Teachers and Grading","Textbooks","20. Week 34: Introduction to the course, Logistics and Practicalities"],titleterms:{"1":[0,15,22],"10":[],"11":[],"12":[],"13":[],"14":[],"15":[],"16":[],"17":[],"18":[],"19":[],"2":[0,15,22],"20":[],"2021":[],"2022":[],"2023":20,"21":[],"22":[],"23":[],"24":[],"25":[],"26":[],"27":[],"28":[],"29":[],"3":[0,15,22],"30":[],"31":[],"34":[15,22],"35":[],"36":[],"37":[],"38":[],"39":[],"4":0,"40":[],"41":[],"4155":[],"42":[],"43":[],"44":[],"45":[],"46":[],"47":[],"5":0,"6":[],"7":[],"8":[],"9":[],"case":[8,10,19],"do":[1,22],"final":12,"function":[0,1,6,7,8,10,11,12,13,19,22],"import":[5,17,22],"new":4,A:[0,1,4,8,9,22],And:22,In:20,Ising:6,The:[0,1,2,3,5,6,7,8,9,11,12,16,22],To:22,With:4,about:22,activ:[1,12],actual:[],ad:[0,6,22],adaboost:10,adagrad:13,adam:13,adapt:10,adjust:1,adversari:4,again:[3,9],ai:22,aim:[8,9,22],aka:22,algebra:[17,22],algorithm:[9,10,11,12],algortithm:13,all:8,an:[0,4,10,22],analys:5,analysi:[0,5,6,11,16,19,22],analyt:0,ani:13,anoth:9,appli:16,approach:[0,8,14,22],approxim:12,architectur:1,arrai:[17,22],assist:20,august:[],autocorrel:19,autograd:[2,13],automat:13,back:[1,11,12],background:16,bag:10,base:13,basic:[0,5,7,9,10,11,17],batch:1,bay:5,befor:11,better:8,bia:6,binari:1,bind:22,binomi:[],bird:10,block:[],boost:10,bootstrap:[6,10],boston:0,breast:1,brief:22,bring:12,build:[1,3,9],c:22,calcul:[],can:22,cancer:[1,7,9,11],cart:9,central:[13,16,19],chain:12,chang:10,channel:22,chi:[0,22],choos:1,cifar01:3,classic:11,classif:[1,9,10],classifi:8,clip:1,cluster:14,cnn:3,code:[0,1,2,5,9,11,12,13,14,22],collect:[1,3],commun:22,compar:[2,10],complex:[0,6],complic:6,compon:11,comput:9,computerlab:22,con:9,concept:19,conjug:13,continu:[],contn:22,convex:[8,13],convolut:[3,12],correl:11,cost:[1,10],cours:[16,21,22],covari:[5,11,19],cover:22,cross:6,cumul:[],cython:22,data:[0,1,3,6,7,9,11,15,16,19,22],dataset:[1,3],deadlin:22,decai:2,decis:[9,10],decomposit:[5,11,17],deep:[1,2],defin:[1,22],definit:[],degre:0,demonstr:[],dens:[0,22],deriv:[5,12],descent:[2,10,13],detail:[3,22],develop:1,deviat:[],diagon:11,dice:[],differ:8,differenti:[2,13],diffus:2,dimension:[2,3,8],disadvantag:9,discret:19,disguis:[],distribut:[5,19],domain:19,down:1,dropout:1,element:[0,19,22],elimin:17,energi:22,ensembl:10,entropi:9,environ:[0,15,22],equat:[0,2,12,22],error:[0,10,22],essenti:22,etc:22,euler:2,evalu:1,event:[],exampl:[0,1,2,3,4,6,7,8,9,10,22],exercis:[0,6,15,22],expect:19,experi:19,explor:[0,15,22],exponenti:2,express:22,extrapol:4,extrem:[10,22],ey:10,fall:20,famili:[1,22],famou:17,featur:[9,17],feed:[1,12],fine:1,first:[4,12,22],fit:[0,10,22],forc:3,forest:10,format:22,forward:[1,2,12],fourier:3,frank:6,freedom:0,frequentist:[0,22],from:[5,10,12],full:2,further:[3,5],fy:[],gan:4,gaussian:17,gd:13,gener:[4,9,22],geometr:11,gini:9,good:[0,22],grade:[20,22],gradient:[1,2,10,13],growth:2,ha:16,handl:[17,22],have:22,heard:22,hidden:2,hous:0,how:[],hyperparamet:1,hyperplan:8,i:1,id3:9,idea:11,ii:22,implement:1,implic:5,improv:1,includ:13,increment:11,index:9,inform:20,input:2,instal:[16,22],instructor:20,interpret:[5,11,22],introduc:[11,13],introduct:[0,6,16,17,22],invers:[5,17],iter:10,its:[],jackknif:[],jax:13,julia:22,jungl:10,kera:[1,3],kernel:[8,11],lagrangian:8,lasso:[5,6],later:5,layer:[1,2,3,12],learn:[0,1,2,11,13,14,15,16,22],least:[5,6,22],lectur:22,level:10,librari:[16,22],likelihood:7,limit:[1,13,19],linear:[0,8,13,17,22],link:[5,11,18,21],logist:[7,22],lu:17,machin:[0,8,13,16,22],mai:22,main:19,make:[0,9,10,15,22],mani:[10,12],mass:22,materi:[18,22],math:5,mathemat:[3,5,8],matric:[5,17,22],matrix:[1,5,11,12,17,22],matter:[0,22],mean:[0,22],meet:[5,10,19,22],mercer:8,mersenn:[],method:[6,9,10,13],minim:22,ml:22,mlp:12,mnist:[3,4],model:[0,1,4,6,12,22],moment:[],momentum:13,moon:[8,9],more:[3,6,17,22],multilay:12,multipl:[1,3],multipli:8,name:[],need:22,network:[1,2,3,4,7,12,22],neural:[1,2,3,4,7,12,22],non:8,normal:[0,1],norwai:[],notat:12,novemb:[],now:[1,9,13],nuclear:[0,22],nueral:[],numba:22,number:[0,2,19],numer:[2,19],numpi:[17,22],object:3,observ:[],obtain:11,octob:[],od:2,off:6,ol:[5,6],one:[2,12],oper:17,optim:[1,8,13,16,22],order:13,ordinari:[5,6,22],organ:[0,22],oslo:21,other:[4,9,11,12,17,22],our:[0,4,5,11,13,22],outcom:[16,22],output:2,overarch:[0,4,8,9,22],overview:[10,22],own:[0,10,11,15,22],packag:[17,22],panda:22,paramet:22,part:[13,16],partial:2,pass:1,pca:11,pdf:19,perceptron:12,perform:[1,9],period:3,perspect:1,point:4,poisson:2,polynomi:3,popul:2,practic:[13,20,22],pre:[1,3],predict:4,prerequisit:[3,16,22],princip:11,principl:3,pro:9,probabl:[5,19],problem:[1,2,13,22],procedur:[9,22],process:[1,3],program:[2,13],project:[6,22],prop:13,propag:[1,12],properti:[5,19],pseudo:[],python:[0,9,15,16,17,22],quick:8,r:22,ran0:[],random:[10,11,19],read:[9,22],real:[6,22],recip:[],recommend:22,recurr:[4,12],reduc:0,reduct:3,reformul:2,regress:[0,5,6,7,9,10,13,22],regular:1,relev:21,relu:1,remark:3,remind:[6,8,22],replac:13,requir:[2,16],resampl:6,rescal:6,resourc:2,revisit:13,rewrit:22,ridg:[0,5,6],rm:13,rng:[],rule:12,s:[8,10],same:13,sampl:11,schedul:[18,22],schemat:9,scheme:2,scienc:22,scikit:[0,1,11,15,22],second:13,select:[],semest:20,septemb:[],set:[0,2,3,9,12,15,22],sgd:13,should:1,similar:13,simpl:[0,4,9,13,22],singl:10,singular:[5,11],situat:[],soft:8,softmax:1,softwar:22,solv:2,solver:13,some:[13,17,22],specifi:2,split:[0,15,22],squar:[0,5,6,10,22],standard:13,state:[0,22],statement:22,statist:[5,6,16,19,22],steepest:[10,13],stk3155:[],stochast:[13,19],strongli:22,suggest:22,summari:[20,22],superposit:3,supervis:1,support:8,svd:5,systemat:3,teach:[18,20],teacher:[20,22],techniqu:[6,11],technolog:16,tensorflow:[1,3],tent:22,test:[0,1,15,22],textbook:[21,22],thei:22,theorem:[5,8,11,12,19],theori:19,thi:22,three:[],tip:13,togeth:12,tool:22,top:1,topic:22,toss:[],toward:11,trade:6,tradeoff:6,train:[0,1,4,15,22],transform:3,tree:[9,10],tune:1,two:[3,8,16],type:[2,4,12,22],uio:22,uncorrel:[],uniform:[],univers:[12,21],unsupervis:14,up:[0,2,9,12,15,22],us:[0,1,2,3,7,13,16,22],valid:6,valu:[5,11,19],variabl:19,varianc:6,variou:[0,15,22],vector:[8,12,17,22],view:[0,4,10],visual:[1,9],vs:3,wai:9,wave:2,we:22,week:[15,22],weekli:18,what:[0,22],which:1,why:22,wisconsin:7,write:[4,11],xgboost:10,you:22,your:[0,10,15,22]}}) \ No newline at end of file +Search.setIndex({docnames:["chapter1","chapter10","chapter11","chapter12","chapter13","chapter2","chapter3","chapter4","chapter5","chapter6","chapter7","chapter8","chapter9","chapteroptimization","clustering","exercisesweek34","exercisesweek35","intro","linalg","schedule","statistics","teachers","textbooks","week34","week35"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":4,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":3,"sphinx.domains.rst":2,"sphinx.domains.std":2,"sphinx.ext.intersphinx":1,sphinx:56},filenames:["chapter1.ipynb","chapter10.ipynb","chapter11.ipynb","chapter12.ipynb","chapter13.ipynb","chapter2.ipynb","chapter3.ipynb","chapter4.ipynb","chapter5.ipynb","chapter6.ipynb","chapter7.ipynb","chapter8.ipynb","chapter9.ipynb","chapteroptimization.ipynb","clustering.ipynb","exercisesweek34.ipynb","exercisesweek35.ipynb","intro.md","linalg.ipynb","schedule.md","statistics.ipynb","teachers.md","textbooks.md","week34.ipynb","week35.ipynb"],objects:{},objnames:{},objtypes:{},terms:{"0":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,18,20,21,23,24],"00":[0,1,5,6,11,23,24],"000":[1,3],"0000":[],"00000":11,"000000":[5,11,23],"00000000e":5,"000054":23,"0000e":[],"0001":1,"00010403373827253124":9,"000148":[],"00019998":5,"00024087":5,"00028369228101198006":[],"00029012":5,"0003043256065368937":[],"0003153514830957865":6,"00031535148309580783":6,"0003153514830958081":[],"0003153514830958126":[],"0003153514830958235":[],"00034944":5,"000417932":2,"00042089":5,"000464088":2,"00050694":5,"00058016":6,"000599":[],"00060705":6,"00060708":[],"00061058":5,"00062582":[],"00062595":6,"00066668":6,"00068734":6,"00068941":[],"00068946":6,"00069103":[],"00073541":5,"000755":11,"00075534":11,"00076495":6,"00076905":6,"00076919":[],"00076925":[],"0007698473260556325":6,"0007698473260556334":[],"0007698473260556339":[],"0007698473260556344":6,"00079123":[],"00079129":6,"00079130":[],"00079968":5,"00084705":6,"00084711":[],"00085883":[],"00085884":[],"00085889":6,"00087697":6,"00088573":5,"00092645":[],"00092646":[],"00092647":6,"00096314":5,"001":[1,2,8,13],"00100519":6,"0010479245355337968":[],"0010479245887943952":[],"0010479245926411787":6,"00105081":6,"00106677":5,"00107405":6,"00111756":6,"0011526":6,"00115999":5,"0011828302640124":[],"00118504":[],"00118508":6,"00118527":[],"001263":[],"00128479":5,"001323":6,"00137818":6,"00137823":[],"00137835":[],"00139705":5,"00149311":6,"00149956":6,"00152117":6,"00152188":18,"00154733":5,"00156376":6,"00156379":[],"00156382":[],"00168251":5,"00174276":6,"00175331":6,"00186347":5,"001880":5,"001988":[],"00198806":[],"00200":8,"00202624":5,"00202756":6,"00217499":6,"00224413":5,"00228741":[],"00228742":6,"00233155":[],"0023548":6,"002381316302584885":[],"002381316302584886":6,"0023813163025848865":6,"00242999":6,"00243186":6,"0024401":5,"00249435":6,"002526":[],"00266858":2,"00270244":5,"00274989":6,"00275135":[],"00289724":6,"00293838":5,"002948":[],"0030828":[],"003083":[],"003100":23,"00310113":2,"00312361":6,"00315593":6,"003215318065760509":[],"0032153180657605116":6,"0032153180657605125":[],"00323332":6,"0032542":5,"003301":6,"0033955154592040923":6,"003395515459204093":[],"0033955154592040944":[],"00353823":5,"00355118":18,"003620":23,"0036237":6,"0036367":6,"00369758":6,"003704":[],"003717":[],"003759":[],"003774":[],"003788":[],"0038335":6,"00390021":[],"003909404072811217":[],"003909404072811221":6,"003909404072811231":[],"00391839":5,"0039987":6,"004":5,"004091940707753925":6,"004091940707753948":[],"0040919407077539514":[],"00410387":6,"00410478":6,"004113634617443116":[],"0041136346174431284":[],"004113634617443131":6,"004113634617443135":[],"004113634617443139":6,"00411363461744314":6,"004113634617443141":[],"004113634617443147":6,"0041559863458613296":6,"004155986345861364":[],"004155986345861374":[],"00415763":[],"00424909":2,"00424967":6,"00426027":5,"00433417":11,"00440346":6,"00443743":6,"00445655":11,"004579219539673834":6,"004579219539673836":[],"00458878":6,"004610275230656182":6,"004610275230656187":[],"004610275230656294":[],"00462287":6,"00471782":5,"00472199":6,"00472512":6,"0049544":6,"004999999999999984":[],"00499999999999999":[],"004999999999999994":[],"004999999999999996":[],"005":[],"0050000000000000044":0,"005000000000000011":[],"00512927":5,"00517114":6,"00526348":6,"0053018":6,"00554552":6,"00556826":6,"0056799":5,"00577441":[],"00579953":6,"00588657":6,"00607783":6,"006162":6,"00617499":5,"00625843":23,"00630331":6,"00642221":6,"00660427":6,"00672607":6,"00673393":[],"00673407":6,"00676387":6,"0068011":6,"00683748":5,"00683964":6,"007012403613997257":[],"007024126888936694":[],"007024126888938144":6,"0070241268889382116":[],"00708794":23,"00719176":6,"00727646693":[0,23],"007315":23,"007334080205654388":23,"0074331":5,"00751823":[],"00759119":6,"00784393":6,"00803064":6,"0080866254785146":[],"00813803":6,"00817631":6,"00823002":5,"00827728":6,"00831018":6,"00834567":6,"00848904":6,"0086649156":[0,23],"008675369724975977":5,"008675369724976501":[],"008818897251043893":20,"00894639":5,"00905423":6,"009163470508352211":[],"009163470508352218":5,"009164545680330616":6,"00917248":6,"00934499":6,"009450756365829578":[],"0096208":6,"00990475":5,"00992331":6,"00996754":6,"009981":[],"00998135":[],"00it":[],"01":[0,1,2,5,6,9,11,13,22,23,24],"010018312644139205":[],"010018312644139219":6,"010018312644139347":[],"0100706":6,"01023891":[],"010239":[],"010331721306655144":[],"01033172130665515":[],"010331721306655165":6,"010516485576646504":6,"010516485576646513":[],"010516485576652856":[],"010530":[],"01053024":[],"01066519":6,"01076611":5,"010902":23,"0110":20,"0110407067093945":[],"01104071":[],"011076219011339788":[],"01107621901137465":[],"01107621901137467":6,"011225":2,"0113104":6,"01179792":6,"01191824":5,"01199624e":[],"012073649439965807":[],"012073649469946107":6,"012073649472576395":[],"01212754811385597":[],"01219292":6,"01223198":6,"01231917":6,"01257962":[],"012580":[],"012633802944855959":[],"01290947":6,"01295356":5,"013121573975499602":[],"013121573975499604":[],"01312157406137079":[],"013121574061370796":[],"013121574062587286":6,"01318643":6,"01347916":6,"01348565":6,"01367553":6,"01397146":6,"01405935":6,"01416528":6,"014209325470380275":[],"01433809":5,"014436800088896274":[],"014436800088896381":6,"014436800088969727":[],"01449782":6,"01458337":6,"014599964106338128":9,"0146081":6,"01463049":6,"01479194":23,"015072388895177088":[],"0150723888951771":6,"015072388895177109":[],"015072388895177157":6,"015072388895177239":[],"01509543":[],"01530715721129232":[],"01531845":6,"01538461538462":[],"01549377":6,"01551946":23,"01558197":5,"01591355407242949":[],"016285782696017055":[],"016285782696017142":6,"016285782696075054":[],"01633913":6,"01640891":6,"01655318":6,"016587414993037307":[],"016587414993045335":6,"016587414993045405":[],"01691985":6,"0169643":5,"01708781":6,"01708852":6,"01713366":6,"01724499":5,"01735584819559184":[],"017355848195591845":[],"01735584819559331":6,"017355848195593312":6,"017355848195593354":[],"01756972":[],"017665":5,"01799917e":[],"01817152":[],"018232":23,"01831036e":[],"01831130e":[],"01831200e":[],"01831207e":6,"01831251e":6,"01840062":13,"01852793":23,"01866537":6,"01869785e":[],"01873344":11,"01873869":5,"01898855":6,"01905883":6,"01908936":6,"019587":[],"01963611":6,"01969145":6,"01975416527168255":6,"019754165271682844":[],"01975416527179247":[],"01975848":6,"02":[0,4,6,7,12,23],"0202458":[],"020246":[],"02024962":6,"02054837e":6,"02068067":6,"02073509":5,"0209518407597062":[],"02098261":6,"02123176":6,"021250026482402":[],"02159270458799264":[],"021592704587992645":[],"021592704588021164":[],"021592704588021167":[],"021592704588021174":6,"021592704588021178":6,"02198702e":6,"02198703e":6,"022022882954618364":[],"022075":[],"02207532":[],"02208512":6,"02228115":6,"02229529":6,"02252765":5,"022556":[],"02255619":[],"02299949826036602":[],"022999498260366198":6,"0229994982603662":[],"02348765":6,"02354476":[],"023545":[],"02365049":6,"024023115996453476":[],"02408959":[],"0245528":6,"02492265":5,"02493054":[],"02498832":6,"02503753":6,"02511518":6,"02522069":6,"025709":11,"02586427":6,"0260906":6,"02625193":8,"02625928":[],"026408391362671896":[],"02642055e":[],"026605727637176654":[],"026605727637184554":6,"026605727637184558":6,"02660572763718461":[],"026605727637184613":[],"02697521163514974":[],"026986":[],"02698605":[],"02707227":5,"02723445":6,"027609773491022314":[],"02760977349102238":6,"027609773491022387":[],"027609773491022394":6,"027609773491022407":[],"02762405215108776":[],"02786488":[],"027865":[],"02857":4,"02917662":[],"029177":[],"02926396":[],"029483":5,"029613363972682966":[],"029733":23,"02976145":6,"02994311":5,"02f":6,"02it":[],"03":[1,6],"03032441e":6,"030407120354722424":[],"03056589":[],"030566":[],"030693":[],"03069324":[],"03071040e":[],"03076923076924":[],"03077640549":4,"03099776":5,"031":5,"03168642":20,"031846":[],"03184647":[],"03187339273559067":[],"03196357":6,"03251863":5,"03256632e":1,"03267527":6,"03278964":[],"032790":[],"03279636":6,"0330308045180234":[],"0330308045183163":[],"0330308045183219":6,"0330308045188872":6,"0330308045190182":[],"03308408":5,"03324117":23,"03326365":[],"033264":[],"033657685071527485":[],"033657685071527624":[],"03365768507152769":6,"03382304823545749":[],"034047":23,"03447512":6,"03523311":[],"03562355":6,"03568439":6,"03570747":[],"0358909447132981":[],"035909":23,"0359565":5,"03630548":6,"03707133":11,"037559":[],"03755944":[],"03761519":[],"03781367141738885":[],"03781367141738886":[],"037813671417388985":[],"03781367141738899":[],"03781367141738902":6,"03794112":[],"03807267":5,"038073":5,"03814292":6,"03815288":6,"038300":11,"03850557":[],"038506":[],"039039":5,"03981057":[],"0399676689527966":6,"0399676689527968":[],"0399676689527975":6,"04":[1,6,11],"040102":5,"04010697":6,"04063602":6,"041":[],"041148729430502":[],"041148729430523":6,"0411487294305246":[],"0411487294305746":[],"041148729430595":6,"04179719":[],"041797190646905":[],"04220758":6,"042708":[],"04279651270127165":[],"04284519":[],"043":[],"04315108":5,"0433816":[],"04346721":5,"04355837":6,"04362":[],"04368707":[],"0437499":2,"04389027":6,"043927769551648":[],"04413933503955871":[],"04423486":6,"044334":23,"0444119":[],"044613":6,"04483457":[],"04496448":23,"04537385":6,"04543942":6,"045603":[],"04566964":6,"0458":9,"04615384615386":[],"04621521":[],"04648335":5,"046491":[],"04649105":[],"0466":[],"04673082":11,"046731":11,"046785461905835435":11,"04683565":5,"047737":[],"04775904":[],"04784395":6,"04785727":[],"047953":[],"04818727730430286":6,"04818727730430296":[],"048187277304303056":[],"048653428302840175":[],"048762":[],"048818":[],"048920":23,"04892055":6,"04909093":6,"04912436":6,"04930820e":[],"049318":5,"049462":23,"0495569966278238":[],"0495569966278269":6,"0495569966278295":6,"0495569966278315":[],"049747":[],"049858":[],"049960":[],"04996008":[],"04it":[],"05":[1,4,6,13],"05009826":6,"05087958":[],"050910":[],"05100875":6,"051043":[],"051391":[],"051418":5,"051451":[],"051649":11,"051662":[],"0517473":5,"052206":[],"052227":5,"05227921801205679":6,"05227921801205691":[],"05227921801205692":[],"052279218012057004":[],"052330":[],"052372":[],"05255759":[],"052581":5,"05263":[],"05268304":18,"05290417684691035":[],"05302":[],"0536097":18,"05364854":8,"05367466":20,"053678":[],"05383795":6,"053849":5,"054182":[],"054305":[],"054335":[],"054340":5,"05434571":[],"054411":[],"05447415":6,"054491":[],"054582":[],"054585":[],"054650":[],"054774":[],"054785":[],"05483267":5,"05491655":23,"054963":[],"05505310046362":[],"05505310046363":2,"055137":[],"055153":[],"055302":[],"055320":[],"05533":[],"055337":5,"055344":[],"055369":5,"055676":23,"055684":[],"055859":[],"055958":[],"056127":5,"056131":5,"05614483":5,"056165":[],"056169":[],"05622775":23,"05623":[],"056233":[],"056235":[],"056468":[],"05648":[],"05651951":6,"056528":[],"05667":[],"057088709963182":[],"057163681553428394":[],"05716368155342902":6,"05716368155351588":[],"0572":[],"057469":[],"05756733":[],"057587":[],"057588":5,"057648":5,"057686":5,"05785343":6,"057877":[],"05789007":6,"057899":[],"05796251":6,"058033":[],"058035":[],"058038":[],"058040":[],"058058":[],"05807125":6,"058088":[],"05833369":23,"058343":5,"05834332":5,"058416":[],"05850532":18,"058585":[],"058596":[],"058663":5,"058715":[],"058732":5,"058740":[],"058816":[],"05883":[],"05884":[],"058890":[],"058948":[],"058955":[],"058957":[],"058974":[],"059013":[],"059180":[],"059272":[],"059278":[],"059294":[],"059378":[],"059437":[],"059601":[],"059783":[],"059795":[],"059824":[],"059933":[],"059952":5,"05999":[],"06":6,"060016":[],"060048":5,"060080":[],"060146":[],"060183":[],"06020587":6,"06021285":[],"060213":[],"060228":[],"060288":[],"060309":[],"060349":23,"06043581":6,"060502":[],"060507":[],"060550":[],"060649":[],"060655":[],"060781":[],"060841":[],"060863":5,"060875":[],"060963":[],"061025":[],"061028":[],"061048":[],"061054":5,"061133":5,"061144":[],"061149":[],"061188":[],"061209":5,"061272":5,"061297":[],"061308":[],"061321":[],"061359":5,"061390":[],"06150169":5,"061502":5,"061505":[],"061509":[],"061538":[],"061604":[],"06160438":[],"061646":[],"061679":23,"061685":[],"061701":[],"061716":[],"061725":[],"061745":[],"061765":[],"061821":[],"061898":[],"061917":[],"061923":[],"061966":5,"06200174":5,"062061":[],"062062":[],"062064":[],"06208238634231944":[],"062082386342319454":6,"06208238634231953":[],"062089":[],"062097":[],"062136":[],"062142":[],"062195":[],"062220":5,"062292565":4,"062294":[],"062305":[],"062333":5,"062370":5,"062391":[],"062409":[],"062411":[],"062435":[],"062451":[],"062498":[],"062517":[],"062534":[],"062551":[],"062563":[],"062640":[],"062665":[],"062676":[],"062706":[],"062719":11,"062773":[],"062777":[],"062827":[],"062834":[],"062874":[],"062881":[],"062884":[],"062888":[],"062983":[],"063014":[],"063024":[],"063052":[],"063078":[],"063084":11,"063125":[],"063173":[],"063192":[],"06319374":18,"063241":[],"063250":[],"063287":[],"063343":[],"063364":[],"063371":[],"063375":[],"063401":[],"063443":23,"063493":[],"063513":[],"063524":11,"063612":[],"063619":[],"063631":[],"063657":[],"063724":23,"063752":[],"063781":[],"063851":[],"063857":[],"063872":[],"063874":[],"06388888888888888":[],"063977":[],"063979":[],"064041":11,"064052":[],"064062":[],"064081":5,"064108":[],"064110":[],"064184":[],"064274":[],"064284":5,"064329":[],"064384":[],"064388":[],"064431":[],"06444":[],"064442":[],"064459":[],"064461":[],"064469":[],"064483":[],"06453579006728315":[],"06453579006728322":6,"064538":[],"064573":[],"064604":[],"064609":[],"064618":[],"064623":[],"064634":[],"064637":11,"064648":[],"064658":[],"064681":[],"064684":5,"064753":5,"064787":[],"064823":5,"064838":[],"064859":[],"064880":[],"064896":[],"06491736":6,"064918":[],"064931":[],"064937":[],"064964":[],"06497046":[],"064974":5,"065020":[],"065026":23,"065032":[],"065095":5,"065106":[],"065110":[],"065118":5,"065165":5,"065168":[],"065183":[],"065228":[],"065249":[],"065252":[],"065282":[],"065314":[],"065348":[],"065349":5,"06547790180152352":6,"06547790180152353":[],"06547790180152355":6,"06547790180152357":[],"06547790180152363":[],"065514":[],"065537":[],"065557":[],"065575":[],"065641":[],"065657":[],"065680":[],"065730":[],"065761":[],"065796":[],"065826":[],"065846":[],"065869":[],"065892":[],"065942":[],"065973":5,"065974":[],"065983":[],"06602663":[],"066051":[],"066056":[],"066064":[],"066093":[],"066110":[],"066189":5,"066194":[],"066220":[],"066223":[],"066228":[],"066241":[],"066270":5,"066284":5,"066309":[],"066340":[],"066348":[],"066356":[],"06637":[],"066388":[],"066449":[],"066528":[],"066553":[],"066558":[],"066569":5,"066580":[],"066590":[],"066609":[],"06662062":23,"066651":[],"066654":[],"066670":[],"066675":[],"0666807":2,"066714":[],"066729":[],"066741":[],"066753":[],"066789":[],"066808":[],"066828":[],"066837":11,"066850":[],"066870":[],"066873":[],"066919":[],"066934":[],"06695337":18,"066954":[],"067011":[],"067079":[],"067110":[],"067141":[],"067162":[],"067191":[],"067213":[],"067236":[],"067240":[],"06724062":5,"067282":[],"067392":[],"067402":[],"067432":[],"067437":[],"067443":[],"067449":[],"067484":[],"067499":[],"067506":[],"067525":[],"067527":[],"067544":[],"067547":[],"067560":[],"067585":[],"067597":[],"067599":[],"067612":[],"067615":[],"067620":[],"067622":[],"067675":[],"067693":[],"067709":[],"067710":[],"067712":[],"067714":[],"067719":11,"067720":[],"067723":[],"067767":[],"067769":[],"067775":[],"067787":[],"067854":[],"067856":[],"067864":[],"06786925114666595":[],"067907":[],"067908":[],"067934":[],"067956":[],"068019":[],"068059":[],"068075":[],"068087":[],"068093":[],"068094":[],"068098":[],"068103":[],"068104":[],"068110":[],"068120":[],"068136":[],"068197":[],"068210":[],"068261":[],"068318":[],"068345":[],"068358":[],"068363":[],"068376":[],"068391":[],"068417":[],"06844519414009438":[],"06844519414009442":[],"06844519414009444":6,"06844519414009445":6,"068461":[],"068500":[],"068505":[],"068525":11,"068538":[],"068541":5,"068573":[],"06858699":[],"068593":[],"068608":[],"068619":[],"068642":[],"068654":[],"068659":[],"068664":[],"068689":[],"068724":[],"068735":[],"068776":5,"068799":11,"068806":[],"068809":[],"068831":[],"068841":5,"068852":[],"068867":5,"068920":[],"068937":[],"068953":[],"068965":[],"068991":[],"068992":[],"068999":5,"069010":[],"069015":[],"069036":[],"069044":[],"069065":[],"069085":[],"069091":[],"069181":[],"069187":5,"069202":5,"069231":[],"069242":5,"069268":5,"069275":[],"069276":[],"069281":[],"069285":[],"069355":11,"069386":[],"069408":[],"069409":[],"069421":[],"06942103":[],"069436":[],"069441":[],"069454":[],"069455":[],"069465":11,"069475":11,"069476":[],"069494":[],"069506":5,"069534":[],"069578":[],"069584":23,"069626":[],"069640":5,"069651":[],"069654":[],"069667":[],"069672":[],"069681":[],"069685":[],"06969872":18,"069748":[],"069754":[],"069796":[],"069801":[],"069838":[],"069847":[],"069877":[],"069884":[],"069888":[],"069903":[],"069907":[],"069912":[],"069977":[],"06it":[],"07":6,"070018":[],"070028":[],"070034":[],"070043":23,"070056":[],"070071":[],"070074":[],"070105":[],"070150":[],"07016":[],"070163":[],"07017":[],"070216":[5,11],"070222":11,"070276":[],"070288":[],"070333":5,"070339":[],"070343":[],"070370":[],"070379":[],"07039":[],"070419":[],"070428":11,"070429":[],"070443":[],"070450":5,"070453":[],"070466":[],"070491":[],"070492":[],"070494":5,"070518":[],"070562":[],"070576":[],"070585":[],"070612":[],"070618":[],"07062318":6,"070630":[],"070635":[],"070775":[],"070810":11,"070835":[],"070860":[],"070871":[],"070874":[],"070887":[],"070889":11,"070911":[],"070945":5,"070950":[],"070959":[],"070961":[],"070972":[],"07099747918547346":[],"071003":[],"071009":[],"071022":[],"071044":11,"071086":[],"071106":[],"071112":[],"071115":11,"071120":[],"071136":[],"07115":[],"071239":[],"071243":[],"07129539":[],"0712953943627344":[],"0713":[0,23],"071326":[],"071329":11,"071387":[],"071388":[],"071394":5,"071421":11,"071441":[],"071445":[],"07145103":11,"071460":[],"071467":[],"071476":[],"071480":[],"0714956":[],"071505":[],"071510":[],"071515":[],"071523":11,"071529":[],"071547":[],"071552":[],"071569":[],"071585":11,"07160048164232467":[],"07160048164232538":6,"0716004816423254":6,"07160048164248561":[],"071604":[],"071614":[],"071632":[],"071641":[],"071666":[],"071698":[],"071705":[],"071741":[],"071767":[],"071804":[],"071836":[],"071852":[],"071897":11,"071901":[],"071906":[],"071908":[],"071920625289855":5,"071921":[],"071922":[],"071935":[],"071946":11,"071949":[],"071991":[],"072008":[],"072011":[],"07201957":[],"072021":[],"072041":[],"072084":[],"072091":[],"07212695":[],"072127":[],"072145":[],"072147":[],"072150":5,"072184":[],"072198":[],"072216":[],"072222":[],"072240":[],"072242":[],"072290":[],"072342":[],"072348":[],"072352":[],"072361":[],"072364":11,"072370":[],"072435":[],"072442":[],"072452":11,"072471":[],"072483":[],"072492":[],"072521":[],"072523":[],"072529":[],"072530":11,"072554":[],"072558":[],"072569":[],"072575":[],"072597":[],"072598":[],"072611":[],"072617":[],"072620":[],"072647":11,"072651":[],"072652":[],"072750":[],"072751":[],"072783":11,"072798":[],"072813":11,"072824":[],"072828":[],"072839":[],"07285":3,"0728785":[],"072898":[],"07291729":[],"072918":[],"072928":[],"072955":[],"072958":[],"072970":[],"072974":[],"072994":[],"073013":[],"073016":[],"073045":[],"073052":[],"073062":[],"073080":[],"073105":[],"073120":[],"073134":[],"073136":[],"073159":5,"073183":11,"07319349":18,"073206":[],"073225":[],"073230":[],"073238":[],"073280":[],"073299":5,"073303":[],"073320":[],"073362":[],"073368":[],"073369":[],"07337358":5,"073374":5,"073380":[],"073391":[],"073400":[],"073423":[],"073433":11,"073436":[],"073449":[],"07345504":[],"073489":[],"073506":[],"073531":[],"073548":[],"073567":5,"073575":[],"073583":[],"073597":[],"073598":11,"073601":[],"073629":[],"073647":[],"073657":5,"073668":[],"073695":[],"073699":[],"073716":5,"073719":[],"073750":5,"073761":[],"073768":11,"073777":[],"073810":[],"073811":11,"073816":[],"073827":[],"073831":5,"073904":11,"073907":[],"073925":5,"073938":[],"073949":[],"073959":[],"074006":[],"074019":11,"074034":[],"074050":11,"074067":11,"074111":[],"07413172":[],"074144":11,"074149":[],"074183":5,"07421084":5,"074237":[],"074258":5,"074276":[],"074336":[],"074346":[],"074375":[],"074401":[],"074418":[],"074420":[],"074480":[],"074488":[],"074513":[],"074530":[],"074552":[],"07456491":5,"074569":[],"074573":[],"074592":[],"074666":[],"074684":[],"074693":[],"074708":[],"074715":[],"074729":5,"074743":[],"074760":11,"074763":[],"074773":[],"074833":[],"074838":[],"074839":[],"074845":[],"074881":[],"074905":[],"07490892":6,"074922":11,"074945":[],"074969":11,"074980":[],"074984":5,"074986":[],"074992":[],"075012":[],"075017":[],"075020":5,"075028":5,"075043":[],"075058":[],"075061":[],"075102":11,"075136":[],"075138":[],"075145":11,"075149":[],"075181":[],"075188":[],"075192":[],"075195":[],"075201":11,"075222":11,"075227":5,"075228":[],"075241":[],"075262":[],"075302":[],"07532297":20,"075335":[],"075356":[],"07535606":[],"075389":[],"075433":[],"075498":[],"075573":[],"075586":[],"075594":[],"075612":11,"075618":[],"075629":[],"075728":[],"075760":[],"075770":11,"075797":11,"075820":[],"075840":[],"075899":[],"075959":[],"075982":5,"075987":11,"076022":[],"076055":[],"076066":[],"076079":[],"07608141":13,"076096":[],"076097":[],"076121":[],"076130":[],"076173":[],"076204":[],"076216":[],"076248":[],"076264":[],"076270":[],"076282":[],"076306":11,"076315":[],"076329":[],"076338":[],"076349":[],"076389":[],"0764924":6,"076518":11,"076525":[],"076532":[],"07656896":[],"076588":[],"076589":[],"076604":[],"076619":5,"076628":[],"076632":11,"076637":[],"076665":[],"076697":[],"076726":[],"076729":[],"076760":[],"07678":[],"076780":[],"076783":[],"076795":[],"076804":[],"076821":[],"076843":[],"076862":[],"076866":[],"076886":11,"076895":[],"076905":[],"076927":11,"076938":11,"076942":[],"076955":[],"076958":[],"076990":[],"077003":[],"077009":[],"077013":[],"077015":[],"077022":[],"077033":11,"077062":[],"077083":[],"077108":[],"077131":[],"077140":[],"077144":[],"077158":[],"077164":[],"077200":[],"077203":11,"077211":[],"077219":[],"077228":[],"077291":[],"077338":[],"077349":[],"07735703":[],"077359":[],"077372":11,"077375":[],"077402":[],"077419":[],"077425":[],"077428":5,"077452":[],"077467":[],"077499":[],"077511":11,"077607":[],"077620":[],"077644":[],"077706":[],"077711":[],"077724":[],"07777777777777778":1,"077785":[],"077793":[],"077822":[],"077846":11,"077921":[],"077930":11,"077948":[],"077978":[],"077986":[],"078040":[],"078042":[],"078082":5,"078101":[],"078143":[],"078157":[],"078158":5,"078167":[],"0782":[],"07820":[],"078211":11,"078253":[],"078254":[],"078269":[],"078299":[],"078300":11,"078314":11,"078323":11,"078432":[],"078436":[],"07844310540708652":[],"078484":5,"078508":[],"078542":[],"078548":[],"07858099596662704":5,"078587":5,"078609":[],"07864":[],"078646":[],"078651":[],"078667":[],"078672":[],"078697":[],"078704":[],"078707":5,"07871":[],"078710":[],"078719":[],"078725":[],"078749":[],"078768":11,"078771":[],"078776":[],"07878641":[],"078795":[],"078812":[],"078845":[],"078860":[],"078899":[],"078908":[],"078911":[],"078942":[],"078962":[],"07897647347778382":[],"07898165660100093":[],"078992":[],"078999":[],"079001":11,"079021":5,"07903849":[],"079056":[],"079110":[],"079142":[],"079157":[],"079158":[],"079179":[],"079214":[],"079218":11,"079224":5,"079225":[],"079242":[],"079260":[],"079264":[],"079268":[],"079273":[],"079278":[],"079281":[],"079306":11,"079347":[],"079383":11,"079389":[],"079405":[],"079406":[],"079424":[],"079438":[],"07944154":[18,23],"079443":[],"079447":[],"079476":11,"079483":[],"079486":[],"079489":[],"079493":[],"079495":[],"0795449":[],"079553":[],"079558":[],"079609":[],"079618":11,"079622":11,"079631":[],"079676":[],"07968918676726029":[],"0796891867672603":6,"079719":[],"079729":[],"079741":[],"079819":[],"079823":[],"079839":[],"079847":[],"079882":[],"079893":[],"07989327":[],"079901":[],"079944":5,"079948":5,"079991":[],"07999999999998":[],"07e":[],"08":20,"080026":11,"080056":[],"080061":5,"080106":[],"080120":5,"080137":[],"080200":[],"080256":[],"080288":[],"080297":[],"080312":[],"080319":[],"080332":[],"080334":[],"080343":11,"080347":[],"080370":[],"080406":[],"080407":[],"080410":[],"08041015":[],"08043851":5,"080455":[],"080479":[],"080502":[],"080517":[],"080555":[],"080571":11,"080582":[],"080588":[],"080593":[],"080630":[],"080642":11,"080647":[],"080699":11,"080706":[],"080738":[],"080764":11,"080801":[],"080821":[],"080847":[],"08085812":[],"080916":[],"080922":[],"080973":[],"080984":[],"080998":11,"081022":11,"081046":[],"081072":[],"081140":[],"081144":[],"081163":[],"081198":[],"081211":[],"081216":11,"081233":[],"081253":[],"081262":[],"08131003":6,"081311":[],"081321":[],"081334":[],"081343":[],"081357":[],"081388":[],"081396":[],"081431":[],"081468":[],"081483":[],"081503":[],"081520":[],"081533":[],"081540":[],"081547":[],"08156108":6,"081576":[],"081613":[],"081637":[],"081707":[],"081773":[],"081832":[],"081837":[],"081848":[],"08188077":[],"081881":[],"081932":[],"081953":[],"081989":11,"081990":11,"082014":[],"082027":[],"082122":[],"082140":5,"082174":[],"082183":[],"082189":[],"082204":[],"082267":[],"082282":5,"082286":[],"082288":[],"082295":[],"0823185":[],"082339":11,"082424":[],"082426":[],"082431":11,"082451":[],"082503":[],"08251519":6,"082536":[],"082620":[],"082642":11,"082683":[],"08271198519070039":11,"082716":[],"082786":[],"082846":[],"082852":[],"082874":[],"082875":23,"082896":[],"082900":[],"082921":[],"082939":[],"082990":[],"08299273e":6,"083000":[],"083015":[],"083021":11,"083026":[],"083053":[],"083087":[],"083102":5,"083151":[],"083152":[],"08318298e":1,"083217":[],"083220":[],"08322642264994606":[],"083227":[],"083242":[],"083251":[],"083272":[],"083276":[],"08328216846752691":[],"083300":[],"083320":[],"08333333333333333":1,"083361":[],"08336233266":4,"083380":5,"083399":[],"083404":[],"083417":[],"08343519179767796":[],"083441":[],"083495":[],"083506":[],"083527":23,"08352721390288316":23,"08356774001062162":[],"083573":[],"083579":[],"083600":[],"083629":11,"08363087":23,"083648":[],"083681":[],"083692":[],"083694":[],"08376632":6,"083766322923899":6,"0837663229239016":[],"0837663229239025":[],"0837663229239043":6,"083779":5,"083799":[],"083829":[],"083832":[],"083849":[],"083899":[],"083913":[],"083935":[],"083977":[],"084000":[],"084006":[],"084008":[],"084017":[],"084018":[],"084019":[],"084024":[],"084032":[],"084086":5,"084092":[],"084096":[],"084101":[],"084107":5,"084147":[],"084151":[],"084184":[],"084223":[],"084224":[],"084226":[],"08426840630693411":[],"08426840630693412":6,"08426840630693413":6,"084269":11,"084277":[],"084278":[],"08428156":[],"084282":[],"084286":5,"084364":[],"084391":[],"084400":[],"084408":[],"084414":[],"084426":11,"084434":[],"084444":[],"084476":[],"084477":[],"084484":[],"084523":5,"084536":[],"084549":[],"08455":[],"084570":[],"084604":[],"084629":[],"084645":[],"08464758160254343":[],"084657":[],"084670":[],"084682":[],"084683":[],"084702":[],"084728":[],"08474":[],"084777":[],"084846":[],"084862":[],"084904":[],"084909":[],"084912":[],"084920":[],"084927":11,"084936":[],"084965":[],"084979":[],"085010":11,"085018":[],"085027":[],"085044":[],"085105":[],"085113":[],"085163":[],"085165":[],"085167":[],"085184":[],"085185":[],"085224":[],"085249":[],"085264":[],"085345":[],"085361":[],"085368":[],"085405":[],"085410":11,"085416":[],"08551306":6,"085571":5,"085655":5,"085764":[],"08576932":6,"085776":[],"085879":[],"08593216":6,"085936":[],"086021":11,"086074":[],"086076":[],"086109":11,"08611111111111111":1,"086112":[],"08612280083325631":[],"086154":[],"086174":[],"086178":[],"086203":[],"086249":[],"086250":[],"086257":11,"086262":[],"086303":[],"08630331":[],"086322":[],"086409":[],"086420":[],"086518":[],"086567":[],"086608":[],"086610":[],"086665":[],"086679":[],"086705":[],"08673755293381497":[],"086802":[],"086807":[],"086809":[],"086841":[],"086872":[],"086877":[],"086888":[],"086890":[],"08690":[],"086951":[],"086956":[],"086994":[],"086997":11,"087081":[],"087208":[],"087224":[],"087235":[],"087372":[],"087387":[],"087470":11,"087501":[],"087573":[],"08758":[],"08759":[],"087615":11,"087689":[],"087833":[],"087834":[],"087887":23,"087891":[],"087894":[],"087910":[],"088029":[],"088104":11,"088119":[],"08816688":[],"088176":[],"0881981":5,"088212":[],"088261":[],"088271":[],"088460":[],"088476":[],"088519":[],"088526":[],"088560":[],"088606":[],"088611":[],"088631":[],"08871404":5,"08873443359350565":5,"088758":[],"088760":11,"088765":[],"088809":[],"088816":[],"088825":[],"088853":[],"08887708":23,"08888888888888889":1,"088926":[],"088946":[],"08902":[],"089041":[],"089059":[],"089082":5,"08917679":[],"089177":[],"08918584":20,"089206":[],"089212":[],"089233":11,"089246":[],"089306":[],"089310":11,"089329":[],"089355":[],"0893679":6,"089369":[],"089374":[],"089425":[],"089501":[],"089505":[],"089524":[],"089551":[],"089614":[],"089683":[],"0896981":[],"089758":[],"089775":[],"08996":[],"089982":11,"09":1,"090014704675496":[],"090028":[],"090039":[],"090128":[],"090174":[],"090229":[],"09023660662586945":[],"090241":5,"090268":5,"090270":[],"090337":[],"090349":[],"09034902":[],"0903549":[],"090356":[],"090358":[],"090451":[],"090503":[],"090564":5,"090630":[],"090649":[],"090694":[],"090730":[],"090755":[],"090830":[],"09083636328656121":20,"090849":[],"09085624":[],"090929":[],"091031":[],"091051":[],"091060":[],"09117221":[],"091224":[],"091236":[],"091266":[],"091311":[],"091315":[],"091340":[],"091349":[],"091363":[],"091414":[],"091416":[],"091426":[],"091440":[],"091477":[],"09149881":[],"091620":[],"091630":[],"091647":5,"09166666666666666":1,"091696":[],"0917":9,"09170751":[],"09172408":[],"09172409":6,"091891":[],"092066":[],"092126":[],"09216046":[],"092249":11,"0923":[],"092409":[],"09251":[],"09252364":[],"092524":[],"092621":[],"092769":[],"092879":[],"09297039":[],"092998":[],"093078":[],"093247":[],"0934597075922044":[],"093497":[],"093593":[],"093624":[],"0938":[],"093844":[],"093930":[],"093979":[],"094082198961999e":6,"0940821989624095e":[],"0940821989643363e":6,"094082198966615e":[],"0940821989673748e":[],"094362":[],"09440475":[],"094404754965417":[],"09444444444444444":1,"094472507965532":[],"094477":[],"094619":[],"094657":[],"094722":[],"094848":[],"094867":[],"094925":11,"095171":[],"095184":[],"095313":[],"095510":[],"095522":[],"095617":[],"095702":[],"095871":[],"095902":[],"095935":[],"09609807":5,"096173":[],"096472":[],"096516":[],"096623":[],"09672929714683368":[],"09677394":[],"096893":5,"096894":[],"097":[],"097360":[],"097396":[],"09744":[],"09744272":[],"097602":[],"097634":[],"097710":[],"09780":[],"09791":[],"098135":[],"09849763":[],"098498":[],"09856879":[],"09861229":[18,23],"098802859381565":[],"099":[],"09903804":8,"0991919894927399":[],"09919198949274803":6,"099191989493334":[],"09951287404314545":1,"099648":11,"09964817":11,"099777":[],"0n":[0,23],"0s":[],"0x11da42d90":[],"0x11db14850":[],"0x11e031e50":[],"0x11e09b370":[],"0x128ee8850":[],"0x12946f2e0":[],"0x13b240850":13,"0x13b8c72e0":13,"0x7fad10f9a280":[],"0x7fad20f69be0":[],"0x7fd098df3280":[],"0x7fd0a9063be0":[],"1":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,18,19,20,21,22],"10":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,18,19,20,21,23,24],"100":[0,1,2,3,4,5,6,7,8,9,10,11,13,14,15,16,18,20,21,23,24],"1000":[0,1,2,4,5,8,11,13,14,17,20,23,24],"10000":[2,5,6,10,11,13,20],"100000":8,"10001":10,"1001":20,"1002":20,"1003":20,"10030":[],"100303":[],"100358":[],"10044225464078282":[],"1005":20,"100670":[],"10077114273548984":6,"1009":20,"1011":20,"1013":20,"1013904243":20,"10141413e":6,"1015":20,"102":[],"1022233262115424":[],"10222333":[],"1023":20,"10230":[],"1023111":[],"1023858":20,"1024":3,"102401":[],"102449":[],"1026":20,"1027":20,"1028":[],"103":1,"1030":20,"10302062":[],"103257":[],"10340":[],"1037":20,"10378326e":1,"1038":20,"103822":[],"10391807":6,"10398646080125035":[],"10398646080125036":6,"10398646080125037":6,"1040":20,"10405456":11,"10430":[],"104411":23,"10455924":[],"1047":20,"10505137":[],"105161":[],"105169":[],"10516924":[],"10520":[],"10555555555555556":1,"1056":[],"10589577":5,"106":[],"106095":11,"10620135":[],"106431":23,"107":[],"108":6,"108359":[],"10835935":[],"109":[],"10913":6,"10931453":6,"10950766":23,"10960":[],"1096767776832326":[],"10967678":[],"10th":9,"10x":[0,23],"11":[0,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,18,19,20,21,22,23,24],"110":[],"1100":20,"1101":20,"11022302e":[],"11046771":[],"111":[1,7,12],"11100":[],"1122558214":[],"112319":[],"11231934":[],"112383":11,"1124":[],"1125":[],"11283168":[],"11297834":[],"1133":6,"1136":[],"11362930e":[],"11388888888888889":1,"1139":[],"11390":[],"114":[],"11402309":[],"114437":[],"11462415":5,"11481199":20,"11482289e":6,"11499517":[],"11507992e":1,"11547777218875695":[],"11547777218875696":[],"11547777218876518":6,"11547777218940905":[],"11547777218940906":[],"115822":6,"11590":[],"11598862":[],"11598862273198":[],"11604844":[],"116048442683864":[],"11660":[],"11666666666666667":1,"11674401539815678":[],"117":8,"117430":23,"11744554e":6,"11780":[],"11790868":[],"117986":[],"118":2,"1182":[],"1183":[],"118318":23,"1184":[],"11840":[],"1185":[],"11850274":[],"1186":[],"11890":[],"119":2,"119625":[],"11962537":[],"1199":[],"119936":2,"119999999999976":[],"11it":[],"12":[0,1,2,3,4,5,6,8,9,11,12,13,18,20,22,23,24],"120":[2,3],"1203":[],"1203284":8,"1206":8,"12069773":[],"121":[8,9,10],"12152272":18,"1215pm":[21,23],"12167821":[],"12182967":6,"12196674":[],"122":[2,8,9,10],"12222222222222222":1,"122282":23,"122439":[],"1224392":[],"12288563":[],"122886":[],"123":2,"12302855":13,"12318726e":6,"12330280229368":[],"12333649":6,"12345260617257443":[],"123459876":[],"123711":6,"12380":[],"12387751":13,"124":[0,23],"12400":[],"12434807":23,"125":[],"1250":[],"125000":[],"12539459":23,"12552073e":6,"126":[],"1261":[],"12618549":5,"12630042":18,"1265":[],"127":4,"1270":[],"127043":[],"1271":6,"1277":6,"127773":[],"12777777777777777":1,"127812":23,"12788968":[],"12790":[],"128":[3,4,13],"128664":6,"12885048":23,"12898627064868978":[],"129":2,"12934015":23,"12937662":[],"12945452":[],"1297":[],"1297300314822336":20,"1298":9,"12adb44b1c20":[],"12m":[],"12pm":[21,23],"13":[0,2,5,6,9,11,12,13,18,20,23,24],"130":[],"13003291":6,"13030182":[],"13055555555555556":1,"131":[],"13117061":[],"13131825":18,"1314":[],"132":[],"13220608e":6,"13229545716505003":[],"132360":[],"1323603":[],"1326":[],"13261136":23,"1326197715":23,"13280":[],"13288373":[],"133":7,"13320535":23,"13333333333333333":[],"135":[],"13519106":[],"13535942":6,"136":[],"1360":[],"13609760e":[],"1361":[],"1362":[],"1363":[],"1364":[],"13646574":5,"13655438":[],"13661243e":6,"13679863":6,"1371":6,"13734823":18,"13740":[],"137400784702911":[],"137652":11,"1378":[],"1382":[],"1383":[],"1384":[],"1385":[],"1386":[],"13865173":5,"13876586436927824":[],"138775":11,"1388888888888889":1,"13890":[],"1392559581788775e":[],"1392559584983597e":[],"1392559585048734e":6,"1392559591206444e":6,"13925595925919e":[],"13it":6,"14":[0,2,4,5,6,8,9,10,11,12,13,18,20,22,23,24],"140":2,"14021063":6,"1404":[],"14042769":[],"140428":[],"141":2,"14100":[],"1416398":6,"14174062":23,"14174745":6,"1418":[],"142":[],"14231548":20,"14250":[],"14252712":23,"142857":[],"14298603":20,"143":[2,7],"1435666":[],"14360598":[],"1437":1,"144":[],"14400":[],"1440501043841336":1,"14440":[],"14451625":[],"1446729567":4,"14484695":[],"144993":23,"145":2,"1457774":20,"146":2,"14617985":23,"147":[],"14710":[],"1472032":18,"14722222222222223":1,"147400":11,"14741468":[],"147420":11,"14783702":[],"1479":[],"148":[],"14812206":6,"14818":[],"1484256":[],"148564":[],"14859":6,"148768":[],"148854":6,"149":[],"149213":[],"14932651":[],"149655":6,"14988578":[],"149886":[],"14995486":[],"149955":[],"14g":6,"14it":[],"15":[0,2,4,6,7,8,9,12,13,15,16,18,20,23],"150":[4,8],"15005476":5,"150184":[],"15089627":18,"150920":11,"15092012":11,"1509778":[],"15098090e":6,"151":[],"15130074e":6,"151348":[],"151986":[],"152":[],"15200":[],"15258907":[],"152696":[],"15269628":[],"1527777777777778":1,"153036":23,"153106":[],"1533795":[],"153760":[],"15384615384616":[],"154":[],"15410688":11,"154107":11,"15442554":18,"15454301":[],"154720":[],"15483121":[],"154911":[],"155":[],"155491":[],"155687":[],"155883":[],"156":[],"1562":[],"15629539":[],"15680777":[],"156956":5,"157":[],"15717291":[],"1575":[],"158":[],"1583767":[],"15843769515580663":[],"1586300629904382":[],"1587":[],"15891336":[],"15899253":23,"159":[],"1590":[],"15990":[],"15g":6,"15it":6,"15pm":23,"16":[1,2,3,4,5,6,8,9,10,20,23],"160":[],"1603":3,"1604":[],"1605":[],"160539":[],"1606":[],"1607":[],"16111111111111112":1,"1612":[],"1614891":18,"16167387":23,"16211139":5,"16220":[],"162246":5,"16231451":4,"1625":[],"1628":[],"162999":23,"163":[],"1630775253":1,"16342407":5,"16343471":6,"16384":3,"16397496":23,"16500":[],"166":[],"16660817":[],"166667":[],"167":[],"16740002":[],"167787":5,"168":[],"168044":[],"16804444":[],"16805821e":6,"16807":[],"16827044":[],"16832385":[],"16840081":23,"16961682":[],"16b8e3cda33a":[],"17":[1,2,5,6,8,20],"17084902":[],"1709":[],"17174962e":1,"17222222222222222":1,"172405":[],"17240522":[],"1726":[],"17300":[],"1731":[],"17339342":[],"17446471":6,"1752":[],"175300":23,"17641709":6,"17647619":6,"176880142835407":[],"17709473":18,"17777777777777778":1,"17801022":5,"17826349":23,"17861098":6,"17897671":20,"17917768":5,"17930649":[],"17938393":13,"17942122":13,"17949575":5,"17953942":11,"1797":[1,3],"18":[2,6,7,8,9,10,13,20],"180":[],"18029127":5,"1807":4,"1809":[],"181":[],"1810":[],"1812":[],"18156717":[],"18166474":20,"1821":[],"18266178":5,"182662":5,"18276924":[],"18327677":[],"18333333333333332":1,"18393678":[],"184":[],"184519":23,"184895":[],"185":[],"1851":[],"1852":[],"18526":[],"185278747229417":[],"1853":[],"1854":[],"1855":[],"186":[],"1860":[],"1861":[],"18611111111111112":1,"18613217e":6,"18660":[],"18673098":11,"18682538":[],"18695705":18,"18780801":23,"18790439176058887":9,"188":6,"18826299":[],"188263":[],"1887":6,"18912963":[],"189367":23,"189496":23,"189622":23,"18998208":20,"18it":[],"19":[2,6,13,20],"19003":6,"19096968":[],"190970":[],"191262820314401":[],"19144544":18,"19158446":18,"19166666666666668":1,"191963":23,"19207979":5,"19213479":[],"19220":[],"193":[],"19354258":[],"19379506":[],"19394283":[],"194":[],"1940":[0,24],"19404282648955e":[],"194042826653172e":[],"194042826815498e":[],"1940428268204826e":6,"194042827197027e":6,"1943":12,"194325":[],"19432526":[],"1944":[],"19444444444444445":[],"19466812":[],"1950915150":[],"1954":[],"1956":[],"19569961":6,"1961":[],"1962":[],"1963":[],"1964":[],"1965":[],"1970":[18,23],"197104":[],"19710439":[],"1973":9,"197370":11,"19740":[],"197738983259782":11,"1979":6,"19800":[],"19853775e":[],"1989":[],"199":[],"19937":[],"19983530":6,"19994371":[],"1_1":12,"1_2":12,"1_3":12,"1cm":[0,8,10,20,23],"1d":[1,2,3],"1e":[1,2,4,13,14],"1e10":14,"1e4":6,"1f":1,"1k":18,"1n":[0,23],"1s":[],"1x":[0,23],"2":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,17,18,19,20,22],"20":[0,1,2,6,7,8,13,20,21,23,24],"200":[0,2,3,4,8,9,10],"2000":[0,24],"200000":[],"20015436":6,"2004":13,"2006":22,"2008":23,"2010":1,"2011":1,"2014":4,"2015":1,"2016":[0,23],"20174121":[],"2018":[0,6,24],"2018906331":[],"2019":[],"2021":[6,14,24],"2022":23,"2023":[15,16,23],"20255857":23,"2027":[],"20277777777777778":1,"20299677":18,"203":[],"20316225":18,"20320502":[],"20375361":[],"203753611274545":[],"20500":[],"20509391":[],"205231":23,"206":[],"2060":[],"20609082":[],"206091":[],"20661216":[],"206640":[],"20664007":[],"2069":[],"207545":11,"20756638":[],"207888":23,"20833333333333334":1,"20867052175003364":6,"20867052175006306":[],"20867052175109335":[],"209789":23,"20980":[],"20999563":23,"21":[0,1,2,5,6,7,9,12,13,15,18,23,24],"210151":[],"2101511":[],"210340":11,"21058097":5,"21130":[],"2116753732":4,"21169159e":6,"21265216":[],"213":[],"213103":11,"213743":11,"21472683":[],"2147483647":[],"21519063":[],"21596432":6,"216290":11,"21654926":18,"216683":11,"21786964":[],"2188":[],"21919813":[],"219249":[],"21924917":[],"21927988":23,"21944444444444444":[],"2195":[],"21985165":[],"21997099":[],"22":[0,1,2,5,6,12,13,18,23,24],"22014758":11,"220148":11,"22044605e":5,"220506557673408":[],"22094791":[],"220968":23,"221":8,"221180":23,"22134069":[],"2216":[],"2218":[],"221805":2,"221921":5,"222400":23,"2225":[],"2246674023625205":18,"225":4,"22567203":18,"2259440937":[],"226124657522696":[],"22612466":[],"226856":[],"22685646":[],"22690428":5,"22821344":18,"2284246870217162":6,"2284246870217459":[],"22842468702288576":[],"22842468702288582":[],"22847924":5,"22929905e":[],"2299":[],"22it":[],"23":[0,1,2,3,4,6,7,12,13,14,18,23],"23002365e":6,"23014274e":[],"23056012":23,"231":[],"23103285":[],"231224729143838":[],"2315033":[],"23167717":5,"23168292":[],"231683":[],"2321528":[],"232153":[],"232435":23,"23297056":[],"23333333333333334":1,"233528":[],"234":6,"23408962e":5,"23483916":20,"23522201":[],"2357089093":[],"2360682191515046":[],"2361111111111111":[],"2364":[],"23659936":18,"237038":[],"23703839":[],"23732849":23,"2379":6,"23792491":[],"237925":[],"23816792":[],"238168":[],"238574":[],"23857423":[],"23962594":18,"2397":[],"24":[0,1,2,3,4,6,13,14,18,23],"240670854503034":11,"24140":[],"2416":[],"24175744e":6,"2419":[],"24276315":[],"2430":[],"24390":[],"24444444444444444":1,"244858":[],"24485843":[],"24512498":[],"24533566":23,"246":2,"24611674":23,"2470":[],"2476536":[],"247654":[],"24770094":[],"24784064":5,"24829908":5,"24906604e":6,"24924624":[],"249302":11,"2493023":11,"2495":[],"25":[2,3,4,5,6,7,8,9,11,13,15,20,23,24],"250":[2,4,7,9],"2500":[],"25000":[0,24],"250000":[],"250154":[],"250636":23,"25115233":23,"25116851":23,"2517560119":[],"251879":23,"252436":23,"25259666":[],"2526":[],"252866":[],"25286618":[],"25366775":5,"253668":5,"253775":[],"25385387":5,"253854":5,"255":3,"255001":23,"25522012":23,"256":[2,4],"25617654e":6,"25617657e":[],"25617658e":6,"256962":[],"257":[],"2572":[],"2572495066":[],"2572e3a4b38d":[],"2575":[],"25792767":[],"25845e8df859":[],"25881631":13,"25902112":18,"259153":11,"2597":[],"25976336":[],"26":[2,3,4,6,13,14,18,20],"26079358":[],"26115367":11,"261154":11,"26153846153846":[],"26185107":18,"26186844":[],"2619":[],"26290036":[],"26291585":[],"262916":[],"26294938":[],"2629493813057833":[],"26301436":5,"26306244":[],"264":[],"26409315307910025":6,"2640931530791003":[],"26409315307910036":6,"2640931530791005":[],"26409315307910053":[],"264421":23,"264666":11,"26466619":11,"265":[],"2650":[],"265109911":4,"26531223e":[],"2654":[],"26549135":18,"266":[],"26610075":[],"26666667":13,"26710969":5,"26780278":5,"268":[],"268227":[],"26822717":[],"268484":[],"26848435":[],"269":[],"27":[0,1,2,3,4,6,13,14,24],"270":[],"2703":[],"27050214":20,"27091656":[],"270917":[],"27092897":[],"27092910":6,"2750":[],"27525917":23,"275341":[],"27562809e":[],"27621662e":[],"276263":11,"27660123":13,"27692307692308":[],"27700":[],"2772":[],"2775623201":[],"27760":[],"278036":[],"27803645":[],"27924636":5,"27n_":20,"28":[1,2,3,4,6,13,14,16,24],"28001319":[],"280179":23,"28047021":[],"280573":5,"280647":11,"28065343":20,"28067036":[],"28097861":[],"280979":[],"28102554":23,"2812":[],"281930":23,"282259":23,"282727":11,"283":[],"2830637392":4,"2831603":[],"28336218e":6,"2836":[],"28390":[],"28475098":8,"28590743":[],"2861":20,"28634473":[],"286345":[],"2871":[],"2873":9,"2882":20,"2886":20,"2886847885377843":[],"28868479":[],"28875373":[],"2890":[0,23],"2892":20,"28967287":[],"29":[3,4,6,7,14],"29082851":[],"290829":[],"29083183":[],"290832":[],"29149329":[],"2915":20,"29167186":5,"29229741":[],"2923076923077":[],"29276615":18,"2931":23,"294277":[],"2942772":[],"29512284":[],"295123":[],"2954":[],"2955":[],"2956":[],"2957":[],"2958":[],"29588901":[],"29592539":[],"296247":[],"296414":23,"29661191":18,"29672381":23,"2968":23,"297":[],"2971492148":[],"2972":[],"2980":23,"29822833":6,"298273":[],"298375":[],"298836":[],"29883607":[],"2990":23,"299267190588216":[],"299748":23,"2_":12,"2_1":12,"2_2":12,"2_3":12,"2_i":12,"2_m":[6,20],"2_t":13,"2_x":20,"2b":20,"2cm":8,"2d":[1,3,11,12,17,23],"2e":6,"2f":[0,7,9,10,11,12,23,24],"2ff97f4bf03b":[],"2g":2,"2g_i":2,"2k":3,"2m":6,"2n":[0,2,3,23,24],"2nd":9,"2p":20,"2pm":[21,23],"2pt":4,"2s":[],"2x":[0,3,8,13,23],"2x_ix_jy_iy_j":8,"2x_j":8,"2y_i":10,"2y_j":8,"3":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,17,18,19,20,21],"30":[0,1,3,4,6,7,10,13,14,21,23,24],"30000":[0,23],"30010":[],"30119421":8,"301475":[],"3014751":[],"3017":[],"3018":[],"3019":[],"301927":[],"3020":[],"3021":[],"30258509":[18,23],"302m":[],"303":6,"3037":[],"3038":[],"30384239":[],"3039":[],"303m":[],"3040":[],"3041":[],"30466214e":6,"304m":[],"305":[0,23],"30535506":[],"30552077":[],"30559547":[],"305m":[],"306":[0,23],"3063":[],"306m":[],"307":[0,23],"30702075":23,"3072":3,"30761405e":[],"30787294":6,"3079975":20,"307m":[],"308":[0,23],"30813073":18,"30839676":20,"30891693":[],"308917":[],"308m":[],"309":[0,23],"30936179":[],"309362":[],"30940":[],"30b53504a633":[],"31":[3,4,6,12,14,18,20],"310":[0,23],"311":[0,23],"31120247":[],"311m":[],"312":[],"3120271598582915":[],"31211671":18,"31228042":[],"31229747":18,"3123314713548606":6,"31276579e":6,"312m":[],"313":[],"31311243":18,"31318084":5,"31377492":18,"314":[],"31424359":[],"314244":[],"31447174":[],"31457796":5,"315":6,"3155":[0,5,6],"315746":[],"31574634":[],"315977":[],"31597731":[],"316":[],"31605061":[],"31614188e":[],"31644071":[],"31650694":6,"31681097":11,"316811":11,"317":[],"31718909":11,"317367":11,"31768693":23,"317m":[],"31835835":20,"31866499":[],"31896852":8,"319803":[],"31980301":[],"319m":[],"31it":[],"32":[3,4,6,12,13,14,18,20],"3200":1,"32039227e":[],"32047562":[],"32066545e":5,"32068012":20,"3208":2,"320m":[],"32149601703519115":6,"3214960170351912":6,"3215":[],"32179365":[],"32183101":23,"32190363":23,"32309075":[],"32320052":[],"324":2,"32458459":[],"32459186":[],"324m":[],"3250":[1,6],"32512":[],"326238":23,"3263505":18,"326m":[],"32714903e":5,"32721178":[],"327212":[],"32750531e":[],"32766274":23,"32816737":[],"32903042":[],"329492":23,"3297":[],"32992274":[],"329923":[],"32it":[],"33":[3,4,12,14,18,21],"3303":[],"33066907e":5,"33078983":23,"3310":[],"33166055e":[],"331939":23,"331m":[],"332331":[],"333":7,"3331":[],"33327369":[],"333274":[],"33333333":13,"3337":[],"33611111111111114":[],"336801":[],"33680101":[],"33711888":[],"3384":[],"33900713":[],"33956555":18,"33m":[],"34":18,"3403":[],"34040204e":[],"340583":23,"340782":11,"34114547":5,"34158665":[],"341m":[],"342680":23,"34305928":[],"3436":[0,23],"3437":[0,23],"34498451":18,"3456":[],"345687771875474":18,"34568872":[],"34569596":5,"3457":[],"3458":[],"34585355":[],"3459":[],"3460":[],"34678929":18,"346810":[],"3469819128513336":[],"34740615":[],"3498":[],"34it":[],"35":[0,2,3,4,6,14,21,23],"35030572":20,"35074881":[],"350749":[],"35123041":23,"3514":[],"35140":[],"35147135":[],"35147532":23,"351636":11,"35182854":5,"35203688":[],"35207264":[],"352073":[],"3522":[],"3525":[],"3528556":[],"352856":[],"3529":[],"3530606977":[],"35319678":18,"35346808":18,"3538":[],"35396404e":[],"35401056e":[],"3543":[],"3544313922":6,"3546":[],"35470445e":5,"3548":[],"355":[],"3551":[],"35533773":6,"35533774":[],"3556":[],"35562617e":[],"3558":[],"355906":[],"35590603":[],"3560":[],"356399":23,"3567":[],"3572":[],"35724288e":[],"3575":[],"357508":23,"3576":[],"3577":[],"35771826":6,"35771842":[],"35793003441520066":20,"3581341341":4,"35821426":18,"3585":[],"3587":[],"35892474":[],"35894575":18,"359":5,"3593":[],"3594821":[],"3595":[],"3598":[],"359999999999985":[],"36":[0,2,5,6,20],"360":1,"3604":[],"3605":[],"3606":[],"360688":[],"3609":[],"36102113":[],"36117602":[],"3613":[],"3615":[],"361556":23,"3617":[],"3621311":5,"3624":[],"3627":[],"3628":[],"363295916323784e":6,"363295916414895e":[],"3632959170548605e":[],"3632959215700067e":6,"363295924430451e":[],"363834":[],"36383443":[],"363936":[],"36393643":[],"3643":[],"3644017":[],"364402":[],"364418e97433":[],"3645":[],"3646":[],"3647":[],"365350":[],"36535019":[],"3655":[],"3655222":5,"3659":[],"3665263":20,"3668":[],"36689784":[],"366898":[],"3669":[],"367":2,"3672":[],"3673":[],"3674":[],"3679":[],"3684":[],"3687":[],"3688":[],"368m":[],"369139":11,"36it":[],"37":[2,3,4,6,14,23],"3704":[],"370782966":4,"3711":[],"3713":[],"37157712":23,"3718":[],"3721":[],"3722":[],"3725":[],"3729":[],"37307168":[],"3739":[],"37396662":6,"37415316":[],"374291":[],"37429133":[],"3748":[],"3749":[],"3753":[],"375694":23,"3759":[],"3760":[],"3765":[],"376547":23,"376559":[],"37655936":[],"376834":[],"37683438":[],"37692363":[],"37703055":[],"37713991":[],"3772":[],"3773":[],"37732":[],"3776":[],"3777801602":6,"3779":[],"37835429e":[],"3784":[],"378664":[],"37866422":[],"37900111":6,"3791":[],"379203":[],"3794":[],"379647":[],"37964744":[],"37992857":[],"37it":[],"38":[2,3,4,14,20],"380":[],"38019139":18,"3802":[],"3803":[],"3804":[],"3805":[],"380739":[],"38073947":[],"3811":[],"38135733e":6,"3815":[],"381627865854956":[],"38162787":[],"38168549":20,"3817475779":6,"3818":[],"3819":[],"3820":[],"382187":23,"38222896":[],"3823886":[],"382389":[],"38246359":[],"382672":[],"38267217":[],"3827":[],"382951":[],"38295101":[],"38299798":23,"3830":[],"38302314":20,"3833":[],"38336316":[],"3834":[],"3837":[],"3838":[],"3839":[],"3842":[],"3850":[],"3851":[],"38533184":[],"38533185":6,"3854":[],"3858":[],"386":[],"38605872":[],"386059":[],"3861":[],"3862":[],"386294":11,"38629412":11,"38629436":[18,23],"38629844":18,"38637915":18,"3864":[],"3867":[],"3869":[],"387":[],"3871":[],"3872":[],"387482":[],"38748219":[],"3876":[],"388":[],"3881":[],"3882":[],"3885":[],"38868469":[],"3888":[],"3889":[],"389":[],"38901478":[],"38906684":[],"389067":[],"3891":[],"38916861e":6,"38962192e":6,"3898":[],"39":[0,2,3,4,14,21,23],"390":[],"3906":[],"39095416":[],"3914":[],"3915":[],"3916":[],"391602":[],"3917":[],"3922":[],"3925515884752442":[],"39272691":[],"3928":[],"3931":[],"39311435":[],"39384255":5,"393843":5,"3943":[],"3944":[],"39456996":[],"39493843":0,"3950":[],"3955":[],"39560937":[],"39579407":5,"3958":[],"39595799":23,"3960":[],"3962":[],"3970":[],"39706038":5,"39724390e":[],"3975":[],"397700":11,"39789527":[18,23],"3979":[],"39794864e":[],"3980313467":6,"3983":[],"39864527":23,"39924562":[],"399246":[],"3994":[],"3996":[],"399836":23,"39it":[],"3bdkrb":[],"3d":[2,3,4,6,13],"3f":[1,3,9],"3n":18,"3x":[2,8],"3x_i":2,"3y":8,"3yk470mj5p931p9dtkk0y6jw0000gn":[1,6,13,23],"4":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,18,20,23],"40":[1,6,21,23],"400":4,"4000":23,"4005":[],"4011":[],"40116777":[],"401168":[],"4012":[],"4017":[],"4017308":23,"40183706":18,"401842":11,"40214433":[],"4022":[],"40236901e":[],"4027":[],"4030":[],"40340043":[],"4034668048":[],"4038":[],"40389922":23,"4039":[],"404":[],"4045":[],"4048":[],"4050":[22,23],"4055":[],"405890":11,"4059":[],"40599799":[],"4068":[],"4069":[],"4075":[],"40754621":[],"4077":[],"408":[],"4082":6,"40829683":[],"408297":[],"4084":[],"4087":[],"4087793":5,"4088":[],"4089":[],"409":[],"40927184e":6,"40980089":5,"409801":5,"40a38ad763f1":[],"41":[2,18],"410":[],"4100":[],"4107":[],"410815":[],"41081513":[],"411":[],"4115":[],"4117":[],"41170104":[],"412":[],"41211579":[],"412116":[],"4128":[],"4131":[],"41351287":[],"413513":[],"41357064":[],"4143":[],"41433969":5,"4144":[],"41446721":20,"4146":[],"41511965e":1,"415201":23,"41542567":20,"4155":[2,15],"415534701258823":[],"41566661":18,"4162706317":6,"4167":[],"4176":[],"4177":[],"418506":11,"4186":[],"41876267":[],"418763":[],"41882036e":[],"41882037e":6,"4192423635":[],"41958102e":[],"4198":[],"41990268":[],"41it":[],"42":[1,3,4,8,9,10,14,18],"420":[],"42028578":18,"42037468e":[],"42078103":[],"421":[],"4212":[],"42130182":13,"422":[],"422275":18,"4224":[],"422480":[],"4224801":[],"423":[],"42340403e":[],"42394972":[],"424":[],"42441033":5,"42449643":[],"42450":[],"425":[],"4255":[],"4258989918":[],"426":[6,7],"42615374e":[],"42631342":[],"427017":[],"42732954":20,"4275":[],"4284066":18,"43":[0,1,3,4,7,14,18],"4304167":23,"43054282":5,"4310":23,"43135183":[],"43294696e":[],"43330971e":6,"43333886":18,"43482628":20,"434932":[],"43493232":[],"435163":23,"43552433":[],"435567":11,"43556723":11,"43560678":18,"43579948e":6,"436462435":4,"43761347":[],"43766686":11,"4379":[],"438060758":6,"438136":23,"43876695":[],"438767":[],"439230":6,"4399427":[],"439943":[],"44":[0,1,3,4,14,18],"44089210e":5,"4410":[],"4411":[],"441264":23,"44152248":18,"44198566":13,"442600":11,"442701":[],"44270138":[],"443217":23,"444":[],"446453":23,"44688507e":[],"44830642":18,"44970586e":1,"44it":[],"45":[3,4,14,21,23],"450":[],"450257":11,"4504":[],"452553":23,"45290829":[],"45393214e":[],"454027":[],"45402701":[],"4543859":[],"4557763":11,"455947":23,"456":[],"456418966187335":[],"457":2,"45741697":18,"457770268480242":[],"458027":23,"458078":11,"45960079":5,"45985488":[],"459855":[],"46":[3,4,14,21,23],"4601":[],"461":[],"461175":[],"462":7,"46284227":20,"46383925e":6,"463861":23,"464424":[],"4644244":[],"46508305":[],"46567887":[],"466":[],"46602982":[],"46650488":5,"466505":5,"46696223":[],"469":[],"46932688":[],"4694":[],"46984697e":6,"469868":[],"46986815":[],"47":[3,4,14,21,23],"4703":[],"47042744":5,"470714":23,"47075725":6,"47116868e":6,"47125748":5,"47132891":5,"47245463":[],"472455":[],"47387858":[],"47400238":[],"47432993":[],"4744":[],"4744219":[],"47478057":[],"47482507":20,"47485224":[],"475311":[],"47531107":[],"47610036":6,"47815203":11,"47920156":[],"47942814":[],"479465113":4,"48":[3,4,14],"480":23,"48089797":[],"48133064":[],"481979":6,"48212873":[],"48257387":[21,23],"48316523e":[],"483257001":13,"4837":[],"48420165":[],"48442336":23,"48476997":11,"48574149":[],"486873":[],"48687342":[],"48739546":18,"48871288":5,"488713":5,"489":[],"489522":[],"48952201":[],"48971452":20,"48994188":5,"48it":[],"49":[3,4,5,6,11,14,24],"490":[],"491":[],"49152":3,"492":[],"49242688":23,"49282737":18,"493":[],"49385454e":[],"4940954":[0,23],"4959161509356135e":[],"495916150936645e":6,"495916150936654e":[],"4959161509377256e":6,"495916150938325e":[],"49614357":[],"496337":[],"49633743":[],"49636583":[],"49672291":18,"49680475019226":23,"497":[],"498":[],"499":[],"4990":20,"499012":[],"49901244":[],"4992":20,"49932427e":5,"4997":20,"49974854":23,"49992743e":[],"4b5d3mupqma":[],"4c4c7f":[9,10],"4d":3,"4f":6,"4pm":[21,23],"4y":8,"4y_i":10,"5":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,18,20,23,24],"50":[1,2,3,4,6,7,8,10,13,14,23,24],"500":[1,3,4,6,9,10,13],"500000":[],"50000455":5,"50000553":5,"50000718":5,"50000855":5,"50000969":5,"50001063":5,"50001142":5,"50001207":5,"50001261":5,"50001306":5,"50001343":5,"50001374":5,"500014":5,"50001414":5,"50001422":5,"50001439":5,"50001454":5,"50001466":5,"50001476":5,"50001485":5,"50001492":5,"50001498":5,"50001502":5,"50001506":5,"5000151":5,"50001512":5,"50001515":5,"50001517":5,"50001518":5,"50001519":5,"50001521":5,"50001522":5,"50001523":5,"50001524":5,"50001525":5,"501":[],"501049":[],"50104946":[],"50105159":[],"5018":20,"50219982":23,"50227564e":6,"5031474174499113":[],"50314742":[],"50321091":5,"504167":[],"50416731":[],"504881":11,"50488131":11,"506":[0,24],"50680321e":[],"50727059":[],"50754416":20,"50769230769231":[],"50799086":23,"507d50":[9,10],"50812169":23,"50846111e":[],"50846112e":6,"50it":6,"50j":13,"50x10":1,"51":[3,4,10,14],"510":1,"51004249":[],"51075117":23,"51126895e":[],"51131471":[],"511315":[],"51150176":18,"51174395":18,"511888":5,"51191552":6,"511977":[],"51197747":[],"512132":[],"51214899":[],"51265232":[],"51289697":[],"512897":[],"5138":[],"51389553":[],"514219":23,"51561271":[],"51664729":20,"51732028":18,"517350858882083":[],"5177783846":4,"517823":[],"51782322":[],"518030":[],"51803019":[],"5188328":[],"518833":[],"518895":23,"519842":[],"52":[3,4,14],"520931":[],"52093124":[],"5216048821598704":[],"521719":[],"52171908":[],"5222222222222223":1,"522758":[],"522836":23,"52307692307693":[],"5260627":[],"526744":11,"52713812":11,"52723079":[],"52773051":[],"52799362":[],"528115":[],"52811546":[],"52819229":23,"52874252":5,"529":[],"52911941":[],"52945798e":[],"53":[3,4,9,14],"5303329":11,"5305555555555556":1,"5312":[],"531280":23,"53189647":[],"53219937":23,"53254035":23,"53312754":[],"533941":11,"53394148":11,"53423784":[],"534362":23,"53479276":[],"534793":[],"53603432":[],"53611562":[],"53623614":23,"53697476":[],"53703498":6,"5378811":11,"53794784":[],"537948":[],"53815559":[],"53822787":23,"53846153846155":[],"539261":11,"53938383":5,"539384":5,"53952479":[],"539525":[],"54":[6,20],"540":[],"54016188":[],"540162":[],"54039921":5,"54041041e":[],"541605":23,"54163136":[],"544439":23,"54537329":20,"546166676":[],"546712":[],"54671213":[],"5472246386316972":20,"54722464":20,"54780216":[],"54845458":[],"548455":[],"54886137":[],"54894095":23,"54969168":23,"54it":[],"55":1,"5501":[],"55026099":[],"550321":[],"55202922":18,"552731":11,"55273102":11,"5539":[],"55505907":[],"555187":[],"55518724":[],"555496":[],"5554964":[],"55553537":[],"5555555555555556":1,"55571665":[],"55578041":[],"5566":[],"557795":11,"558080":[],"55808001":[],"558241":[],"55824107":[],"55854694":11,"5594":6,"56":1,"56033697":5,"561":[],"5611":[],"5615":[],"56183518":20,"56198284":5,"5625":[],"56302854":[],"563167":23,"56343926":23,"5639":[],"564":[],"564374":11,"56437897":[],"564379":[],"565":[],"565006":[],"56500639":[],"56536":[0,23],"56556315":18,"565651":[],"56565106":[],"566":[],"566074":11,"56607416":11,"56636616e":6,"567":[],"568":[],"56848886":23,"569":1,"56912044e":6,"56939714":5,"56992937":[],"57":[0,8,21,23],"570":[],"5700":[],"571":5,"571092":5,"57109235":5,"571105947979336e":[],"571105947979352e":6,"571105947979394e":6,"571105947979395e":[],"571105947979439e":[],"57154252":[],"57174058":[],"57201944e":6,"572069":23,"57266138":[],"57361898":[],"574465":11,"576431":11,"57643113":11,"57673618":[],"57810065":18,"57842073e":[],"578889":[],"57888946":[],"57it":[],"58":[10,21,23],"58084359":11,"58112299":5,"581123":5,"58171189":20,"58187347":18,"58312967":23,"583595":23,"58395707":[],"58428804":[],"58474054":18,"584804":[],"58671946":18,"5888888888888889":1,"589":[],"58986647":[],"59":2,"590":[],"591":[],"591317992":4,"591594":[],"59159438":[],"59182949":[],"59190877":18,"592":[],"593":[],"593040":[],"59304008":[],"59323905":23,"59367954":23,"5944444444444444":1,"59445979":5,"594460":5,"59468796":23,"59591979":[],"595920":[],"59592669":[],"59616454":[],"596165":[],"59654302":23,"59766":[],"597660":[],"59833875":[],"598392":[],"59839245":[],"59955801":[],"5cm":20,"5dd54edf2138":[],"5f":8,"5x":8,"5y":8,"6":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,18,20,21,23,24],"60":[1,2,3,6],"60000":4,"60133562":23,"60176806":23,"6019067271":4,"60236938":[],"60293962":5,"603494":[],"60349429":[],"603636":23,"60420593":5,"6052136":20,"60538875":[],"60619654":[],"6063219":[],"606439":[],"60673226":11,"606760":5,"60685864":[],"60791699":[],"6079169911277265":[],"608028":[],"60802823":[],"60815105":6,"6084611325305795":18,"60943791":[18,23],"60980325":18,"60it":6,"61":[2,7],"61033524":[],"6111111111111112":1,"61123608":18,"612939":23,"613579":23,"61399851":[],"613999":[],"61406871":[],"614133":[],"61413333":[],"61463451":[],"614808":11,"6149274949460215":[],"61576236e":[],"61634314":23,"61702282":6,"617572":[],"61757228":[],"618":[],"61808351":[],"618982":23,"6199381169260247":[],"62":[],"621102":23,"62168613":[],"62170669":[],"621707":[],"62249103":18,"62364974":[],"62373464":11,"62432074":23,"625":7,"62620724":18,"626635268":6,"62683307":18,"62767384":[],"62894215":5,"62896882":[],"629961":[],"63":[0,1,6,7,24],"6300745149331701":[],"630224":[],"63025821e":6,"63207808":[],"63249532e":6,"63270833":[],"63367582":[],"633676":[],"633949":23,"63395187":[],"63430285":[],"63498144":5,"63675140":[],"6371293350711955":[],"637545":[],"63754524":[],"63860687":[],"63862189":[],"63901111":[],"63it":[],"64":[1,2,3,4,7,13,18,23],"64012627":5,"64064128":18,"64113381e":[],"64141716e":[],"642380":[],"64238022":[],"64293754":[],"6431453":[],"64425009":[],"645":[],"64528459":11,"645285":11,"64615384615385":[],"646283":11,"647":6,"64742912e":6,"647473":11,"6489862":18,"649339":[],"64933923":[],"649382":11,"64x50":1,"65":[1,2,7,8,9],"65136857":[],"65280103":23,"6530742540053943":[],"65444431":18,"65522261":[],"65578316":20,"6562":[],"65626043":[],"65628853":[],"657041":23,"65885453":5,"659306":[],"65it":6,"66":2,"66054752":[],"66087937":[],"66111673":13,"66204648":6,"66219404":6,"66226149":[],"66247212":[],"662854":[],"66285434":[],"6628996975186953":[],"66292841":[],"66295776":[],"662958":[],"66310422":[],"6638":[],"66410989":[],"66560":[],"66614025":23,"66619972":[],"666200":[],"66620847":20,"66638078":23,"666597":23,"6669838269597004":[],"667":[],"667239":23,"668172":23,"668186":[],"66818635":[],"66934291":[],"66981186":18,"66it":[],"67":2,"67047975e":6,"67054028":23,"671089":[],"67258699":18,"672721":23,"67314874e":[],"67588315":[],"67591616":[],"67697934":[],"67838309":[],"67882608":[],"67970864":[],"679709":[],"68":2,"68029036":23,"6808538439837775":[],"68176047e":[],"68192193":5,"68246089":[],"682464":5,"68246434":5,"68279358":[],"6834195":[],"68485505":18,"68534263e":6,"68542204":5,"68545647e":[],"6869":[],"68719389":[],"687194":[],"6887363571":4,"689230294669661":[],"68929213e":6,"689345":23,"68944595":[],"689519":11,"68965135":[],"69":[2,7,20],"690":[],"69023787":[],"690569639355314":[],"69061276":[],"690617":23,"69069n_":20,"69115646":18,"692":1,"69295955":[],"6943316601792833":20,"69481746":18,"69484813e":[],"69493539":[],"69504801":6,"6960326":[],"69634577e":6,"69695259":5,"6984511994530214":[],"69908626":6,"69985355":[],"6999536":11,"69it":[],"6e75736fdab1":[],"6f7a6bd7d79f":[],"6m":[],"6n_":20,"6pm":23,"7":[0,1,2,3,4,5,6,7,8,9,11,12,13,14,15,18,19,20,22,23,24],"70":[1,2,6,7],"70127680":[],"701370":5,"70179437":[],"70205195":[],"70354373":[],"703716d317a7":[],"70434005":[],"7050":[],"70598996":[],"70653767":4,"70710678":5,"70721787":[],"707218":[],"70727837":23,"70769586":[],"70831425":[],"70832814":5,"709698":23,"70980493":[],"70it":6,"71":[1,2],"71131626":[],"7119":[],"712018":11,"713163":23,"7134":[],"713487":[],"71348713":[],"71350226":[],"71441535":13,"7151":[],"71721168":[],"71760245":18,"718165":5,"71822416":5,"718697":[],"71869727":[],"72":2,"72057967":23,"72101205":23,"72174172":11,"722047011333792":[],"72228205":23,"72261919":0,"72271878e":6,"72347283":[],"7236674":5,"72373129":[],"72394787":18,"724":3,"72509099":18,"72522848":[],"72594302":18,"72671218":20,"72859758":5,"7293182":[],"72981762":8,"73":6,"73005463":20,"7306310662842432":11,"731000":23,"73174557":[],"73287103e":[],"733096":23,"73406033e":[],"73484667":[],"735738558766299":[],"73573856":[],"73752910":[],"7386068":18,"73it":[],"74":6,"740":[],"74081822":8,"741264":[],"74126425":[],"742975":[],"74297504":[],"74368436":[],"743u":[],"7448615806559786":[],"7469898175164704":[],"74840212":5,"7484669886413582":[],"749765":23,"75":[2,5,6,8,11,23,24],"7501749450963715":[],"750445":23,"750u":[],"75106135":[],"75118364":[],"751275":5,"75127504":5,"751699":11,"75170092":5,"75350216":18,"75361646":20,"753846153846155":[],"7546383166870465":[],"75517445":[],"756232":[],"75623206":[],"756352":23,"75703965":[],"757040":[],"758193":[],"75819326":[],"75838233":[],"75it":[],"76":[2,21,23],"76060096":[],"76063234":20,"76066069":[],"763u":[],"7643536":[],"765":7,"76529528":[],"76674796":[],"76731400e":[],"76802186":[],"768813":[],"76881337":[],"76923076923077":[],"76936315":5,"7694444444444445":1,"77":[2,21,23],"77034458":[],"770345":[],"7705527590466072":11,"77085375":20,"77152076":5,"7718":9,"773329728649545":[],"77332973":[],"77333117e":[],"774300":[],"77494715":23,"775":[],"77559332":20,"77618224":[],"77627886":[],"77632220e":[],"77636e":13,"77662945":[],"7767978193240488":[],"77711437":[],"77714169":8,"77754132e":[],"7782028952":4,"77865169":[],"77954956e":5,"78":2,"78011544":[],"78156479e":[],"78184120e":6,"78286771":18,"7843182645426894":[],"7846153846154":[],"785061":23,"7851533175757255":5,"78596961":13,"78674758":23,"787349":[],"7873493":[],"78752269":[],"78941903":5,"78988962e":[],"79":2,"79009329":[],"790818":5,"79081838":5,"79093776":[],"79111643":5,"791123":[],"79135075":18,"79145214e":[],"7923086060375724":20,"79230861":20,"793167":23,"79394867":[],"7939646":[],"794282":11,"79441434":13,"79449156":[],"79512696":13,"79552752":23,"79602861":[],"79754246":[],"797e":6,"79856831e":[],"798761":[],"79876149":[],"7bsq":[],"7c394b1e8b71":[],"7d7d58":[9,10],"7f2b3a6174c2":[],"7jexgh5soo":[],"7m":[],"7odqolophta":[],"8":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,18,20,23,24],"80":[0,1,2,5,6,8,24],"800":[4,7],"800615":[],"80162359":[],"802796":[],"80279641":[],"80280228":23,"80315282":[],"803153":[],"80354994":6,"803804":[],"80380438":[],"80469739":5,"8049181":18,"8055555555555556":1,"80561191":[],"80609615e":6,"80609616e":6,"8064":[],"80661365":[],"806614":[],"80728853":20,"80734875":[],"807349":[],"80738685":[],"8074242":23,"80747253":[],"80842254":[],"808423":[],"80847477e":6,"80994952":13,"81":[1,2],"81048318e":6,"8108619":[],"81160425":5,"81187794":[],"81333804":6,"81333805":[],"81388724e":[],"814":[7,11],"815563":[],"81592628":18,"815am":[21,23],"81633628":11,"816454":23,"81671821":[],"81681019":23,"816847":23,"8175":[],"81912272":23,"8192798":18,"81955926":23,"81974332":[],"82":2,"82073684":18,"8219235992494145":[],"8219236":[],"82198978":5,"82358522":20,"823585220707946":20,"82454365":18,"82484316":23,"82650876":[],"826509":[],"8265786":5,"82747653":[],"827477":[],"82773778":[],"828190347382744":20,"82819035":20,"829648415811072":[],"82964842":[],"82997013e":5,"83":[2,23],"8305555555555556":1,"8338786":23,"834027":11,"83402742":11,"83512277":5,"836874":[],"83687444":[],"83698677":[],"83757843":13,"839818":23,"83982725":23,"83999999999999":[],"83it":6,"84":2,"84062065":[],"84203538":[],"84228957e":[],"84232163":[],"842436":23,"84292394":[],"842u":[],"84310736":20,"84355903e":1,"84443254e":1,"84569271":[],"84653115":18,"84780262":6,"84854738":[],"848618":5,"84861838":5,"84886051":[],"848861":[],"84923989e":6,"84924834":[],"84942942":23,"84977962":11,"84994524":5,"85":[1,2],"850164":5,"8503720991789538":[],"85065653":20,"85086629":18,"85091337":[],"85120833":18,"85263220":6,"8527777777777777":[],"85278920e":[],"853241":[],"85324115":[],"853835":23,"853u":[],"8548082":18,"8557822":18,"85601992":5,"85694362":23,"85758696":[],"858":[],"858185":23,"8583333333333333":1,"85843684":23,"85953586":[],"85959007":[],"86":2,"8608479":[],"860848":[],"861":[],"86117291":5,"86134827":5,"86145244":11,"861676":23,"86171505":[],"86252988":6,"86361743":23,"8638888888888889":1,"86425056":[],"864251":[],"86478158":[],"86546962":[],"86550074":20,"86623151":[],"86630":[],"8666666666666667":1,"86810":[],"86879198":[],"868792":[],"86893619":[],"869":[0,23],"86905621":[],"86925797":[],"869258":[],"87":[],"870":[0,23],"8702784034":4,"8705211":18,"871":[0,23],"87191952":[],"871920":[],"872":[],"8722222222222222":1,"87243817":20,"873":[0,23],"87327414":[],"87381451":5,"874":[0,23],"874951":[],"87495119":[],"875":1,"8759":13,"876":6,"87625493":[],"87647541":[],"876664":[],"87666423":[],"87667593906086":20,"87667594":20,"8768":[],"878123":23,"878297":[],"87836018":[],"87849647":23,"8792323":18,"879271":[],"87927126":[],"87927601":23,"87940752":[],"87it":[],"88":[2,13],"88001352":18,"88017651":[],"880177":[],"88031314":[],"88046261":5,"8805555555555555":1,"88063413":18,"88118231":[],"88137798":11,"88168312e":6,"881788":[],"8826033":20,"883":[],"88336879":5,"884":[],"88477619":[],"885":[],"88512489":[],"88529063e":6,"8855417382991412":[],"88554174":[],"88560514":20,"88595926":23,"886":[],"8866190885623907":20,"88661909":20,"88679947":[],"887":[],"887366":[],"88736621":[],"88746795":20,"8879":[],"88871662":[],"8888888888888888":1,"889080":[],"88908038":[],"8894":[],"889686":[],"89":2,"89045167":18,"8916666666666667":[],"89274639":[],"89288636":11,"89298533":[],"89335182":[],"893352":[],"893489":[],"89348922":[],"89410423":5,"8944444444444445":1,"89545727":13,"89550839":[],"89565264":[],"89582298":20,"8962476":[],"896248":[],"89873772":[],"89876748":[],"8991514":[],"89944994":[],"899450":[],"8f":6,"8g":6,"8n":18,"8x8":1,"9":[0,1,2,3,4,5,6,7,8,9,11,12,13,14,18,19,20,21,23,24],"90":[1,2,6],"900449":[],"9005135872087155":[],"90054363":[],"90066122":18,"9007164":18,"90075537":5,"9011":6,"90220243":5,"90266948":5,"90268858":[],"9027777777777778":1,"9033":[],"903824":[],"90382431":[],"904":[],"9040":9,"90475506e":6,"90540529":[],"9055555555555556":1,"90559087":[],"905591":[],"90595152":18,"906747":5,"90694878":18,"9083333333333333":[],"90884627":[],"90895045":[],"90940378":[],"90999452e":[],"91":[0,21,23],"910":[],"9111111111111111":1,"91124889":20,"91128596":5,"912u":[],"913":[],"91379157":[],"913791573406831":[],"91383439":[],"91396388":[],"914":[],"91416375":[],"91479093":[],"91492986e":6,"915":[],"91511388":[],"91549644":[],"916":[],"91616374":[],"916164":[],"9166666666666666":[],"91682433":[],"917":[],"91760278":5,"918":[],"91812702":5,"918992":23,"919":[],"9196398947631166":23,"91it":6,"92":[6,21,23],"92087142":20,"9212905":[],"921291":[],"92143477":[],"921435":[],"92208477":[],"922085":[],"92272314":[],"922u":[],"92343595":[],"923602":23,"92373266":23,"924018":[],"92461411":[],"92477093":[],"924e":6,"925":1,"92507116e":1,"9252772":[],"92578916":5,"92603747":[],"92626212":[],"92631966":11,"926320":11,"926583":[],"92658312":[],"92754397":[],"927544":[],"9277777777777778":1,"92811987":[],"92817032":[],"92819235":[],"92857143":7,"92888885":23,"92921648":20,"92968793":18,"92it":[],"93":[],"93037171":[],"930372":[],"9305555555555556":1,"930583":[],"930683":[],"931":[0,23],"93155188":5,"93158979":5,"93188452":[],"931885":[],"93248252":[],"932483":[],"932u":[],"933":5,"93325497":23,"93414191":[],"93492130e":6,"93579127":[],"93586895":11,"935u":[],"9361111111111111":[],"936762":[],"93676229":[],"936856":[],"93685631":[],"937":20,"937082":23,"93799826":5,"938":20,"9387":[],"939":[0,20,23],"94":[7,20],"9400":[],"94054854":[],"940549":[],"940776":[],"94077605":[],"94107596":[],"941866404575299":[],"94212937":[],"94226022e":6,"9424":6,"94284104":5,"94320205":5,"94321297":18,"9444444444444444":1,"945":[],"94548496":[],"94591015":[18,23],"946":[],"94639099":11,"946393":[],"94659383":[],"946957":5,"947":[],"9472222222222222":1,"94735055":[],"947903":[],"94790323":[],"948":[],"94822514":6,"9482527":5,"948641":[],"949":[],"94905663":20,"94915262":[],"94986593":11,"95":[1,7,11],"95008046":6,"95054046":23,"95079764":[],"95231424":5,"9524":6,"9527777777777777":1,"95284275":5,"95302":11,"953065564":1,"95351665":5,"9538239":23,"954":20,"95446837":[],"9549351910143222":[],"954988":[],"954u":[],"9555555555555556":1,"95569422":[],"955820c21e8b":4,"956563":11,"95684892":5,"95703":13,"95714723":[],"957147232685324":[],"957421":[],"95742107":[],"958228616652075":[],"9582286166520774":5,"958476":[],"95994091":23,"95it":[],"96":[6,7,11],"960":20,"9601304850018328e":[],"960130485007504e":6,"960130485007934e":[],"9601304850213484e":[],"96013048502692e":6,"96024953":5,"96032148":[],"96084663":5,"961":20,"962":20,"9626883":18,"962990":23,"9635449873404844":[],"9637117593816477":6,"96390357":[],"9640435":5,"964268":[],"96426825":[],"964735":[],"96473528":[],"96489434":[],"9649652536":4,"96527903":[],"96551427e":[],"965548":23,"96601782":[],"96606158":[],"96620033":[],"96653373":[],"96670977":[],"96686324e":[],"96688672":5,"966899":23,"9674916":5,"967536":11,"9675364":11,"9678":[],"967809":11,"96812218":18,"96863851":[],"96987657":[],"96992454":[],"96it":6,"97":7,"97005689":5,"970057":[],"970477":5,"97047717":5,"97065296":[],"97108e":13,"97117751":[],"97202":[],"9722222222222222":1,"97230501":[],"97243128":5,"97300836":5,"97434186":18,"97477238":23,"97497404e":6,"975":1,"97507735":5,"97547354":[],"97547354476579":[],"975510299261579":[],"9760832":[],"97705827":5,"977418":[],"97758848":5,"9777777777777777":1,"977880":[],"97788031":[],"9780387310732":22,"9780387848570":22,"9781492032632":22,"97840468":23,"978553":5,"97898392":6,"97926491":5,"97it":6,"98":[0,1,7],"980":[],"98017611":[],"98036405":[],"9805555555555555":1,"98091621":5,"981321":23,"98139097":5,"98153145":18,"98248312":5,"98249059":[],"982491":[],"98266587":[],"98275501":5,"982758":[],"98275836":[],"98316352":11,"983164":11,"983310":23,"98346748":[],"9835443722554817":[],"98399675":[],"98413059":5,"984525":5,"98454786":5,"98467494":[],"985":20,"98566191":5,"986":20,"9861111111111112":1,"986699":5,"98680716":5,"98699753":18,"98716878":5,"98740124":20,"98756882":[],"98794823":[],"9879924":[],"98808176":5,"98822371":6,"9888888888888889":1,"989":20,"9890348":5,"9893149172528393":[],"9893447":5,"9898254753574576":[],"98982548":[],"9898ff":[9,10],"99":[6,7,11,13],"990":[],"99009525":5,"9902552771282336":[],"99049330":[],"99051150":6,"99088801":5,"991":20,"99115119":5,"99157584":[],"99176998":5,"992":20,"99242921":5,"99265097":5,"99274513":[],"993":20,"99316252":5,"99353454":[],"993535":[],"993537":[],"99353748":[],"99371056":5,"99374388":23,"993865":[],"99389612":5,"993972":[],"99397245":[],"9940672992288855":20,"9943201":5,"99435648":[],"9947756":5,"99492986":5,"99498108":[],"99519225":[],"99528218":5,"99539415":5,"9955282554647219":[],"9956582":23,"99566069":5,"99578809":5,"99594988":[],"995950":[],"996":5,"99608161":5,"9963961":5,"99650061":5,"9967458":5,"99700706":5,"99709215":5,"99724883":[],"99729756":5,"99751458":5,"99758326":5,"99775587":5,"99775949":[],"99793613":5,"99799099":5,"99813653":5,"99820454":23,"99828624":5,"99829953":[],"9983295":5,"99845267":5,"998577":5,"99861053":5,"99871521":5,"99881845":5,"99884384":5,"99893323":5,"999":[9,20],"99901896":5,"99903755":5,"99911427":5,"99918546":5,"99919837":5,"99926459":5,"9993237":5,"99933188":5,"99938942":5,"9994385":5,"99944272":5,"99949306":5,"99953381":5,"99953475":5,"99957911":5,"99961294":5,"99965056":5,"99967865":5,"99970988":5,"9997332":5,"99975913":5,"99977416":[],"99977849":5,"99980002":5,"9998161":5,"99984732":5,"99987324":5,"99989476":5,"99991263":5,"99992698":11,"999927":11,"99992746":5,"99993978":5,"99995":5,"9999555851685968":[],"999955585168597":6,"9999840939906267":[],"9999858320366368":[],"9qcu8vcxxru":[],"9x":6,"9y":6,"\u00f8yvind":[6,24],"abstract":1,"boolean":4,"break":[0,4,6,11,14,23],"byte":[18,23],"case":[0,1,2,3,4,5,6,7,11,12,13,14,16,17,18,23],"catch":[0,23],"char":[],"class":[0,1,3,4,6,7,8,9,11,12,13,20,23],"const":[],"default":[0,1,2,4,6,7,13,16,18,23,24],"do":[0,2,3,4,5,6,8,9,10,11,12,13,14,15,16,18,24],"ekstr\u00f8m":4,"eng\u00f8i":[],"export":9,"f\u00f8470":[21,23],"final":[0,1,2,3,4,5,6,7,8,9,10,11,13,14,16,19,20,21,23],"float":[0,3,4,5,9,11,13,14,18,23,24],"function":[2,3,4,5,9,14,15,16,17,18],"import":[0,1,2,3,4,6,7,8,9,10,11,12,13,14,16,20],"int":[0,1,2,3,4,5,6,11,13,14,18,20,24],"long":[0,1,3,4,12,13,23],"m\u00f8svatn":6,"new":[0,1,2,3,5,6,7,8,9,10,11,13,14,18,23,24],"null":23,"public":[0,3,4,14,17,23],"return":[0,1,2,3,4,5,6,7,8,9,11,13,14,18,20,23,24],"s\u00f8rli":[],"s\u00f8rlie":[],"sch\u00f8yen":[6,24],"short":[4,5],"steinsv\u00e5g":[],"super":[5,24],"switch":0,"throw":[3,6,20],"true":[0,1,2,3,4,5,6,7,8,9,10,12,13,14,15,16,18,20,23,24],"try":[0,1,2,4,5,6,7,8,9,10,11,13,14,15,16,17,18,20,23,24],"var":[1,5,6,10,11,13,20,23,24],"while":[0,1,3,4,5,6,7,8,9,11,12,13,20,23,24],A:[2,3,5,6,7,10,11,12,13,16,17,18,19,20,21,22,24],AND:2,And:[0,3,4,5,6,9,13,17,20],As:[0,1,2,3,4,5,6,8,10,12,13,16,18,20,23,24],At:[0,4,6,13,23],BE:[0,23],Be:[2,17,23],Being:13,But:[0,1,2,3,5,6,9,10,20,24],By:[0,3,5,6,12,13,18,23,24],For:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,22,23,24],IF:6,IN:22,If:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,15,16,17,18,20,23,24],In:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,20,22,23,24],Is:11,Ising:[5,12,24],It:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,17,18,20,23,24],Its:[1,2,4,11],NO:[7,11],No:[3,4,6,8,9,14,23],Not:[0,1,5,6,23,24],OR:20,Of:20,On:[0,3,15,19,20,21,22,23],One:[0,1,3,4,5,6,7,8,11,12,13,20,24],Or:[0,1,6,23],Such:[0,6,12,16,20],That:[0,5,7,10,11,12,14,20,23],The:[4,10,13,14,15,16,18,19,20,21,22],Then:[0,1,6,8,9,10,11,12,13,14,18,23,24],There:[0,3,4,5,6,8,9,11,12,14,18,19,20,21,23,24],These:[0,3,4,5,8,9,10,11,12,13,14,15,16,18,20,21,23,24],To:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,18,20],With:[0,5,6,8,9,10,11,12,14,18,20,23,24],_0:[5,8,10,11,13,24],_1:[2,5,6,8,10,11,12,13,14,18,24],_2:[2,5,8,11,12,13,18,24],_3:18,_4:18,_9:13,_:[0,1,2,4,5,6,7,8,9,10,11,12,13,18,23,24],_________________________________________________________________:[],__call__:[],__class__:10,__doc__:6,__future__:[8,9],__getitem__:[],__init__:[1,3,4,14],__main__:2,__mosek:[],__name__:[2,10],__traceback__:[],_api:[3,4,14],_asarrai:[],_auto10:[6,12],_auto11:6,_auto12:6,_auto1:[2,3,4,5,6,7,12,13,18,20,24],_auto2:[2,3,4,5,6,12,13,18,20],_auto3:[3,4,5,6,12,13,18],_auto4:[4,6,12,13,18],_auto5:[4,6,12,13,18],_auto6:[4,6,12,18],_auto7:[4,6,12,18],_auto8:[6,12],_auto9:[6,12],_ax:[],_base:8,_build:[0,17,22,23],_build_call_output:[],_c:1,_call:[],_call_flat:[],_check_1d:[],_check_optimize_result:[7,11],_compon:11,_config_pb2:[3,4,14],_coordinate_desc:6,_copy_docstring_and_deprec:[],_cpgg0jyh8m:[],_decor:[0,23],_depth:9,_fraction:9,_get_lin:[],_getitem_multilevel:[],_handl:[],_i:[0,1,2,5,6,7,8,11,12,13,15,16,23,24],_inference_funct:[],_interpolatefunctionerror:[],_is_primit:[],_j:[0,1,2,3,5,6,8,13,24],_jit_compil:[],_k:13,_l:12,_lambda:[6,23],_leaf:9,_logist:[7,11],_m:10,_make_vjp:[2,13],_maybe_define_funct:[],_multilayer_perceptron:1,_n:[2,5,8,11,13,24],_node:[2,9,13],_notokstatusexcept:[],_np:[],_num_output:[],_p:[5,8,24],_plot_arg:[],_process_traceback_fram:[],_r:[],_ratio:11,_sampl:9,_select_forward_and_backward_funct:[],_split:[6,9],_src:[],_stateful_fn:[],_stateless_fn:[],_sy:[3,4,14],_t:13,_test:6,_trace:[2,13],_valu:[2,13],_varianc:11,_weight:9,a0:3,a0faa0:[9,10],a1:[0,23],a2:[0,23],a3:[0,23],a4:[0,23],a_0:[0,23],a_1a:[0,23],a_2a:[0,23],a_3:[0,23],a_3a:[0,23],a_4:[0,23],a_4a:[0,23],a_:[0,1,16,18,23,24],a_h:1,a_i:[0,1,2,12,23],a_j:[1,12],a_k:[0,1,12],a_ndim:[],aaron:22,ab:[0,2,5,13,14,23,24],ab_channel:17,abandon:1,abbrevi:19,abid:20,abil:[0,10,23],abl:[0,1,4,5,6,7,10,12,13,16,24],abort:[],about:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,17,18,21],abov:[0,1,3,4,5,6,7,8,9,10,11,12,13,14,15,16,18,20,22,23,24],abovement:6,abscissa:13,absolut:[0,2,5,6,13,23,24],acceler:13,accept:[0,3,6,9,23,24],access:[0,3,11,20,24],accid:[4,6],accmod:[],accompani:[0,23,24],accomplish:[8,9,13],accord:[0,1,2,5,6,9,12,13,14,15,16,20,23],accordingli:11,account:[0,3,5,13,15,20,23],accumul:[12,13,20],accur:[0,3,4,6,10,13],accuraci:[0,1,3,4,5,6,7,9,10,11,12,23,24],accuracy_scor:[0,1,10,23],accuracy_score_numpi:1,achiev:[0,1,5,6,8,12,18,23],aco:20,acquaint:[17,23],acquir:[1,17,23],acr:[0,24],across:[1,3,6,9,17,23],act:[1,3,18],action:20,activ:[0,2,3,4,9,19,21,23],actual:[0,1,4,5,6,8,11,16,18,20,23,24],ad:[1,3,4,5,8,13,15,16,18],ada_clf:10,adaboostclassifi:10,adadelta:13,adagrad:[],adam:[1,3,4,21,23],adapt:[4,6,13,22],add:[0,1,2,3,4,5,6,8,10,11,12,15,16,20,23,24],add_lin:[],add_outgrad:2,add_subplot:[1,7,12,14],addendum:5,addit:[0,2,3,5,6,7,8,9,10,12,13,15,17,18,20,21,22,23,24],addition:[12,13],address:[1,9,11,13,23],adjac:[3,12],adjoint:[5,24],adjust:[0,5,12,13],admir:[0,23],advanc:[4,6,12,22,23],advantag:[1,3,5,6,10,13,18],adversari:23,afecionado:23,affect:3,affin:[0,3,8,11,24],afford:3,aficionado:23,aforement:14,african:[0,24],after:[0,1,2,4,5,6,9,11,12,13,15,17,18,20,23,24],afterward:[0,23],ag:[0,7,19,23,24],ag_0:2,again:[0,1,4,5,6,7,8,10,11,12,13,15,16,20,23,24],against:[1,4,7,10],agegroup:7,agegroupmean:7,aggreg:[9,10],agorithm:10,agre:[5,6,20],agreement:13,ahead:9,ai:[0,22],aid:11,aim:[0,1,4,6,7,11,14,15,16,17,18,24],ainv:5,airplan:3,aka:5,al:[0,2,4,15,16,22,23,24],alarm:[5,7],algebra:[0,3,5,13,17,24],algo:[],algorithm:[0,1,2,4,5,6,7,8,13,14,17,18,20,22,23],align:[0,2,5,6,7,8,13,20,23,24],all:[0,1,2,3,4,5,6,7,9,10,11,12,13,14,15,17,18,19,20,21,22,23,24],allevi:[1,13],alloc:[3,18],allow:[0,1,2,3,5,6,8,10,13,15,16,17,18,23,24],almost:[0,1,6,8,11,13,20,23],alon:[2,9],along:[2,3,4,5,6,9,10,11,17,18,23,24],alpha:[0,1,2,3,4,6,7,8,9,10,13,14,20,23,24],alpha_0:3,alpha_1:3,alpha_2:3,alpha_:10,alpha_i:[3,13],alpha_k:13,alpha_m:10,alpha_n:3,alpha_opt:13,alreadi:[2,3,4,5,6,10,12,17,18,20,23,24],also:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,23,24],alter:1,altern:[0,1,4,5,6,7,8,9,11,13,18,23,24],although:[0,1,5,6,8,10,13,16,23],alwai:[0,3,5,6,12,13,16,20,23,24],am:4,ame2016:[0,23],american:[0,24],among:[0,3,5,9,10,12,18,23,24],amongst:5,amount:[0,1,3,4,6,8,10,14,17],an:[1,2,3,5,6,7,8,9,11,12,13,14,15,16,17,18,20,21,22,24],an_:20,anaconda3:[],anaconda:[0,1,15,17,23],analog:13,analys:6,analysi:[1,3,4,7,14,15,16,18,22],analyt:[2,3,5,6,7,12,13,15,17,23,24],analyz:[0,1,3,4,5,6,14,16,20,23,24],andrew:1,angl:[0,3,9,24],anharmon:3,ani:[0,1,2,3,4,5,6,7,8,9,10,12,14,20,23,24],anim:[4,12],ann:12,annot:[0,1,3,7,8,23,24],announc:23,anoth:[0,1,3,4,5,6,7,8,10,11,12,13,18,20,23,24],anp:2,ans_vspac:2,ansatz:[0,23],answer:[0,1,3,5,6,18,21,23],antialias:[2,6],anticip:4,anymor:[1,8],anyon:[4,8],anyth:[1,20],anytim:[21,23],apach:1,apart:[11,13],api:[1,3,4,14,17,23],appar:2,appear:[0,1,3,13,16,18,20,23],append:[1,3,4,8,9,13,23],appendcon:[],appendvar:[],appli:[0,1,2,3,4,6,7,8,9,10,11,12,13,15,16,20,22,23,24],applic:[0,1,3,4,5,6,7,9,12,13,18,20,22,23,24],apply_gradi:4,approach:[1,2,4,5,6,9,10,11,12,13,17,20,22,24],appropri:[2,6,9,12,13,17,20],approv:23,approx:[0,2,3,6,10,11,13,20,23],approxim:[0,1,2,3,4,5,6,7,10,11,13,20,23,24],apt:[0,15,17,23],aq:20,ar:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24],aragorn:23,arang:[1,3,4,6,7,9,10,12,13,23],arbitrari:[1,4,6,8,12,13,20],arbitrarili:[0,1,11,23],arc:6,architectur:[3,4,12],area:[0,3,6,22,23],arg:[0,2,13,23],argc:[],argmax:[1,11],argmin:[4,10,14],argnum:[2,13],argnum_0:2,argnum_1:2,argsort:11,argu:[1,13],argument:[0,2,3,5,6,11,12,13,23,24],argv:[],argval:2,aris:[0,6,12,13,20,23],arithmet:[0,13,18,23],arm:6,arma:[],armadillo:18,around:[0,1,4,5,6,11,20,23],arr:2,arrai:[0,1,2,3,4,5,6,7,8,9,11,12,13,14,17,20,24],arrang:[3,23],arraybox:13,arriv:[0,6,9,11,18,20,23],arrow:12,arrowprop:8,art3d:13,art:[0,1,15,17,23],articl:[0,3,4,6,10,23,24],artifici:[0,2,7,12,22,23],artificialneuron:12,arug:13,arxiv:[3,4],as_fram:[],asap:23,asarrai:[0,2,6,9,24],asc:[],ascii:[],ashrafi:[],asid:24,ask:[5,6,11,12],aspect:[0,6,17,23,24],assembl:[0,3,23],assert:4,assess:[0,6,23,24],assici:4,assign:[0,7,8,9,12,13,14,19,21,22,23,24],associ:[0,6,9,12,14,20,23],assum:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,18,20,23,24],assumpt:[0,3,5,6,9,11,20,23,24],ast:[0,5,6,23],astronomi:[23,24],astyp:[4,9,10],asymmetri:[0,23],asymptot:[4,6],async_wait:[],atla:23,atoi:[],atom:[0,23],attempt:[0,4,6,7,8,10,23],attend:19,attent:[0,18,23],attr:[],attract:[0,10,23],attribut:[0,9,13,23],attributeerror:13,audi:[0,23],audio:[3,4],august:[15,16,23],aurelien:[0,15,19,22,23],austfjel:6,author:[0,1,3,4,10,14,20,23],authour:23,auto:[6,9,10,20],autocor:20,autocorrelation_tim:20,autocorrelform:20,autocovari:20,autoencod:[4,17,23],autoencond:17,autograd:[17,23],autograph:[3,4,14],autom:[0,17,22,23],automac:18,automag:23,automat:[0,1,2,3,4,11,16,17,18,23],automobil:3,autonom:4,avail:[0,1,4,6,10,11,15,17,18,19,21,22,23],averag:[0,1,3,6,9,10,13,14,20,21,23,24],avg:[],avoid:[0,4,5,6,9,11,13,18,23,24],avx2:[],avx:[],awai:[2,3,6,24],awar:[2,10],award:[21,23],ax:[0,1,2,3,4,6,7,8,9,10,11,12,13,14,18,23],axes3d:[2,6,13],axes_grid1:6,axessubplot:[],axhlin:8,axi:[0,1,2,3,4,6,7,8,9,10,11,12,13,14,18,20,23,24],axiom:5,axlabel:[0,23],axvlin:[4,8],axvspan:4,b1:8,b2:8,b3:8,b:[0,1,3,4,5,6,8,9,10,12,13,14,15,16,20,21,23,24],b_0:0,b_1:[0,2,12,13],b_2:[0,13],b_5:13,b_:[0,1,18],b_group:9,b_i:[0,1,2,12,23],b_ia_:[0,23],b_ia_i:0,b_index:9,b_is_vec:[],b_j:[1,12],b_k:[0,1,12,13],b_m:12,b_meta:[],b_score:9,b_valu:9,bachelor:[19,21],back:[0,3,4,5,6,8,9,10,15,18,20,23,24],backbon:18,backend:[1,4],background:[22,23],backpropag:1,backtrack:9,backup:18,backward:[1,2,4,12,18],backward_pass:2,bad:[6,24],badli:20,bag:[9,17,23],bag_clf:10,baggin:23,baggingboot:10,baggingclassifi:10,baggingtre:10,balanc:6,band:18,bandwidth:18,bar:[0,6,11,15,16,23],barber:22,bare:[4,10],base:[0,1,3,4,5,7,8,9,10,14,17,20,21,22,23,24],basi:[5,7,8,10,11,12,13,18,24],basic:[2,6,8,12,13,14,17,20,23],batch:[3,4,11,12,13],batch_shap:4,batch_siz:[1,3,4],batchnorm:4,bay:7,bayesian:[5,17,22,23],bbupeevmxtg:[],bc298b802fe2:[],beam:23,becattini:21,becaus:[0,1,2,3,4,5,6,8,9,12,13,14,23],beccatini:23,becom:[0,1,2,5,6,7,9,12,13,20,23,24],been:[0,1,2,3,4,5,6,11,12,13,17,18,23,24],befor:[0,1,2,3,4,5,6,7,8,12,13,14,18,20,23,24],beforehand:[0,20,23],begin:[0,1,2,3,4,5,6,7,8,9,11,12,13,14,18,20,21,23,24],behav:[1,6,13],behavior:[0,1,13,23],behaviour:12,behind:[0,1,6,8,13,23],behnoosh:[],being:[0,1,2,3,4,5,7,8,10,11,12,13,20,23,24],believ:[9,18],belong:[7,8,9,13,14],below:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,18,20,23,24],benchmark:10,bendik:[],benefici:[1,13],benefit:[0,1,4,11,13,15,17,23],bengio:[1,19,22,23,24],benign:[1,7],bennosh:[],besid:[4,5],bessel:[5,24],best:[0,1,2,3,4,5,6,7,8,9,10,12,13,21,23,24],beta:[0,1,3,5,6,7,10,11,13,16,23,24],beta_0:[0,1,3,5,6,7,13,23,24],beta_0x_:[0,23,24],beta_1:[0,1,3,5,6,7,10,13,23,24],beta_1x_0:[0,23],beta_1x_1:[0,7,23],beta_1x_2:[0,23],beta_1x_:[0,23,24],beta_1x_i:[7,13,24],beta_2:[0,3,13,23,24],beta_2x_0:[0,23],beta_2x_1:[0,23],beta_2x_2:[0,7,23],beta_2x_:[0,23,24],beta_2x_i:24,beta_3:3,beta_3x_i:24,beta_4x_i:24,beta_:[0,3,6,7,13,23,24],beta_i:[0,3,5,23,24],beta_j:[0,5,6,13,23,24],beta_k:13,beta_linreg:13,beta_m:10,beta_mg_m:10,beta_n:3,beta_p:7,beta_px_p:7,betavalu:5,better:[0,1,2,3,4,6,9,10,11,12,13,23,24],between:[0,1,2,3,4,5,6,7,8,9,11,12,13,14,20,23,24],beyond:[0,1,5,6,8,13,23,24],bf:[13,14,18,20],bgd:13,bia:[0,1,2,3,5,8,9,10,12,13,23,24],bias:[1,2,3,5,6,9,12],big:[0,1,2,5,6,14,23],bigger:[1,6,24],bigr:12,bike:9,bilbo:23,bilek:[],billion:[3,12,17],bin:[0,7,20,24],binari:[0,3,5,7,9,10,12,23],binarycrossentropi:4,bind:[0,24],binomi:[17,20,23],binsboot:6,bioinformat:[0,23],biolog:[1,12],bios1100:[17,23],bird:[0,3,23],birth:23,bishop:[19,22,23],bit:[1,4,18,20,23],bitwis:[3,4,14,20],bivari:2,bk:[0,13,24],bla:[18,23],black:[8,9,14],bledso:23,blob:23,block:[6,10,17,18,20,23],blockingavg:[],blockingstd:[],blockingvar:[],blocksiz:[],blocksizemax:[],blocksizemin:[],blogpost:4,blue:[0,3],bluntli:23,bmatrix:[0,1,3,5,7,8,11,13,18,23,24],bmi:1,bodi:[0,1,4,12,23],bold:1,boldfac:[0,5,16,24],boldsymbol:[0,1,2,3,5,6,7,8,10,11,13,14,15,16,23],boltzmann:[12,17,23],book1:22,book:[22,23],boost:[1,9,17,23],boostrap:10,bootavg:[],bootstd:[],bootstrap:[1,13,17,23],bootvar:[],bootvec:[],borrow:23,boston_dataset:[0,24],bot:8,both:[0,1,4,5,6,8,9,10,13,14,15,16,17,18,20,21,23,24],bottl:7,bound:[0,8,12,24],boundari:[2,4,8,11,12],boundkei:[],box:[2,4,9],boxed_arg:2,boyd:[8,13],bracket:[4,20],brain:[1,7,12],branch:9,breast:[5,7,11],breviti:13,brew:[0,15,17,23],brg:8,brief:24,briefli:[0,23],bring:[0,5,6,10,23,24],broad:[0,23],brought:[13,17,23],brownle:4,browser:23,brunton:[],brute:[3,5,11,24],bs:[8,9,10],buffer_s:4,bui:4,build:[0,4,5,6,10,18,20,23],built:[0,1,3,4,6,24],bunch:11,busi:[0,24],bx:[],bzl:[],c1:[8,11],c2:[8,11],c95af3df0cdd:[],c:[0,1,2,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,20,21,22,24],c_0:20,c_1:12,c_2:12,c_3:12,c_4:12,c_:[0,8,9,10,13,20,24],c_i:[12,13],c_k:20,ca:[1,23],cabc613b8702:[],cach:10,cal:[0,8,10,12,13,15,16,23],calcul:[0,1,2,4,5,6,8,9,10,11,12,13,14,15,16,18,20,23],california:[],call:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,20,21,23,24],callabl:[],callback:[],calor:[0,24],cambridg:[13,22],can:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,20,21,22,24],cancel:[0,13,23,24],cancellation_manag:[],cancer:[5,10],cancerpd:7,candid:[8,9,10],cannot:[0,1,4,5,6,7,8,9,19,20,23,24],canopi:[0,15,17,23],canva:23,cap:5,capabl:[0,1,8,13,17,23],capac:[2,21],capita:[0,24],captur:[4,11,12],captured_input:[],car:[3,4],card:[0,7,23],cardin:1,care:11,carefulli:13,carlo:[0,6,17,20,22,23],carri:[2,6,7],cart:10,carvalho:[],casella:22,cast:1,cat:[3,4],categor:[0,1,3,9,11,23],categori:[0,1,3,7,10,12,14,23],categorical_crossentropi:[1,3],caus:[0,5,6,20,23,24],causal:0,causat:[0,23],cax:1,cb:[6,23],cbar:1,cbook:[],cc:[0,1,5,13,23,24],ccc:[5,12],cd_fast:6,cdf:20,cdot:[0,2,6,12,13,14,18,20,23],celebr:13,cell:[0,2,3,4,6,8,9,10,13,14,15,23,24],center:[0,1,6,7,8,9,11,14,20,23],centr:[],central:[0,3,5,6,8,16,18,23,24],centroid:[14,20],centroid_differ:14,centuri:3,certain:[0,3,6,7,9,20,23,24],cg:13,cha:[0,24],chain:[0,1,13,17,20,23],chanc:[1,5,13,20],chang:[0,1,2,3,4,5,6,8,9,11,12,13,14,18,20,23,24],channel:3,chapter3:0,chapter:[0,6,10,11,18,22,23,24],charact:[0,3,5,23,24],character:[8,9,10,12,20],characterist:[0,1,3,10,13,23],charg:[0,23],charl:[0,24],chase:4,chat:23,chd:7,chddata:7,cheap:[5,24],cheaper:[1,13],check:[0,1,3,4,5,6,11,13,18,23,24],checkmark:3,checkpoint:4,checkpoint_dir:4,checkpoint_prefix:4,chemic:[],chen:10,chiaramont:2,choic:[0,1,2,3,4,6,9,12,13,14,18,23,24],choleski:[5,18,24],choos:[2,3,6,9,10,11,13,14],chosen:[0,1,2,6,8,9,10,13,16,20,23],chosen_datapoint:1,christian:22,christoph:[19,22,23],cifar10:3,cifar:3,cin:[],circ:[1,12],circl:[0,8,12,24],circuit:3,circumfer:9,circumv:[1,5,13,24],ckpt:4,clariti:20,class_nam:[3,9],class_val:9,class_valu:9,class_weight:[],classic:[7,9,13],classif:[0,3,5,6,7,8,11,12,17,22,23,24],classifi:[0,1,4,7,9,10,11,23],classificaton:1,classifii:10,clean:1,clear:[1,5,10,12,13],clearli:[0,3,5,6,7,8,20,24],clever:[1,10],clf3:0,clf:[0,6,8,9,10,23,24],clf_lasso:6,clf_ridg:[6,23],clip:[3,20],clone:21,close:[0,1,2,4,6,8,9,11,12,13,14,20,22,23],closer:[3,5,13,24],closest:[8,11,13,14],closur:[17,23],cloud:[17,23],cluster:[0,1,4,6,11,17,23],cluster_label:14,cm:[1,2,3,6,8,13],cmap:[0,1,2,3,4,6,8,9,10,23],cmap_arg:6,cmath:[],cmb:19,cmd:9,cmu:[],cn_:20,cnn:12,cnn_kera:3,cntk:[17,23],co:[0,2,3,6,9,13,23],code:[3,4,6,7,8,15,16,17,18,20,22],coef0:8,coef:[0,23],coef_:[0,5,6,8,9,13,23,24],coeff:5,coeffici:[0,3,5,6,7,8,9,13,15,16,18,23,24],coerc:[0,6,23],coin:[10,20],coin_toss:10,col:[0,11,23,24],colab:[17,23],cold:9,colinear:[0,24],collaps:8,collect:[0,2,6,10,11,17,20,22,23],collinear:[5,24],color:[0,3,4,6,8,9,10,20],color_channel:3,color_cod:6,colorbar:[1,6],colsample_bytre:10,colsaobject:10,colspec:[0,23],column:[0,1,2,5,6,7,8,9,11,12,18,23,24],columntransform:9,com:[4,6,17,22,23],combin:[1,2,5,6,7,10,20],come:[0,1,3,4,5,12,13,14,15,23,24],command:[0,1,23],comment:[0,4,5,6,15,16,23],commerci:[0,15,17,23],commod:[0,23],common:[0,1,3,5,6,7,9,11,13,14,20,23,24],commonli:[0,1,4,6,7,9,13,14,24],commun:[0,12],commut:3,commutatitav:3,compact:[0,1,3,5,6,7,9,11,12,13,14,23,24],compair:0,compar:[0,3,4,5,6,11,13,15,16,18,23,24],comparison:[2,4,13],compat:[3,4,7,14],compet:[0,23],competit:10,compil:[0,1,3,4,13,15,17,18,23],complet:[0,2,3,4,9,12,23],completenn:12,complex:[1,5,8,9,11,12,13,15,16,23],complic:[0,1,9,13,23],compoment:24,compon:[0,1,3,4,5,6,7,9,14,16,17,23,24],components_:11,compos:[9,12,13,14,17,23],compphys:[0,6,17,19,21,22,23,24],compress:[0,23,24],compris:6,compromis:[5,24],compulsori:[17,23],comput:[0,1,2,3,4,5,6,7,8,10,11,12,13,15,16,17,18,19,20,22,23,24],computation:[0,3,6,9,13,20,23],computationalscienceuio:23,con:[],concat:23,concaten:[2,4,6,14],concav:[1,13,24],concentr:[0,10,24],concept:[0,2,17,23,24],conceptu:[12,13],concern:[0,1,4,7,23],concic:23,conclud:[0,5,13],conclus:1,cond:2,conda:[0,1,15,17,23],condis:24,condit:[0,2,4,5,6,8,9,11,13,20,23,24],conduct:[17,23],condwav:2,coneqp:[],confid:[0,5,6,7,8,23,24],config:[3,4,14],config_pb2:[3,4,14],configur:3,confirm:[5,12],confus:[5,6,7,10,18,24],confusion_matrix:9,congruenti:20,conjug:[4,8],conjugaci:13,conjunct:3,connect:[0,1,3,4,9,11,12,13,18,23,24],consequ:[5,6,8,10,12,13,24],conserv:[5,14,24],consid:[0,1,2,3,5,6,7,8,9,10,12,13,16,18,20,23,24],consider:[0,1,5,13,23,24],consist:[0,1,2,3,4,6,12,13,20,24],constant:[0,2,3,4,5,6,8,12,13,14,20,23,24],constitu:[0,23],constitut:[2,6],constrain:[1,3,5,7,11],constraint:[5,6,8,13,24],construct:[0,1,2,3,5,6,7,8,9,10,11,18,20,23,24],contact:[0,23],contain:[0,2,3,4,5,6,7,8,9,11,12,13,14,18,20,22,23,24],contemporari:23,content:[1,17,18,23],context:[6,10,13],contigu:18,continu:[0,1,2,3,4,5,6,7,8,9,10,12,13,18,20,23,24],contour:[9,10,13],contourf:[8,9,10],contrast:[1,4,9,10,12],contribut:[0,3,5,13,20,23,24],contributor:[0,23],control:[0,1,3,9,13,15,17,23],conv2d:[3,4],conv2dtranspos:4,conv:[3,4],convei:23,conveni:[0,5,6,12,13,18,23],convent:[12,24],converg:[1,2,4,5,6,7,8,11,13,14,24],convergencewarn:[1,6,7,8,11],convert:[0,1,3,4,5,9,11,13,14,18,23,24],convert_phas:[3,4,14],converter_error_data_pb2:[3,4,14],converttomatrix:4,convex:[4,5,7,24],convinc:13,convolut:[1,4,17,23],cool:[4,9],coolwarm:6,coordin:[5,12,14,24],coorel:[0,24],copi:[0,1,2,14,24],core:[2,3,4,10,13,14,23],corel:23,coronari:7,corr:[0,5,7,11,24],correalt:[11,17],correct:[0,1,2,3,4,5,7,13,18,20,23,24],correctli:[1,2,6,7,10],correl:[0,1,3,5,6,7,10,12,13,17,20,23],correlation_matrix:[0,5,7,11,24],correspond:[0,3,5,6,8,9,11,12,15,16,17,18,20,23,24],cortex:12,cosin:[3,6],cost:[0,2,3,5,6,7,8,9,12,13,16,23],cost_deep_grad:2,cost_funct:2,cost_function_deep:2,cost_function_deep_grad:2,cost_function_grad:2,cost_grad:2,cost_sum:2,costol:13,could:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,18,20,23,24],coulomb:[0,23],count:[0,9,19,20,21,23],countor:13,coupl:[4,5,6],cours:[0,1,3,5,11,19,21,24],courvil:[19,22,23,24],cout:[],cov:[5,6,11,18,20,23,24],cov_xi:[5,11,24],cov_xx:[5,11,24],cov_yi:[5,11,24],covari:[0,7,17,18,23],covariance_matrix:[5,11,14,24],cover:[0,5,17,21,22,24],covert:[0,23],covxi:20,covxx:20,covxz:20,covyi:20,covyz:20,covzz:20,cpj4mh7m9no:[],cpu:1,cpu_feature_guard:[],craft:3,crawford:23,creat:[1,2,3,4,5,6,9,10,11,12,13,17,23],create_biases_and_weight:1,create_convolutional_neural_network_kera:3,create_neural_network_kera:1,create_x:[5,11,24],credit:[0,7,21,23],crim:[0,24],crime:[0,24],criteria:[0,4,9,10,14,20,23],criterion:[9,10,13],critic:[6,23,24],cross:[0,1,3,7,9,10,13,17,20,23,24],cross_entropi:4,cross_val_scor:6,cross_valid:[7,10],crossvalid:6,crucial:[1,20],cs231:3,cs:[19,21],csr_matrix:[18,23],cstdlib:[],csv:[0,4,6,7,9,23],ctnk:1,ctx:[],cubic:0,cumbersom:5,cumsum:[10,11,23],cumul:[7,10,20],cumulative_heads_ratio:10,cup:5,current:[1,2,3,4,6,13,14,22],curs:[0,24],curv:[6,7,10,12],curvatur:13,custom:[6,14],custom_cmap2:[9,10],custom_cmap:[9,10],cutpoint:9,cv:[6,7,10],cvxbook:13,cvxopt:[5,8,24],cyber:[],cycl:[1,12],cyclotron:24,d1:[],d2:[],d2_g_t:2,d3:[],d670a873ab0c:[],d985fb40c43d:[],d:[1,2,3,4,5,6,7,8,9,10,11,13,14,18,20,21,23,24],d_f:13,d_g_t:2,d_net_out:2,da:3,dagger:[5,18,24],dai:[1,9,17],dalen:[],damp:3,daniel:[21,23],darget:9,darkr:20,dat:[0,23],dat_id:[0,6,7,9,23,24],data1:14,data2:14,data3:14,data4:14,data:[2,4,5,8,10,12,13,14,18,22],data_handl:[],data_id:[0,6,7,9,23,24],data_indic:1,data_modul:[],data_panda:23,data_path:[0,6,7,9,23,24],data_url:[],databas:1,databookuw:[],datafil:[0,6,7,9,23,24],datafram:[0,4,5,7,9,11,23,24],datapoint:[1,5,6,7,11,13,24],dataset:[0,4,6,7,8,9,10,11,13,14,15,16,23,24],datatyp:4,date:[15,16,23,24],daughter:10,david:22,dbh:1,dbo:1,dcomposit:18,ddot:2,dead:1,deadlin:[16,19],deal:[0,1,3,5,6,8,11,13,14,18,20,23,24],dealt:0,debt:7,debug:[0,5,6],decad:[0,3,23],decai:[0,13,20,23],decemb:[19,21,23],decent:10,decid:[0,2,3,5,6,9],decim:[0,23],decis:[0,1,8,11,17,22,23],decision_funct:8,decision_tre:9,decisiontreeclassifi:[9,10],decisiontreeregressor:[0,9,10],declar:[0,4,18,23],decompos:[5,6,18,24],decomposit:[0,6,12,23],decompost:[5,24],deconvolut:3,decor:[0,23],decorrel:[10,13],decreas:[1,2,4,5,6,10,11,13],deduc:[0,23],deep:[3,7,12,13,17,19,22,23,24],deep_neural_network:2,deep_param:2,deep_tree_clf1:9,deep_tree_clf2:9,deep_tree_clf:[9,10],deepen:[5,17,23],deeper:[0,3,4,23],deeplearningbook:22,deer:3,def:[0,1,2,3,4,5,6,7,8,9,10,11,13,14,20,23,24],def_covari:20,def_funct:[],default_tim:4,defect:[5,24],defici:[5,24],defin:[0,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,18,20,24],definit:[1,2,5,6,7,8,10,11,12,13,18,20,24],defint:20,defun:[],defvjp:2,degre:[3,5,6,8,9,10,11,15,16,20,23],del:1,delet:6,delimit:4,deliv:[19,23],delta:[0,2,3,6,8,12,13,14,23],delta_0:3,delta_1:3,delta_2:3,delta_3:3,delta_4:3,delta_5:3,delta_:[1,18],delta_h:[0,1,23],delta_j:[3,12],delta_k:12,delta_l:[1,3],delta_momentum:13,delta_n:[0,3,23],delug:17,delv:[0,23],demand:13,demonstr:[0,3,5,6,7,11,12,17,23,24],den:4,denomin:[1,5],denot:[1,2,6,7,13,20],dens:[1,3,4],dense_1:[],densiti:[0,2,6,20,23],depart:[21,23,24],depend:[0,1,2,4,5,6,7,8,11,12,13,15,17,18,20,23,24],depict:20,deploy:[0,15,17,23],deprec:[2,6,13,23],deprecate_nonkeyword_argu:[0,23],depth:[0,3,9,10,18],deriv:[0,1,2,6,7,8,10,11,13,16,17,23],derivati:13,derivative_fn:13,descend:[5,9,11,24],descent:[0,1,3,7,8,12,23,24],descr:[],describ:[0,2,4,5,6,8,10,11,12,13,18,23],descript:[0,8,9,23],design:[0,1,3,4,5,6,7,10,11,12,13,15,16,23],designmatrix:[0,23],desir:[0,2,4,5,13,14,23,24],despit:[1,12],destroi:18,det:[5,18,24],detail:[0,6,11,13,14,18,24],detect:[3,8,12],determin:[0,2,3,4,5,6,8,9,10,11,12,13,16,18,20,23,24],determinist:[7,13,20],dev:1,develop:[0,3,5,8,10,11,12,17,18,23,24],deviat:[0,1,2,4,5,6,20,23,24],device_nam:[],devis:12,df1:23,df:[4,8,11,13,23],di:[0,24],diag:[5,8,24],diagnost:[1,10],diagon:[0,5,7,13,18,20,23,24],diagonaliz:[5,24],diagram:10,diagsvd:6,dice:[6,20],dict:[6,8],dict_kei:[],dictionari:[0,24],did:[0,1,5,6,7,10,11,14,23],die:1,diff1:2,diff2:2,diff:2,diff_ag:2,diffeent:8,differ:[0,1,2,3,4,5,6,7,9,10,11,12,13,14,15,17,18,20,22,23,24],differenti:[0,3,16,17,18,23,24],differential_oper:[2,13],difficult:[0,1,6,10,13,20,23],difficulti:[0,1,13,23],diffonedim:2,digit:[0,1,3,4,6,19,21,23],dilemma:13,dilut:1,dim:[4,11,14,18],dimens:[0,1,2,3,4,5,8,11,14,16,18,23,24],dimension:[0,4,5,6,9,11,13,14,17,18,23],dimensionless:[0,3,23],diment:18,dimnsion:4,diod:3,direct:[0,1,2,4,11,12,13,14,23,24],directli:[1,4,5,6,20,24],directori:[],disabl:[3,4,14],disadvantag:[0,23],disappear:[3,6],disc_loss:4,disc_tap:4,discard:[6,11],disciplin:[0,3,12,23],disclaim:20,discord:23,discourag:13,discov:[0,23],discover:5,discret:[1,3,5,7,13],discrimin:[4,7,10,11],discriminator_loss:4,discriminator_loss_list:4,discriminator_model:4,discriminator_optim:4,discuss:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,20,22,23,24],diseas:7,disguis:[6,24],disord:[1,7],displai:[0,1,3,4,5,6,7,8,9,10,11,12,14,20,23,24],displaystyl:[0,5,23,24],displot:[],disregard:[0,23],dissimilar:[11,14],dist:14,distanc:[0,8,9,11,14,20,24],distance_list:9,distinct:[3,7,8,9,10,14],distinctli:8,distinguish:[0,4,7,8,20,23],distplot:[0,24],distribut:[0,1,4,6,7,10,11,13,14,15,16,17,18,23,24],distrubut:[0,15,17,23],div:[],dive:[0,8,18,23],diverg:[1,13],divid:[0,1,3,5,6,7,8,9,11,12,20,23,24],divis:[6,8,9,13,18,20],dna:7,dnn1:4,dnn2_gru2:4,dnn:[0,1,2,4,12,23],dnn_kera:1,dnn_model:1,dnn_numpi:1,dnn_scikit:[0,1,23],doc:[0,6,17,19,21,22,23,24],document:[4,7,11,13],doe:[0,1,2,3,4,5,6,8,10,11,12,13,16,18,20,23],doesn:[3,9,12],dog:[1,3,4],domain:[5,8,13],domin:[0,23],don:[0,1,3,5,6,8,11,13,15,17,23,24],done:[0,2,3,4,5,6,9,10,11,13,18,23,24],dot:[0,2,3,5,6,7,8,9,10,11,12,13,18,20,23,24],doubl:[3,4,18,23],doubli:1,down:[0,3,6,9,11,12,13,23],download:[0,1,3,5,6,18,22,23],downsampl:3,dozen:1,dq:6,drag:13,dramat:11,drastic:4,draw:[4,6,10,13],drawback:[0,1,3,13,24],drawn:[1,4,6,7,11,20,23],drive:[3,4],driven:3,drop:[0,1,5,6,11,13,20,23,24],dropna:[0,6,23],dropout:4,ds:[],dt:[2,3,13,20],dtype:[0,1,2,3,4,14,18,23],dualiti:6,dub:[0,23],due:[1,2,5,6,8,10,12,13,21,23,24],dummi:[0,24],dure:[0,1,3,4,8,9,11,17,23],dwell:[0,24],dwh:1,dwo:1,dx:[2,3,8,20],dx_1:20,dx_1p:6,dx_2p:6,dx_mp:6,dx_n:20,dxp:6,dy:[1,8,20],dynam:4,dysth:[],dz:8,e7cu:[],e:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,20,21,23,24],e_:[0,2,23],each:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,17,18,19,20,21,23,24],eager:[],eapprox:[0,23],earli:[1,13],earlier:[0,5,7,8,9,11,12,13,23,24],earthexplor:6,eas:[6,9,14],easi:[0,5,6,7,8,9,10,11,12,13,17,18,23,24],easier:[5,6,8,9,13,20,23,24],easiest:13,easili:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,18,23,24],eastern:[21,23],ebind:[0,23],eblock:9,econometr:23,economi:5,ecosystem:[17,23],ect:19,edg:3,edgecolor:6,edu:13,educ:[0,23],eface79dac2c:[],eff:20,effect:[1,4,10,13,20],effic:1,effici:[0,3,10,13,17,18,20,23],efron:6,egrad:13,eig:[5,11,13,18,20,23,24],eigen:20,eigenpair:[5,11,24],eigenvalu:[0,5,8,11,13,18,23,24],eigenvector:[5,11,13,24],eight:[18,23],eigval:[18,20,23],eigvalu:[11,13],eigvec:[18,20,23],eigvector:[11,13],eispack:[18,23],either:[1,5,6,7,8,9,10,11,13,15,16,20,23,24],ekstrom:[],elabor:20,elarn:3,electr:[0,3,12,23],electron:23,electur:[],eleg:11,element:[1,2,3,4,5,6,7,8,11,12,13,17,18,19,22,24],elementari:[10,13,18],elementwis:[3,13],elementwise_grad:[2,13],elessar:23,elif:[2,14],elim:18,elimin:[3,8],els:[1,2,3,4,7,9,12,13,18],elu:1,elus:[0,23],email:[19,21,23],embed:[0,11,24],embodi:6,emit:20,emner:22,emphas:[0,10,17,23],emphasi:[0,17,22,23],empir:[1,11,20],emploi:[0,1,5,6,11,13,20,23,24],employ:[0,23,24],empti:[6,10],emul:12,en:[17,22],enabl:11,enbodi:6,encod:[0,3,5,9,11,14,23,24],encompass:[0,20,23],encount:[0,1,5,6,7,13,20,23,24],end:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,16,18,20,21,23,24],end_box:[2,13],end_nod:[2,13],end_valu:[2,13],endl:[],endpoint:[3,6],energi:[0,4,6,24],enet_coordinate_desc:6,enforc:12,eng:22,engin:[0,1,3,4,17,23],english:[],enorm:3,enough:[0,6,13,23],ensembl:[1,9],ensur:[0,1,2,3,5,6,11,13,20,24],ensure_initi:[],entail:23,enter:[5,6,24],enthought:[0,15,17,23],entir:[1,3,7,9,17,20,23],entiti:[9,12,18,23],entri:[0,5,8,11,12,18,23,24],entropi:[1,3,7,10,13,23],enumer:[0,1,2,3,4,6,8,23,24],env:[0,1,2,3,4,6,7,8,11,13,14,20,23],environ:[2,17],eo:[0,6,23],eol:[0,23],eosfit:[0,23],epoch:[0,1,3,4,12,13,23],epsilon:[0,5,6,7,13,23,24],epsilon_0:[0,23],epsilon_1:[0,23],epsilon_2:[0,23],epsilon_:[0,23],epsilon_i:[0,23,24],eq:[3,13,14,18,20],eqnarrai:[3,5,6],equal:[0,1,2,3,4,5,6,8,9,11,12,13,14,15,18,20,23,24],equat:[1,3,4,5,6,7,8,9,10,11,13,14,16,18,20],equilibrium:[2,12],equiv:[3,13,18,20],equival:[0,1,5,7,8,11,13,17,18,23,24],erf:20,eriador:23,eridg:23,err:[0,10],err_:6,err_sqr:2,errat:13,errno:[],erron:2,error:[1,2,4,5,6,7,9,11,12,13,15,16,17,18,20],error_estimate_corr_tim:20,error_handl:[],error_hidden:1,error_output:1,escap:13,especi:[1,3,9,12,13],essenti:[0,5,6,9,10,12,14,20,24],establish:[0,6,10,11,15,23],estim:[0,1,5,6,7,10,11,13,17,20,23,24],estimated_mse_fold:6,estimated_mse_kfold:6,estimated_mse_sklearn:6,et:[0,2,4,15,16,22,23,24],eta0:[8,13],eta:[0,1,3,8,12,13,23],eta_:13,eta_t:13,eta_v:[0,1,3,23],etc:[0,1,3,5,7,8,9,11,12,13,14,15,17,18,20,24],ethic:[17,23],etsim:[],euclidean:[0,14,24],evalu:[0,2,3,4,5,6,9,13,20,23,24],evalut:13,even:[0,1,3,4,5,6,8,9,10,11,12,13,14,17,18,20,23,24],evenli:4,event:[5,7,10,20],eventu:[0,5,6,11,12,13,21,24],everi:[0,1,2,3,4,5,6,9,10,11,12,13,14,17,20,21,23,24],everyth:[4,12],everywher:[4,13],evolv:[0,23],exact:[0,2,5,11,12,13,18,20,23,24],exactli:[0,3,4,6,12,17,24],exam:23,examin:6,exampl:[5,11,12,13,15,16,17,18,20,22],exce:[1,12,13],excel:[0,1,4,5,10,23,24],except:[3,4,6,8,9,18],excess:[0,23],excit:[0,23],exclud:[1,6,12,24],exclus:[0,1,3,6,20,23],execut:[2,5,13,24],executing_eagerli:[],exemplifi:13,exercic:[21,23],exercis:[5,17,19,21],exhaust:6,exhibit:[0,5,6,8,23,24],exist:[0,1,2,3,5,6,7,8,9,13,18,23,24],exit:[5,18,24],exp:[0,1,2,5,6,7,8,10,11,12,13,15,16,20,23,24],exp_term:1,expand:[5,7,11,13,24],expans:[0,3,5,8,10,12,13,23,24],expect:[0,1,5,6,7,11,12,13,15,16,17,23,24],expectation_value_of_h_wrt_p:20,expens:[6,10,13],experi:[0,1,6,8,13,17,23,24],experiment:[0,3,4,6,9,14,20,23],experimental_get_tracing_count:[],expert:[1,9],explain:[0,6,9,10,11,13,23],explained_variance_ratio_:11,explanatori:[0,23],explicit:[0,3,6,13,18,23,24],explicitli:[0,4,23],explod:1,exploit:[0,3,12,13,23],explor:[1,4,6,8,13,17],expon:1,exponenti:[0,1,5,6,10,13,20,23],export_graphviz:9,export_text:9,exporttext:9,expos:[17,23],express:[0,2,3,5,6,7,10,12,13,16,18,20],exptmean:20,exptvari:20,extend:[0,2,7,11,13,17,23],extens:[0,12,15,17,23],extent:[0,1,6,22,23],extern:[3,6,9],extra:[1,3,5,21,23,24],extract:[0,3,5,6,7,8,11,13,18,23,24],extrapol:[0,23],extrem:[0,1,4,5,6,7,8,9,13,16,18,24],extremum:13,extrins:11,ey:[0,5,6,13,14,18,23],f11:[0,23],f12:[0,23],f13:[0,23],f1:13,f1_grad:13,f1d:13,f2:13,f2_grad_x1:13,f2_grad_x1_analyt:13,f2_grad_x2:13,f2_grad_x2_analyt:13,f3:13,f3_grad:13,f3_grad_analyt:13,f3ckh:[],f4:13,f4_grad:13,f4_grad_analyt:13,f5:13,f5_grad:13,f6:13,f6_for:13,f6_for_grad:13,f6_grad_analyt:13,f6_while:13,f6_while_grad:13,f6d7a289d493:[],f7:13,f7_grad:13,f7_grad_analyt:13,f8:13,f8_grad:13,f9:[0,13,23],f9_altern:13,f9_alternative_grad:13,f9_grad:13,f:[0,1,2,3,4,5,6,7,8,10,12,13,14,16,18,20,21,23,24],f_0:[3,10],f_1:[10,13],f_2:[12,13],f_3:12,f_:10,f_d:20,f_grad:13,f_grad_analyt:13,f_i:[0,6,12,16],f_m:[3,10],f_n:3,f_raw:2,f_vec:2,f_wrap:2,face:13,facecolor:[6,8,20],facil:[0,15,17,23],facilit:12,fact:[0,1,3,5,9,11,12,13,23,24],factor:[0,1,3,5,6,9,10,11,13,18,20,23,24],factori:13,fade:6,fafab0:[9,10],fahimeh:[21,23],fail:[0,6,7,8,11,13,21,23],failur:7,fairli:[1,2,20],fake:4,fake_loss:4,fake_output:4,fall:[8,9,19],fals:[0,1,2,3,4,5,6,7,9,10,14,18,23,24],famili:[0,7,8,20],familiar:[0,3,5,6,8,15,17,18,20,23],famou:[6,12],far:[0,3,4,5,6,8,11,12,13,14,23,24],fashion:[0,9,10,23],fast:[1,3,6,10,12,13,17,20,23],faster:[1,11,13],fastest:[13,18],favor:7,favorit:20,fc:3,fdf8a5d7c717:[],fdfcc778e1f8:[],fe5b9d300cc0:[],featur:[0,1,3,5,6,7,8,10,11,12,13,17,20,23],feature_nam:[0,1,7,9,24],feautur:9,fed:1,feed:[0,2,3,11,17,23],feed_forward:1,feed_forward_out:1,feed_forward_train:1,feedback:[4,23],feeddorward:4,feedforward:[1,4,12],feel:[0,5,6,11,13,15,16,17,21,23],feet:[0,24],fei:23,fetch:6,fetch_california_h:[],fetch_openml:[],few:[1,3,4,5,9,20,23],fewer:[0,9,11,23],ffnn:[1,12],fgakzw6k1qq:[],field:[0,3,6,12,17,23],fifth:[0,6,15,16,23],fig:[0,1,2,3,4,6,7,12,13,14,23],fig_id:[0,6,7,9,23,24],figaxi:20,figsiz:[0,1,2,3,4,6,7,8,9,10,23,24],figur:[0,1,2,3,4,5,6,7,8,9,10,12,13,14,15,16,17,23,24],figure_id:[0,6,7,9,23,24],figurefil:[0,6,7,9,23,24],file:[0,2,3,4,5,6,7,9,13,14,23,24],file_prefix:4,filenam:23,filenotfounderror:[],fileout:[],filepath_or_buff:[0,23],fill:[5,9,24],filter:[3,4],filtered_flat_arg:[],filtered_tb:[],financ:[0,23],find:[0,1,2,3,5,6,7,8,9,10,11,12,13,14,15,16,17,20,23,24],find_top_boxed_arg:2,fine:[0,14,15,23],finish:2,finit:[3,5,6,12,13,20,24],first:[0,1,2,3,5,6,7,8,9,10,11,13,14,15,16,18,20,21,22],firsteigvector:11,fit:[1,3,4,5,6,7,8,9,11,12,13,15,16,20,24],fit_beta:[6,24],fit_intercept:[0,5,6,24],fit_mod:9,fit_transform:[0,6,8,9,11],fiti:[0,23],five:[0,9,23,24],fix:[0,3,4,6,10,11,12,13,23],fixedformatt:6,fixedloc:6,fkkt:[],flag:4,flat:[12,13],flatbuff:[3,4,14],flatten:[1,3,4,5,18],flexibl:[1,6,8,10,12,23],flip:[21,23],float32:[4,9],float64:[4,18,23],flop:[5,18,24],flow:[1,4,12],fluctuat:5,fly:11,flyvbjerg:[],fm:[0,23],fma:[],fmax:3,fmesh:13,fn:7,focu:[0,3,4,5,6,15,17,22,23,24],focus:[1,6,7,18,24],fold:[6,9],folder:[0,1,4,6,13,23],follow:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24],font:[0,7,20,23],fontdict:20,fontsiz:[1,6,8,9,10,20],fontweight:1,footprint:3,foral:[8,24],forc:[0,5,6,10,11,23,24],forcast:4,forecast:[4,12],forelesningsvideo:[],forest:[0,1,9,17,23],forget:11,form:[0,3,4,5,6,7,8,9,11,12,13,17,18,20,23,24],formal:[3,4,14,20],format:[0,1,2,3,4,6,7,8,9,10,11,17,20,22,24],format_data:4,formatstrformatt:[6,13],formul:[4,6,11,14],formula:[3,13,20],forth:[4,12],fortran2003:[17,23],fortran90:20,fortran:[0,15,17,18,23],fortun:[0,11,24],forward:[0,3,6,17,18,23],forward_backward:[],forward_compatibility_horizon:[3,4,14],found:[1,2,4,5,6,12,13,23,24],foundat:[17,23],four:[4,5,6,8,12,18,19,21,23],fourier:[0,23],fourierdef1:3,fourierdef2:3,fourierseriessign:3,fourth:[12,23,24],fp:7,fr:[],frac:[0,1,2,3,5,6,7,8,9,10,11,12,13,14,15,16,18,20,23,24],fractal:[],fraction:9,frame:[7,23],framework:[1,8,10,20],frank:[5,11],frankefunct:[5,6,11,24],fredli:[21,23],free:[0,6,11,13,15,16,17,18,20,21,22,23],freecodecamp:17,freedom:5,freeli:[0,23],frequenc:[3,6,7,20],frequent:[0,8,9,13,23],frequentist:17,fresh:10,frida:[],fridai:[16,21,23],friedman:[6,19,22,23,24],friendli:4,frodo:23,frog:3,from:[0,1,2,3,4,6,7,8,9,11,13,14,16,17,18,20,21,22,23],from_cod:9,from_logit:[3,4],from_tensor_slic:4,fromnumer:2,front:[0,4,5,15,16,23,24],fstream:[],fulfil:[2,5,12,24],full:[0,1,3,5,7,9,10,13,20,23,24],full_matric:[5,24],fulli:[3,6,12,19,20],fun:[2,13,17,23],fun_nam:[],func:[0,2,23],functionali:11,functool:[3,4,14],fundament:[0,6,17,23],funtion:2,further:[2,7,9,23],furthermor:[0,3,5,6,7,11,12,13,17,23,24],futur:[0,4,8,9,23],futurewarn:[0,23],fx:[],fy:[15,19,21,22,23],fys5419:[22,23],fys5429:[22,23],g0:2,g42mrgv128v34gnnhxwk9nrc0000gp:[],g:[0,1,2,3,4,6,8,9,10,11,13,14,20,23],g_0:2,g_1:[2,10],g_2:[2,10],g_:[2,9,10],g_analyt:2,g_dnn_ag:2,g_euler:2,g_i:2,g_m:[3,10],g_n:3,g_re:2,g_t:2,g_t_d2t:2,g_t_d2x:2,g_t_dt:2,g_t_hessian:2,g_t_hessian_func:2,g_t_jacobian:2,g_t_jacobian_func:2,g_trial:2,g_trial_deep:2,g_vec:2,gain:[1,5,7,9,10,13,24],galleri:[0,23],game:4,gamge:23,gamma1:8,gamma2:8,gamma:[0,2,8,9,10,11,13,23],gamma_0:10,gamma_1:10,gamma_1x:10,gamma_:[0,23],gamma_i:[0,8,20,23],gamma_j:13,gamma_k:13,gamma_m:10,gamma_x:[0,23],gap:[6,8],gate:[4,12],gather:[0,1,12,24],gaug:12,gaussbacksub:18,gaussian:[4,5,6,8,14,20],gaussian_point:14,gaussian_rbf:8,gave:13,gbc:[19,23],gca:[2,6,8,13],gd:1,gd_clf:10,gdclassiffiercgain:10,gdclassiffierconfus:10,gdclassiffierroc:10,gdm:13,gdregress:10,ge:[1,5,7,20,24],gemv:[],gen:[],gen_loss:4,gen_tap:4,gender:[0,23],genener:4,gener:[0,1,2,3,5,6,8,10,11,12,13,14,15,16,18,20,22,24],generallay:12,generate_and_save_imag:4,generate_imag:4,generate_latent_point:4,generate_simple_clustering_dataset:14,generated_imag:4,generator_loss:4,generator_loss_list:4,generator_model:4,generator_optim:4,genexpr:[],genom:17,geodes:11,geometr:[0,13,23],geometri:5,georg:22,geotif:6,geq:[2,5,8,9,13,24],geron:[0,15,19,22,23],get:[0,1,2,3,4,5,6,7,9,10,11,13,15,17,18,20,21,23,24],get_dummi:9,get_loc:[],get_next_color:[],get_paramet:2,get_split:9,get_yaxi:8,get_yticklabel:6,getsolutionslic:[],getval:[],gg:[],gibb:[17,23],gif:4,gini:10,gini_index:9,ginvers:13,git:[0,15,17,23],giter:13,github:[0,6,15,17,19,21,22,23,24],gitlab:[0,15,17,23],give:[0,1,2,3,5,6,7,8,9,10,12,13,14,17,20,23,24],given:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,18,20,23,24],global:[6,7,13],glorot:1,gmail:[],gnew:13,go:[0,1,3,5,6,8,9,11,12,13,23,24],goal:[0,7,9,23],goe:[0,1,2,5,6,13,14,18,23,24],golden:13,gone:[5,24],gong:1,good:[1,3,4,5,6,9,10,11,13,17,20,22,24],goodfellow:[4,19,22,23,24],googl:[1,4,17,23],got:[1,6],gov:6,gp:22,gpu:[1,13,17,23],grad:[2,13],grad_analyt:13,grade:19,gradient:[0,3,4,7,8,9,12,17,23,24],gradient_desc:[],gradientboostingclassifi:10,gradientboostingregressor:10,gradients_of_discrimin:4,gradients_of_gener:4,gradienttap:4,gradual:[1,14],grai:[4,6],graph:[1,9,11,12,13],graph_debug_info_pb2:[3,4,14],graph_from_dot_data:9,graph_funct:[],graphic:[0,1,9,23],grasp:[0,23],gray_r:[1,3],grayscal:3,great:[5,13],greater:[1,7,20],greatli:13,greedi:9,green:[0,3,9,20],grei:4,grid:[1,3,6,7,8,12,20,24],grossli:13,ground:[0,23],group:[0,6,7,9,14,17,19,21,23],groupbi:[0,23],grow:[1,3,9,10],growth:[0,23],gru:4,guarante:[0,4,13,20,23,24],guess:[1,4,10,13,14],guestrin:10,guid:1,guilherm:[],h1:2,h21:[],h:[0,1,5,6,8,13,16,20,21,22,23,24],h_1:[2,13],h_2:[2,13],h_:[0,13,23],h_m:10,ha:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,16,18,20,23,24],haa:[21,23],habit:[0,24],had:[0,1,6,7,13,23],hadamard:[1,12,13],half:[1,8,9],halv:10,hand:[0,1,2,3,5,11,12,13,15,17,18,19,20,21,22,23,24],handi:3,handl:[0,1,2,5,9,11,17],handle_unknown:9,handsid:12,handwrit:12,handwritten:[1,5,23],handwrittennot:23,happen:[1,2,3,4,5,6,10,13,20,24],hard:[1,7,8,10,13],hardcopi:[17,23],harder:[0,1,24],harmon:3,hasn:1,hassl:[0,15,17,23],hast:[17,23],hasti:[0,6,15,16,19,22,23,24],hat:[0,1,5,6,7,9,10,11,12,13,18,24],have:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,20,21,24],haven:1,hdtta7prrfi:[],he:7,head:[0,4,10,20,24],header:[0,23],heads_proba:10,health:[0,24],hear:[0,13,23],heart:[0,7,23],heatmap:[0,1,3,7,23,24],heavili:[0,23],heavisid:1,height:[1,3,6,24],held:13,help:[0,1,4,12,13,16,23],helper:[4,14],henc:[0,5,6,8,9,10,12,13,23,24],henrik:[21,23],her:7,here:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,20,23,24],hereaft:[0,8,12,23],hermitian:18,hessenberg:18,hessian:[0,2,5,13,16],heterogen:[9,10],hi:7,hidden:[1,3,4,12],hidden_bia:1,hidden_bias_gradi:1,hidden_layer_s:[0,1,23],hidden_neuron:4,hidden_weight:1,hidden_weights_gradi:1,hierarch:[5,24],high:[0,1,2,3,4,5,6,9,10,11,13,14,17,18,23,24],higher:[0,1,3,5,6,8,13,23,24],highest:[1,2],highli:[0,3,4,10,17,18,22,23,24],highwai:[0,24],hing:8,hint:[13,16,24],hip:17,hire:[0,23],hist:[4,6,7,20],histogram:[0,6,7,20,24],histor:[7,11],histori:[3,4,12],histplot:[],hit:[],hitherto:5,hjorth:[21,23,24],hm6ay5ds6o0:[],hobbi:20,hoc:[5,24],hoff:22,hold:[1,3,6,13,14],holder:[0,23],holomorphic_grad:[2,13],home:[0,24],homepag:23,homework:[6,13],homogen:[1,3,9,10,13],honchar:2,hopefulli:[0,11,20,23],horizont:11,hors:[3,7],hot:[1,9],hour:[1,17,19,20,21,23],house_pric:[],how:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,17,18,20,23,24],howev:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,17,18,20,23,24],hs:[],hspace:[0,4,8,10,20,23],hstack:1,htf:[19,23],html:[0,7,11,17,19,21,22,23,24],http:[0,3,4,6,7,11,13,17,18,19,21,22,23,24],huang:[0,23],huber:[0,23],huge:[1,3,4,17],human:[0,1,3,6,9,12,23,24],humid:9,hundr:1,hungri:1,hybrid:19,hydrogen:[0,23],hyperbol:[1,4,12],hyperparam:8,hyperparamet:[3,4,5,6,9,13,23,24],hyperplan:11,i0:[0,23],i1:[0,6,8,12,23,24],i2:[0,8,12,23],i3:[0,12,23],i5:[0,23],i:[0,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,18,20,21,23,24],i_1:[5,6],i_2:[5,6],i_:13,ian:22,ic:1,id:[7,13],ida:[21,23],idea:[0,1,2,3,4,6,9,10,12,13,18,23,24],ideal:[0,2,6,8,13,20,23,24],idem:6,ident:[5,6,12,13,18,24],identical:[],identifi:[0,1,7,9,11,12,13,14,23,24],idum:[],ieor:20,ifi:22,ifs:[17,23],ignor:[0,1,3,9,24],ii:[18,20],iii:[18,23],ij:[0,1,3,6,8,12,14,16,18,20,23,24],ik:[0,18,23,24],illustr:[5,7,10,12,13,14,17,23],im:6,imag:[1,3,4,6,9,11,12,14,22,23],image_at_epoch_:4,image_batch:4,image_height:3,image_path:[0,6,7,9,23,24],image_width:3,imageio:6,imagenet:23,images_from_seed_imag:4,imagin:1,immedi:[0,3,4,6,15,17,23],implement:[0,2,3,4,5,6,8,9,10,11,12,13,14,20,23,24],impli:[3,5,6,7,13,18,24],implicit:3,implicitli:[11,20],importantli:3,impos:[0,6,11,12,23],imposs:[0,5,23,24],impress:[0,12,23],improv:[0,4,5,9,10,11,13,24],impur:9,imread:6,imshow:[1,3,4,6],in3050:[22,23],in3310:23,in4080:[22,23],in4300:[22,23],in4310:22,in5400:3,in5550:22,in_out_neuron:4,inaccur:13,inacio:[],inact:12,inadequ:[0,23],inch:[6,24],includ:[0,1,2,3,4,5,6,7,11,12,15,16,17,20,21,22,23,24],include_bia:[6,9],incom:12,incorrect:1,incoveni:8,increas:[0,1,3,4,5,6,7,8,9,11,12,13,20,23,24],increasingli:20,ind:6,inde:[0,2,4,5,6,13,23,24],indefinit:4,indent:[],indentationerror:[],independ:[0,5,6,7,8,12,13,20,23,24],index:[0,1,3,4,10,14,17,18,20,22,23,24],index_col:[0,23],index_of:[],indic:[0,1,3,4,5,6,9,10,11,13,16,23,24],indispens:6,individu:[1,6,7,10,12,20,23,24],indu:[0,24],indx1:2,indx2:2,indx3:2,indx:18,ineffici:[3,13],inequ:[8,13],inequaltii:[],inertia:13,inf1000:[17,23],inf1100:[17,23],inf1100l:[17,23],inf1110:[17,23],inf3000:23,inf4490:[],inf5860:[],infeas:9,infer:[0,1,4,6,22,23],infer_nrow:[0,23],inferenc:1,infil:[0,6,7,9,23],infin:[5,6,7,11,24],infinit:3,infinitesim:20,influenc:[6,10],influenti:1,info:23,inform:[0,1,3,4,6,9,11,12,13,14,18,22,23],infti:[3,6,13,20],ingeni:13,ingrad:2,ingredi:[0,9,23],inher:6,inherit:[18,23],initi:[0,1,2,6,10,13,14,18,20,23],initial_epoch:[],initialis:[],initialize_root:[],inject:14,inlin:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,18,20,23,24],inner:[0,13,24],innov:[],inp:4,inplac:13,input:[0,1,3,4,5,6,7,8,9,10,12,13,14,15,20,23,24],input_dim:1,input_shap:[3,4],inputs:1,inputs_shuffl:[0,1,24],insert:[3,5,6,8,10,20,24],insid:[0,4,7,24],insight:[0,1,5,17,23,24],insist:[6,13,24],inspir:[0,1,12,23],instabl:2,instal:[0,1,5,6,9,15],instanc:[0,1,2,4,6,9,11,13,23,24],instanti:10,instead:[0,1,2,3,4,5,6,8,9,11,13,14,18,20,23,24],institut:1,instruct:[0,1,15,16,23],int32:10,int64:[],int64index:23,int_0:20,int_:[3,6,20],int_a:20,intak:[0,24],integ:[1,2,13,14,18,20,23],integer_vector:1,integr:[3,6,20,23],intellectu:23,intellig:[0,14,22,23],intend:[10,23],intens:1,intention:14,interact:[0,6,9,12,17,23],intercept:[0,6,8,11,13,16,23],intercept_:[0,6,8,9,13,23,24],interchang:[5,12,18],interconnect:1,interest:[0,1,2,3,4,5,6,7,8,9,12,17,20,23,24],interfac:[0,1,18,24],interior:[0,9,23],intermedi:[18,24],intern:[1,10,12],interpol:[1,3,4,6,12],interpr:[5,24],interpret:[0,1,3,4,6,9,10,12,13,14,18,20],interv:[0,3,5,6,7,13,20,23,24],intial:13,intract:[0,4,24],intrins:[3,11,18,20,23],intro:[17,22,23],introduc:[0,1,5,6,8,10,12,18,20,23],introduct:[1,2,4,13,22,24],introductori:[0,4,18,22,23,24],intuit:[0,5,6,8,12,13,23],inv:[0,5,13,23,24],invalid:1,invalu:[0,13,15,17,23],invari:1,invd:5,inver:8,invers:[0,3,6,13,15,16,23,24],invers_period:[],inverse_transform:8,invert:[0,5,7,10,13,23],invh:13,invok:[0,8,24],involv:[0,2,6,7,11,12,24],io:[0,17,19,21,22,23,24],iomanip:[],iostream:[],ip:[0,8,20,23],ipca:11,ipykernel_41811:6,ipykernel_42331:[],ipykernel_42376:[],ipykernel_42449:[],ipykernel_42456:[],ipykernel_42530:[],ipykernel_42541:[],ipykernel_42553:[],ipykernel_42573:[],ipykernel_42580:[],ipykernel_42586:[],ipykernel_47411:[],ipykernel_47448:[],ipykernel_47647:[],ipykernel_47724:[],ipykernel_47735:[],ipykernel_65914:23,ipykernel_9414:13,ipykernel_94478:1,ipykernel_94529:[],ipykernel_94582:[],ipykernel_96694:[],ipynb:[17,23],ipython:[0,5,7,9,11,14,15,17,23,24],iq:6,iri:[8,9],irreduc:6,irrelev:[5,24],irrespect:[0,23],is_integ:[],isbox:[2,13],iscomplexobj:[],isinst:[],isn:5,isnul:[0,24],isomap:11,isotop:23,issu:[1,9,18],it_arrai:13,item:[0,13,23],items:[18,23],iter:[1,2,4,6,7,8,11,13,14,20],itr:[],its:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,17,18,20,23],itself:[5,6,12,20,24],ix:[],j1:18,j:[0,1,2,3,4,5,6,8,9,11,12,13,14,16,18,20,22,23,24],j_:6,j_lasso_sk:6,j_ridge_sk:6,j_sk:6,jackknavg:[],jackknif:[6,17,23],jackknstd:[],jackknvar:[],jackknvec:[],jacobian:[2,13],jacobian_shap:2,jakobsen:[21,23],jargon:[],jason:4,jax:[17,23],jensen:[21,23,24],jerom:22,jhfgq77fpq:[],ji:[12,18],jit:13,jj:[0,5,6,23],jk:[0,1,6,12,18,23],jl:[0,23],jm:18,jnp:13,joao:[],joaogca:[],job:[2,8,10],join:[0,4,6,7,9,23,24],joint:[4,5],journal:[],judg:13,judgement:6,julia:[17,18],jump:20,junk:4,jupit:23,jupyt:[0,15,17,22,23],just:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,17,20,23,24],justif:[0,23],justifi:[3,10],jy:[],jydg2xzka5:[],k0:7,k1:7,k:[0,1,3,5,6,7,8,9,10,11,12,13,14,17,18,20,21,23,24],kaggl:6,kappa_d:20,karim:[],karl:[21,23],karlsen:[],karush:8,kate:23,katrin:[21,23],keep:[0,1,4,5,6,11,13,14,18,23,24],keepdim:[1,6,10,18],kei:[0,1,3,6,12,24],kept:[4,6,14],kera:[0,4,17,23],kernel:[0,1,3,17,23,24],kernel_regular:[1,3],kernel_s:4,kernelpca:11,kev:[0,23],kevin:[22,23],keyboardinterrupt:2,keyerror:[],keyword:[6,13,18,23],kfold:6,kg:1,ki:18,kick:[1,13],kiener:2,kilomet:[6,24],kind:[0,2,3,4,8,12,13,14,23,24],kj:[6,12,18,24],kjm:[17,23],kkt:8,kktsolver:[],kl0m3:[],kl:20,km:[12,23],kmean:14,kmeanspoint:14,kn_k:14,know:[0,1,2,5,6,8,13,17,23,24],knowledg:[0,17,23],known:[1,3,4,5,6,7,8,9,12,18,20,22,24],kondev:[0,23],kp:20,kpca:11,kroneck:14,kuhn:8,kutz:[],kvalsund:[21,23],kwarg:[0,2,13,23],kwd:[0,23],kwown:[0,23],l0:7,l1:[0,1,3,7,23],l1_l2:[1,3],l1regl:5,l1regls_mosek2:[],l1regls_mosek:[],l2:[1,3],l:[0,1,2,3,5,6,7,8,10,11,12,13,18,20,23,24],l_1:7,l_2:[7,13],l_:18,l_j:12,la:13,la_i:12,la_k:12,lab:[17,23],label:[0,1,2,3,4,5,6,7,8,9,10,12,13,14,17,18,20,23,24],label_prob:[],labelencod:[7,10],labels:[6,8,9],labels_shuffl:[0,1,24],laboratori:[19,24],lack:[0,23],lagari:2,lagrang:[8,11],lambda:[0,1,2,3,5,6,7,8,10,12,13,20,23,24],lambda_0:11,lambda_1:[5,8,11,24],lambda_2:[8,11],lambda_:11,lambda_i:[8,11],lambda_iy_i:8,lambda_jy_iy_j:8,lambda_k:8,lambda_n:[5,8,24],lamda:1,lamdbda:[],land:[0,8,24],landmark:8,landscap:13,langl:[0,6,11,20,23,24],languag:[0,1,4,8,15,17,18,22,23],lapack:[18,23],laplac:5,laptop:17,larg:[0,1,2,4,5,6,8,9,10,11,13,15,17,18,20,22,23,24],larger:[0,3,5,6,8,10,11,13,20,23,24],largest:[4,8,11],lasso:[0,7,17,23],lasso_sk:6,last:[0,1,2,3,4,5,6,7,8,9,10,12,13,14,15,18,20,21,23],latent:4,latent_dim:4,latent_point:4,latent_space_value_rang:4,later:[0,1,4,6,7,8,12,13,14,15,17,23],latest:[4,17],latest_checkpoint:4,latex:23,latter:[0,3,6,7,8,11,13,16,18,20,23,24],lattic:12,law:[0,23],layer:[0,4,13,14,23],lbfg:[7,9,10,11],lcc:[5,6],lda:11,ldot:[0,6,11,23],le:[5,7,10,13,20,24],lead:[0,1,3,5,6,7,8,9,10,11,12,13,16,18,20,23,24],leaf:9,leaki:1,leakyrelu:4,lear:13,learn:[3,4,5,6,7,8,9,10,12,18,19,21,22],learnabl:3,learner:10,learnig:23,learning_r:[8,10],learning_rate_init:[0,1,23],learning_schedul:13,least:[0,2,7,8,10,11,15,16,17,18,20],leat:13,leav:[0,1,3,5,6,9,11,23],lectur:[0,1,5,10,11,12,13,15,17,18,19,21,22],lecturenot:[0,17,22,23],lecturenovember11:[],lecturenovember12:[],lecturenovember19:[],lecturenovember25:[],lecturenovember26:[],lecturenovember4:[],lecturenovember5:[],lectureoctober14:[],lectureoctober15:[],lectureoctober1:[],lectureoctober21:[],lectureoctober22:[],lectureoctober28:[],lectureoctober29:[],lectureoctober7:[],lectureoctober8:[],lectureseptember10:[],lectureseptember16firstpart:[],lectureseptember16secondpart:[],lectureseptember17:[],lectureseptember23:[],lectureseptember24:[],lectureseptember2:[],lectureseptember30:[],lectureseptember3:[],lectureseptember9:[],lecturethursdayaugust26:[],lecturethursdayaugust27:[],left:[0,1,2,3,5,6,7,8,9,10,11,12,13,14,16,18,20,23,24],leftarrow:[8,12],legend:[0,2,3,4,5,6,7,8,9,10,13,23,24],len:[0,1,2,3,4,5,6,8,9,10,11,12,18,23,24],len_index:[0,23],length:[0,1,2,3,4,8,9,13,16,17,23,24],length_of_sequ:4,leq:[0,5,7,8,13,14,20,23,24],less:[0,1,3,4,5,6,8,9,13,17,20,23,24],lessen:1,let:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,18,20,23,24],letter:[0,16,18,20,23,24],level:[0,1,5,6,9,17,18,19,21,23],li:[8,11,23],lib:[0,1,2,3,4,6,7,8,11,13,14,23],liblinear:[8,10],librari:[0,1,2,3,4,5,6,9,10,11,15,18,20,22,24],licens:[0,1,15,17,23],lie:[0,6,11,20,24],life:[0,1,8,12,23],lifetim:13,like:[0,1,2,3,4,5,6,7,9,10,11,12,13,15,16,17,18,20,23,24],likelihood:[0,1,5,9,23,24],lim_:20,lima:[21,23],limit:[0,5,6,7,8,11,12,18,23,24],lin_clf:8,lin_model:[0,24],lin_reg:9,linalg:[0,2,3,4,5,6,8,11,13,14,18,20,23,24],line1:8,line2:8,line2d:13,line3:8,line:[0,2,3,4,6,8,9,10,11,13,14,15,23,24],linear:[1,3,5,6,7,9,10,11,12,17,20],linear_model:[0,5,6,7,8,9,10,11,13,23,24],linear_regress:6,linearli:[5,24],linearloc:[6,13],linearregress:[0,6,7,9,23,24],linearsvc:8,liner:[1,3],linerar:10,linewidth:[0,2,4,6,8,9,10],link:[0,4,9,12,17,21,23],linlag:5,linpack:[18,23],linreg:[0,23],linspac:[0,2,3,4,6,8,9,10,13,15,16,18,20,23,24],linu:4,linuek:[],linux:[0,1,15,17,23],liquid:[0,23],list:[0,1,2,3,4,9,17,23,24],listcomp:2,listedcolormap:[9,10],lite:[3,4,14],lite_const:[3,4,14],literatur:[1,7,14,22],littl:[1,3,9,12],live:8,ll:[0,20,23,24],lle:[0,24],lloyd:[4,14],lmb:[0,2,5,6],lmbd:[0,1,3,23],lmbd_val:[0,1,3,23],lmbda:13,ln:[1,13],lo:[],load:[0,1,4,6,7,9,10,24],load_boston:[0,24],load_breast_canc:[1,7,9,10,11],load_data:[3,4],load_digit:[1,3],load_iri:[8,9],loc:[0,3,6,7,8,9,10,23],local:[0,1,2,3,7,12,13,23,24],locat:[2,3,8],lock:[],log10:[0,2,5,6],log1p:2,log:[0,1,2,3,4,5,6,7,9,10,11,13,14,18,23,24],log_:[0,23],log_clf:10,logarithm:[0,5,7,18,23],logic:[0,1,9,23],logist:[0,1,2,8,9,10,11,12,13,17,24],logistic_predict:[],logisticregress:[7,9,10,11],logit:7,logreg:[7,9,10,11],logspac:[0,1,3,5,6,23],longer:[2,3,8,10,14,18,20,23],loocv:6,look:[0,1,2,3,4,5,6,7,8,9,10,11,13,18,20,23,24],lookup:[3,4,14],loop:[1,4,6,10,12,14,17,18,23],lose:1,loss:[0,1,3,4,5,6,7,8,10,11,13,18,23],loss_fil:4,lossfil:4,lost:4,lot:[0,1,4,6,24],low:[0,6,9,10,11,23,24],lower:[0,1,3,6,9,10,16,18,24],lowercas:[18,23],lowest:[9,13,20],lr:[1,3,4,10],lstat:[0,24],lstm:4,lstm_2layer:4,lstsq:[0,23,24],lt:6,lu:[0,5,23,24],lubksb:18,luckili:2,ludcmp:18,lux:18,lvert:1,lw:[0,23],m:[0,1,2,3,5,6,8,9,10,11,12,13,18,19,20,21,22,23,24],m_1:14,m_:[9,12],m_h:[0,23],m_k:14,m_l:12,m_n:[0,23],m_p:[0,23],m_t:13,ma:11,mac:[],machin:[1,3,4,5,6,7,9,10,11,12,15,18,19,22,24],machinelearn:[0,6,17,19,21,22,23,24],machinelearningmurphi:[],mackai:22,made:[0,1,3,4,5,6,7,9,11,12,23,24],mae:[0,23],magic:4,magnitud:[1,6,7,13,24],mai:[0,1,2,3,5,6,7,8,9,11,12,13,17,18,20,24],mail:[19,21],main:[0,1,3,4,5,6,7,9,18,22,23,24],mainli:[0,5,6,7,9,23,24],maintain:6,major:[1,6,9,10,13,18,23],make:[1,2,3,4,5,6,7,8,11,12,13,17,18,20,22],make_axes_locat:6,make_moon:[8,9,10],make_pipelin:[0,6,10,24],make_vjp:[2,13],makedir:[0,6,7,9,23,24],makeplot:[0,23],malcondit:18,malign:[1,7,9],mammographi:5,manag:[0,2,3,15,17,23],mandatori:[21,23],mani:[0,1,3,4,5,6,7,8,9,11,13,14,17,18,20,22,23,24],manifold:11,manner:3,manual:[6,24],map:[0,1,2,6,7,8,11,12,14,20,23],margin:[0,5,8,23],mari:[],marit:[0,23],mark:23,marker:[0,7,18,23,24],markov:[17,23],marsaglia:20,mask:[],mass:[0,1,5,13,24],massag:[0,23],masses2016:[0,23],masses2016ol:[0,23],masses2016tre:0,masseval2016:[0,23],master:[6,19,21,23],mat1100:[17,23],mat1110:[17,23],mat1120:[17,23],mat3155:[],mat4155:[],mat:[17,23],match:[0,1,4,5,13,14,23,24],materi:[4,5,7,13,18,21],math:[3,7,12,13,18,20,22,23],mathbb:[0,4,5,6,7,8,11,12,13,14,18,20,23,24],mathbf:[0,5,6,7,8,13,18,23,24],mathcal:[1,5,6,7,13],matheemat:3,mathemat:[0,6,11,12,13,17,18,20,22,23],mathemati:23,mathrm:[0,1,3,4,5,6,7,8,9,10,11,12,13,14,20,23,24],matmul:[1,2,5],matmul_adjoint_1:[],matmul_vjp_0:[],matmul_vjp_1:[],matnat:22,matplotlib:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,17,18,20,23,24],matplotlibdeprecationwarn:[6,13],matric:[0,1,3,4,6,7,8,11,13,16,17,24],matrix:[0,2,3,4,6,7,8,10,13,15,16,20],matshow:1,matter:[2,3,13,24],max:[0,1,2,3,4,9,10,12,13,21,23],max_depth:[0,9,10],max_diff1:2,max_diff2:2,max_diff:2,max_it:[0,1,7,8,11,13,23],max_iter:14,max_leaf_nod:10,max_queue_s:[],max_sampl:10,maxdegre:[0,6,10,24],maxdepth:10,maxim:[1,4,5,7,8,11],maximum:[0,1,2,3,5,7,8,9,10,13,14,23,24],maxpolydegre:[5,6],maxpooling2d:3,mbox:[5,6,24],mc:[],mccorduck:23,mcculloch:12,mcint:[],mcintsqr2:[],md:11,mdoel:4,mdyt6uwokt0:[],mean:[1,2,3,4,5,6,7,9,10,11,12,13,14,15,16,17,18,20],mean_absolute_error:[0,23],mean_divisor:14,mean_i:20,mean_matrix:14,mean_squared_error:[0,4,6,7,10,23,24],mean_squared_log_error:[0,23],mean_vector:14,mean_x:20,meaning:[0,4,7,23],meansquarederror:[0,23],meant:[2,3,7,10,13],meantempvec:[],meanvec:[],measur:[0,1,2,5,6,9,11,12,14,20,23,24],mechan:[0,4,20,23],median:[0,23,24],medicin:12,medium:[4,8,13],medv:[0,24],meet:[0,21],mehta:[0,23,24],memori:[3,4,11,12,13,18,23],mention:[0,12,13,20,23],mere:[0,15,23],mersienn:[],meshgrid:[2,5,6,8,9,10,11,24],messag:[5,13],messi:2,met:[0,3,8,23,24],metadata:[],meteorolog:9,meter:[6,24],method:[0,1,2,3,4,5,7,8,11,12,14,16,17,18,20,22,23,24],metion:6,metric:[0,1,3,4,6,7,9,10,14,15,16,23,24],metropoli:[17,23],mev:[0,20,23],mgd:13,mglearn:[17,23],mgrid:13,mhjensen:[1,2,6,7,8,11],mi:10,mia:[21,23],michigan:[23,24],microsoft:22,mid:1,midel:4,midnight:16,midpoint:9,might:[0,1,2,4,6,9,13,24],mild:9,miller:[],millimet:[6,24],million:[0,23,24],mimic:12,min:[0,2,5,8,9,23],min_:[0,2,5,14,23,24],min_samples_leaf:9,mind:[0,6,13,23,24],mindboard:4,mine:[17,23],mini:[1,11,12,13],minibatch:[1,11,13],minibathc:13,miniforge3:[0,1,2,3,4,6,7,8,11,13,14,23],minim:[0,1,2,3,5,6,7,8,9,10,11,12,13,14,24],minima:[0,1,7,13,23],minimum:[0,1,2,6,8,9,11,13,24],minmaxscal:[0,24],minor:[6,13,20],minst:1,minu:7,mirror:9,misc:6,misclassif:[8,9,10],misclassifi:[8,10],miser:0,mismatch:1,miss:[0,7,10,24],mistak:4,mit:22,mix:[1,2,23],mixtur:13,mk48pfcxgyk:[],mk:[9,18],mkdir:[0,6,7,9,23,24],ml:[0,1,10,13,18,24],mlab:20,mle:[5,7],mline:[],mlir:[],mlir_graph_optimization_pass:[],mlp:1,mlpclassifi:1,mlpregressor:[0,23],mm:18,mn:[12,20],mnist:[1,11],mod:20,mode:[19,21,23],model:[2,3,5,7,8,9,10,11,13,14,15,16,17,20,22,24],model_select:[0,1,3,5,6,7,9,10,11,23,24],modelanalyz:[3,4,14],moder:10,modern:[0,6,7,17,23],modif:[2,12,13],modifi:[0,1,3,5,7,8,10,12,13,23,24],modul:[0,3,4,7,8,9,11,14,18,23],modular:20,modulenotfounderror:[3,4,8,9,14],modulo:20,moe:[11,24],moment:[5,6,13,20],monitor:13,monoton:[5,12,20],mont:[0,6,17,20,22,23],montecarlocycl:[],moor:[5,6],more:[0,1,2,4,5,7,8,9,10,11,12,13,14,17,20],moreov:[0,3,23],morten:[21,23,24],mortenimac:[],mosek:[],most:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,17,20,23,24],mostli:[1,11],motion:[0,13,23],motiv:[1,4],move:[0,3,4,5,6,7,9,12,13,14,20,23,24],mp4:[],mpl:[0,7,23],mpl_toolkit:[2,6,13],mplot3d:[2,6,13],mplregressor:1,mse:[0,4,5,6,9,10,15,16,23,24],mse_simpletre:10,mselassopredict:5,mselassotrain:5,mseownridgepredict:6,msepredict:5,mseridgepredict:[0,5,6],msetrain:5,msg:[0,23],msle:[0,23],mt19937_64:[],mt:[7,12],mu0:20,mu1:20,mu2:20,mu:[0,6,11,13,20,23],mu_1:24,mu_:[6,20,24],mu_i:[6,24],mu_n:11,mu_x:20,much:[0,1,2,3,4,5,6,8,9,10,11,12,13,18,20,23,24],mul:[],multi:[0,1,3,7,17,23,24],multiclass:[1,7],multidimension:[11,12,23],multilay:1,multinomi:7,multipl:[2,4,5,6,7,12,13,20,24],multipli:[3,5,6,11,13,18,20,24],multiplum:8,multivari:[0,2,10,11,17,20,23],multivariate_norm:[11,14],murphi:[11,22,23],must:[0,1,2,5,6,8,10,12,13,14,20,23,24],mutat:7,mutual:[1,3,6,13],mx_:20,myenv:[0,1,2,3,4,6,7,8,11,13,14,23],myriad:[0,15,17,23],mz1:20,mz2:20,n1:18,n2:18,n:[0,1,2,3,4,5,6,7,8,10,11,12,13,14,15,16,18,20,23,24],n_0:[12,20],n_:[1,2,3,8,12,20],n_b:[],n_boostrap:[6,10],n_bootstrap:6,n_categori:[1,3],n_cluster:14,n_compon:11,n_epoch:13,n_estim:10,n_examples_to_gener:4,n_featur:1,n_filter:3,n_hidden:2,n_hidden_neuron:[0,1,23],n_i:20,n_input:[0,1,3,24],n_instanc:9,n_iter_i:[7,11],n_job:10,n_k:14,n_l:[12,20],n_layer:1,n_m:9,n_neuron:1,n_neurons_connect:3,n_neurons_layer1:1,n_neurons_layer2:1,n_point:14,n_sampl:[6,8,9,10,14],n_split:6,n_step:4,n_t:2,n_x:2,nabla:[1,13],nabla_:[2,13],nabla_w:13,nag:13,naimi:[0,23],naiv:7,naive_kmean:14,najafi:[21,23],nall:[0,23],name:[0,1,3,4,5,6,7,8,9,10,12,13,14,15,17,18,20,21,23,24],nameerror:[6,10,15,24],namespac:[3,4,14],narrow:13,nary_f:[2,13],nary_op_arg:[2,13],nary_op_kwarg:[2,13],nary_oper:[2,13],nation:[1,5,24],nativ:[17,23],natur:[0,1,4,8,9,12,13,20,22,23],navier:12,nb:20,nb_:18,nbconvert:23,nboot:[],nd:14,ndarrai:[2,6],ndef:13,ndim:[],ne:[9,10,18,20,24],ne_xcl2ctm0:[],nearest:[1,3,6,11],nearli:13,neat:23,neccesari:6,necess:2,necessari:[0,1,3,4,8,14,23],necessarili:[0,4,11,20,23],necesserali:5,neck:7,need:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,18,20,24],neg:[0,1,3,5,6,7,10,13,18,20,23],neg_mean_squared_error:6,neglect:20,neglig:20,neighbor:[3,6,11],neither:[4,13],neq:[13,14,20],nervou:12,nest:[2,9,12],nesterov:13,net:[2,4,12],netlib:[18,23],network:[0,9,13,17,22,24],neural:[0,13,17,22,24],neural_network:[0,1,2,23],neuralnetwork:1,neuron:[1,2,3,4,12],neutral:[0,23],neutron:[0,23],never:[1,4,6,9,20],new_box:[2,13],new_chang:13,new_hobbit:23,new_root:[2,13],new_trac:[2,13],new_tracing_count:[],newaxi:[0,3,6,9],newli:[0,23],newton:[1,7,8,13,20],next:[0,1,2,3,4,5,6,8,9,13,14,23,24],next_guess:13,next_input:4,nf8_grad:13,nfrom:13,ng:1,ngini:[],ni:14,nian:[],nice:[0,1,5,11,23,24],nichola:[],nicholaskarlsen1102:[],nimport:13,niter:13,nitric:[0,24],nlambda:[0,5,6],nlevel:[],nlp:22,nm:20,nm_n:[0,23],nmse:6,nn:[2,5,6,12,18],nn_model:1,nnmin:2,node:[1,2,3,9,10,12],node_constructor:2,nois:[0,4,5,6,8,9,10,13,15,16,23,24],noise_dimens:4,noisi:[1,6],non:[0,1,3,5,6,7,9,10,11,12,13,14,18,20,23,24],none:[0,1,2,4,5,9,10,13,20,23,24],nonlinear:[3,6,8,9,11,12],nonneg:[6,9,13],nonparametr:6,nonsens:20,nonsingular:18,nonumb:[3,7,8,13,18],nor:[1,4,13],norm:[0,1,5,6,8,11,13,23,24],normal:[3,4,5,6,7,8,9,10,11,12,13,15,16,17,18,20,23,24],normali:[18,23],normalize_kwarg:[],norvig:23,norwai:[6,23],notat:[0,2,5,6,13,14,20,23,24],note:[0,1,2,3,4,5,6,7,8,11,12,13,14,15,16,17,18,20,22,23],notebook:[0,1,3,9,15,17,23],notesexercise5week452022:23,noth:[1,2,5,8,12,14,20,24],notic:[4,5,12,13,18,20,23],notimplementederror:2,notion:3,notrace_primit:[],novel:[3,6,10],novemb:[1,19,21,23],now:[0,2,4,5,6,7,8,10,11,12,14,15,16,17,18,20,23,24],nowadai:[0,1,3,9,17,23],nox:[0,24],np:[0,1,2,3,4,5,6,7,8,9,10,11,13,14,15,16,18,20,23,24],npr:2,nprint:13,nsampl:6,nspin:[],nt:2,nthi:[0,23],ntrained_model:6,nu:20,nuclear:[5,24],nuclei:[0,20,23],nucleon:[0,23],nucleu:[0,23],num:4,num_allow_arg:[0,23],num_coordin:2,num_hidden_neuron:2,num_it:2,num_neuron:2,num_neurons_hidden:2,num_output:[],num_point:2,num_tre:10,num_valu:2,number:[1,3,4,5,6,7,8,9,10,11,12,13,14,15,16,18,19,21,23],numberid:7,numberparamet:3,numer:[0,5,6,9,10,11,12,13,17,18,22,23,24],numpi:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,20,24],numpy_vjp:2,numpy_wrapp:2,nunmpi:[5,24],nvalu:[],nx:[2,13],nx_test:6,nx_train:6,nx_train_mean:6,ny:20,ny_pr:6,ny_train:6,ny_train_mean:6,o:[0,6,7,8,9,11,15,18,21,22,23,24],obei:[6,11,13,24],object:[0,1,2,4,6,8,10,13,18,23,24],objsens:[],obliqu:[5,24],observ:[0,1,3,5,6,7,8,9,10,11,12,13,14,20],obtain:[0,1,5,6,7,8,9,10,12,13,14,18,20,23,24],obviou:[5,6,11,20,24],obviouli:23,obvious:[0,4,5,6,18,23],oc:24,occupi:[0,24],occur:[0,6,8,9,18,20,23],octob:[19,21,23],od:0,odd:[0,3,7,23,24],odenum:2,odesi:2,oen:0,off:[1,3,4,5,9,13,20],offer:[6,11,17,18,19,21,23],offic:[21,23],offici:[19,23],ofil:[],ofstream:[],often:[0,1,3,4,5,6,7,8,9,10,11,12,13,14,16,17,18,20,23,24],ofter:[18,23],oh6i_oscwpc:[],ol:[0,13,15,16,23,24],old:[1,5,10,13],ols_sk:6,ols_svd:6,olsbeta:[0,5],olxksel3p4a:[],omega:[2,3,6],omega_0:3,omit:[0,5,23,24],on_train_batch_begin:[],onc:[1,6,9,11,13],one:[0,1,3,4,5,6,7,8,9,10,11,13,14,17,18,20,21,23,24],oneapi:[],onednn:[],onehot:1,onehot_vector:1,onehotencod:9,ones:[0,2,5,6,8,9,10,11,13,18,23,24],ones_lik:4,onl:3,onli:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,18,20,23,24],onlin:[11,19],onto:[5,11,24],op_nam:[],opbdi:[],open:[0,1,4,6,7,9,15,17,19,21,23],oper:[0,1,3,5,6,10,11,12,13,15,17,20,23,24],operation:20,ophint:[3,4,14],oplu:20,opmiz:13,opportun:[0,23],oppos:[6,13],opposit:[1,5,8,24],opresolvertyp:[3,4,14],opt:[1,5,23],optim:[0,2,3,4,5,6,7,9,10,11,14,15,16],optimis:[1,3],optimizer_v2:[],option:[0,1,3,5,6,7,8,11,18,24],optionalxlacontext:[],optmiz:[1,8,13,24],oral:23,orang:0,order:[0,1,2,3,5,6,7,8,9,10,11,12,15,16,18,20,23,24],ordinari:[0,2,3,7,11,13,15,16,17],oreilli:22,org:[0,3,4,7,11,17,18,22,23],organ:[6,7,10,18],orient:[1,5,20,24],origin:[0,3,5,6,8,11,12,13,18,23,24],orthogn:[5,24],orthogon:[0,5,6,8,11,13,18,23,24],orthonorm:[5,24],os:[0,1,4,5,6,7,8,9,21,23,24],oscar:1,oscil:[3,13],oslo:[0,15,17,19,21,23,24],osx:[0,15,17,23],other:[0,1,2,3,5,6,7,8,10,13,14,15,17,19,20,21,22],otherwis:[0,1,4,7,13,18,23,24],ouput:[5,7,12],our:[1,2,3,6,7,8,9,10,12,14,15,16,17,18,20],ourmodel:0,ourselv:[0,5,6,8,11,13,23,24],out:[0,1,2,4,5,6,7,8,9,10,11,12,13,16,17,18,20,23,24],out_fil:9,outcom:[0,7,9,10,12,20,24],outdoor:9,outer:[6,12,13],outfil:4,outfilenam:[],outgrad:2,outlier:[0,8,23,24],outlin:[6,10,11],outlook:9,outperform:10,output:[0,1,3,4,5,6,7,8,9,10,12,13,16,18,20,23,24],output_bia:1,output_bias_gradi:1,output_shap:4,output_weight:1,output_weights_gradi:1,outputlayer1:12,outputlayer2:12,outsid:4,over1:13,over:[0,1,3,4,5,6,9,10,12,13,18,23,24],overal:[1,10],overcast:9,overcom:[12,13],overdetermin:[0,23],overfit:[0,1,3,6,9,10,13],overflow:[1,5],overhead:12,overlap:[3,7,8,9],overlin:[0,5,6,9,10,11,14,18,23,24],overst:[0,23],overtrain:4,overview:3,own:[4,5,6,8,12,13,17,18],owner:[0,24],ownmsepredict:0,ownmsetrain:0,ownridgebeta:[0,6],ownypredictridg:0,ownytilderidg:0,oxid:[0,24],oyvinssc:[],p0:2,p1:2,p:[0,1,2,3,4,5,6,7,8,9,10,11,13,14,18,20,23,24],p_:[2,4,8,9],p_hidden:2,p_i:[5,20],p_j:20,p_n:20,p_output:2,p_x:20,pack:[0,23],packag:[0,1,2,3,4,5,6,7,8,11,13,14,15,17,20,24],pad:[3,4],page:[0,17,23],pai:[0,1,9,13],pair:[0,2,3,9,17,20,23,24],pamilla:23,panda:[0,4,5,6,7,9,11,15,17],panel:23,paper:1,paradigm:[0,23],parallel:[10,13,17,18,23],param:2,paramat:2,paramet:[0,1,2,3,4,5,6,7,8,9,10,12,13,16,20],parameter:[0,6,10,23,24],parametr:[0,6,15,16,23,24],paramt:[3,5],parent:2,parent_argnum:[],park:[],parser:[0,23],part:[0,1,3,5,6,10,18,19,20,21,23],partial:[0,1,5,6,7,8,10,11,12,13,16,20,23,24],particip:[17,19,21,23],particl:[0,4,13,20,23],particular:[0,1,2,3,5,6,9,10,11,12,13,16,20,22,23,24],particularli:[5,6,8,11,13,20,24],partit:[1,4,9],partli:[6,23],pass:[2,3,12,14],past:[10,20],patch:[6,20],path:[0,4,6,7,9,15,17,23,24],patient:7,patter:4,pattern:[0,3,4,12,19,22,23],pauli:[0,23],pc:[11,17],pca:[0,7,17,23,24],pcolor:6,pcolormesh:6,pd:[0,4,5,6,7,9,11,23,24],pde:2,pdf:[0,3,4,5,6,9,22,23],pedagog:[0,23,24],penal:[6,24],penalti:[6,13,24],penros:[5,6],pentagon:13,peopl:[0,1,9,13,17,24],per:[0,1,6,19,21,23,24],percentag:[0,10,11,21,24],perceptron:[0,1,7,23],peregrin:23,perfect:[0,1,13,23],perfectli:[4,6],perform:[0,2,3,4,5,6,8,10,11,12,13,14,15,16,17,18,20,23,24],performac:4,perhap:[0,5,13,23,24],perimet:1,period:[1,4,20],permut:11,persist:13,person:[5,6,7,19,21,23,24],perspect:22,pertin:12,petal:[8,9],peter:22,petersen:[],phantom:20,phase:[6,12],phenomena:20,phi:8,phi_k:8,philip:[],philosophi:13,phone:[21,23],photo:4,phrase:[0,23],physic:[0,1,4,7,12,13,20,21,22,23,24],pi:[2,3,5,6,7,9,12,13,20],pick:[1,9,10,11,13,14],pickl:1,pictur:[0,23],pie:[17,23],piec:[11,14],pillow:[0,15,17,23],pinv:[5,6,13,24],pip3:[0,1,15,23],pip:[0,1,15,17,23],pipelin:[0,6,8,10,24],pippin:23,pit:4,pitfal:[6,24],pitt:12,pixel:[1,3,4],pixel_height:[1,3],pixel_width:[1,3],place:[0,4,6,8,13,18,23],plai:[0,3,4,5,6,8,11,17,23,24],plain:[8,10,12,13,14],plan:[6,9,21,22,23],plane:[8,9],plateau:5,platform:[17,23],plausibl:12,pleas:[6,7,11,13,21,23],plenti:1,plethora:[3,12],plot:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,20,23,24],plot_confusion_matrix:[7,10],plot_count:6,plot_cumulative_gain:[7,10],plot_data:1,plot_dataset:8,plot_decision_boundari:[9,10],plot_import:10,plot_max:4,plot_min:4,plot_model:4,plot_numb:4,plot_predict:8,plot_regression_predict:9,plot_result:4,plot_roc:[7,10],plot_surfac:[2,6,13],plot_train:9,plot_tre:[9,10],plt:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,18,20,23,24],plu:[0,3,5,7,23,24],pm:8,pmatrix:2,pml:22,pn:3,png:[0,4,6,7,9,23,24],point:[0,1,2,3,5,6,7,8,9,10,11,13,14,15,16,18,20,21,23,24],point_1:4,point_2:4,poisson:[17,20,23],poli:[6,8],poly100_kernel_svm_clf:8,poly3:0,poly3_plot:0,poly3dcollect:13,poly_featur:[8,9],poly_features10:9,poly_fit10:9,poly_fit:9,poly_kernel_svm_clf:8,polydegre:[0,5,6,10,24],polygon:13,polym:12,polynomi:[0,5,6,7,8,9,10,11,15,16,23,24],polynomial_featur:6,polynomial_svm_clf:8,polynomialfeatur:[0,6,8,9,24],polytrop:[0,6,23],pool:3,pool_siz:3,poor:[1,13],poorli:[0,24],pop:2,popul:[0,5,23,24],popular:[0,1,3,6,7,8,9,11,12,15,17,18,20,23,24],popularli:[0,23],portabl:10,portion:[11,13],pose:[0,4,5,6,11,20,23],posit:[0,1,2,3,5,7,8,10,11,13,14,18,20,23,24],possibl:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,15,17,18,20,21,23,24],posterior:5,postpon:[0,23,24],postul:5,potenti:[0,3,5,6,12,13,23,24],potr:[],potrf:[],pott:12,power:[0,1,5,6,8,9,12,13,23,24],pp:[5,6],practic:[0,5,6,7,8,20,24],practition:[0,1,3,23],pre:23,preced:[1,11,12,20],preceed:4,preceq:8,precis:[0,2,5,11,13,18,20,23,24],pred:6,predicit:0,predict:[0,1,5,6,7,8,9,10,15,16,17,22,23,24],predict_prob:1,predict_proba:[7,10],predictor:[0,5,6,7,9,10,11,23,24],prefer:[0,1,6,8,9,11,13,15,17,23],prepar:[0,6,18,23,24],preprocess:[0,4,6,7,8,9,10,11],prerequisit:0,presenc:13,present:[0,5,6,7,9,12,13,18,20,23,24],preserv:[3,11,18],press:[13,22],pretrain:[1,4],pretti:[0,4,8,9,15,17,23],prev_centroid:14,prevent:[13,20],previou:[0,1,2,3,4,5,6,8,10,11,12,13,18,20,24],previous:[2,3,9,10,20],price:[0,4,9,13,24],primal:8,primari:[0,7,23],prime:20,primit:2,princip:[0,5,7,17,23,24],principl:[0,6,7,8,14,23],print:[0,1,2,3,4,5,6,7,8,9,10,11,13,14,18,20,23,24],print_funct:[8,9],printout:[0,23],prior:[0,5,6,23,24],privat:[0,23],prob:[1,20],probabilist:[0,22,23,24],probabl:[0,1,3,4,6,7,10,13,17,23,24],problem:[0,3,4,5,6,7,8,9,10,11,12,16,17,18,20],probml:22,proce:[0,5,6,7,8,9,10,11,13,18,23,24],procedur:[2,4,5,6,8,10,11,13,24],proceed:18,process:[0,2,4,6,9,10,12,13,15,17,18,20,22,23],prod:22,prod_:[1,5,7],produc:[0,3,4,5,6,9,10,11,12,13,17,18,20,23,24],product:[0,1,3,5,6,7,8,12,13,16,17,18,23,24],profess:[0,23],program:[0,1,4,5,6,8,12,14,15,16,17,18,19,20,21,23,24],programm:18,progress:[1,4,14],prohibit:6,project1:6,project:[0,1,2,3,5,11,13,17,19,21,24],project_root_dir:[0,6,7,9,23,24],promin:12,promis:8,promot:[21,23],prone:9,pronounc:[13,17,23],proof:[0,11,12,13,23],propag:[2,3,13],proper:[0,2,6,7,23],properli:[1,6,8,10,13],properti:[0,1,3,12,13,16,18,23],proport:[0,1,5,9,11,13,16,20,23,24],propos:[1,4,6,10,23],propto:[5,13],protect:[],protobuf:[3,4,14],proton:[0,23],prove:[3,13],provid:[0,1,3,4,5,6,8,9,10,12,13,15,17,18,20,23,24],proxi:[1,13],prune:9,pseudo:[18,20],pseudoinv:5,pseudoinvers:[5,6],pseudorandom:[6,20],psycholog:[0,23],pt:13,ptratio:[],punish:[0,1,23],pure:[3,9,20],purest:9,puriti:9,purpos:[0,3,10,12,14,23],put:[1,23],putarow:[],putboundslic:[],putclist:[],putobjsens:[],putqobj:[],py:[0,1,2,3,4,5,6,7,8,11,13,14,23],pycod:23,pydata:17,pydot:9,pyhton2:23,pylab:[0,7,23],pylint:[3,4,14],pypi:17,pyplot:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,18,20,23,24],pythagora:5,python2:[0,15,23],python3:[0,1,2,3,4,6,7,8,11,13,14,15,17,23],python:[1,2,3,4,5,6,8,11,12,13,14,16,20,24],pytorch:[0,17,23],pywrap_tf:[],q:[5,6,8,11,20,24],qn_bavhmd8u:[],qp:8,qquad:[2,11,13,18],qr:[5,6,18,24],quad:[1,13,18],quadrat:[0,8,9,13,15,16,23],qualit:[4,9,20],qualiti:[0,9,15,16,17,23,24],quantifi:1,quantil:10,quantit:[0,6,9,23],quantiti:[0,2,5,6,7,9,10,11,12,14,16,18,20,23,24],quantum:[4,12,22,23],quartil:[0,24],quench:5,queri:9,question:[0,5,6,9,11,12,13,21,23,24],qugan:4,quick:[4,20],quick_execut:[],quickli:[1,3,9,11,13],quit:[1,5,6,9,10,12,24],quot:[4,23],r2:[0,5,6,23,24],r2_score:[0,23,24],r2score:[0,23],r:[0,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,20,24],r_1:9,r_2:9,r_j:9,r_m:9,rad:[0,24],radial:[0,8,12,24],radioact:20,radiu:[0,1,24],rag:2,rain:9,rais:[0,2,13,23],ramp:1,ran0:20,ran1:20,ran2:20,ran3:20,rand:[0,4,5,6,9,10,13,15,16,18,23,24],rand_max:[],randint:[6,9,13],randn:[0,1,2,5,6,9,11,13,15,16,23,24],random:[0,1,2,3,4,5,6,8,9,13,14,15,16,17,18,23,24],random_devic:[],random_forest_model:10,random_index:13,random_indic:[1,3],random_st:[0,7,8,9,10,11,24],randomforestclassifi:10,randomli:[1,6,9,13,14],randomnumbergener:[],rang:[0,1,2,3,4,5,6,7,9,10,11,12,13,14,18,20,23,24],rangl:[0,6,11,20,23,24],rangle_x:20,rank:[5,24],rankdir:4,raphson:[1,8,13],rapidli:[0,23],rare:[1,13,23],rate:[0,1,2,3,4,8,9,10,12,13,24],rather:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,18,20,23,24],ratio:[4,7,9,10,11],rational:[0,23],ravel:[5,6,7,8,9,10,11,13,18,24],raw:3,raw_df:[],rbahrf:[],rbf:[8,11,12],rbf_kernel_svm_clf:8,rbf_pca:11,rc:[0,20,24],rcond:[0,23,24],rcparam:[0,1,3,7,8,9,10,20,23],rd:[],rdbj50lv3go:[],re:[2,4,13],reach:[1,4,5,6,7,9,10,11,12,13,14],read:[0,2,3,4,5,6,7,8,11,12,16,18,19,20,22],read_csv:[0,6,7,9,23],read_fwf:[0,23],reader:[0,6,18,20,23,24],readi:[0,1,5,6,8,10,11,12,18,23],readili:1,readthedoc:17,real:[0,1,2,4,7,10,11,12,13,18,24],real_loss:4,real_output:4,realist:8,realiti:20,realiz:[1,12],realli:[0,1,23],rearrang:13,reason:[0,1,3,4,10,13,22,23],reassign:1,rebuild:[],recal:[5,6,9,10,11,12,18,20,23,24],recalcul:[],recast:3,receiv:[1,3,10,12,20],recent:[0,2,3,4,6,8,9,10,13,14,15,22,23,24],recept:[3,12],receptive_field:3,recip:[0,6,7,18,23,24],reciproc:5,recogn:[0,4,5,10,23],recognit:[0,1,3,12,19,22,23],recommend:[0,2,3,4,5,6,8,13,15,17,18,22],reconsid:9,reconstruct:11,record:[10,19,21,23],recreat:[],rectangl:[9,13],rectangular:[5,24],rectifi:[1,3,12],recur:[0,17,23],recurr:[0,1,17,23],recurs:[9,17,18,23],recycl:[],red:[0,3,4,6,8,9],redefin:[0,10,23],reduc:[1,3,5,6,9,10,11,13,23],reduct:[0,10,11,17,20,23,24],refer:[0,1,2,3,5,6,7,11,12,13,14,18,22,23,24],referenc:2,refin:12,refit:6,reflect:[0,1,4,5,20,23],refresh:[17,23],refreshprogrammingskil:23,reg:[10,11],regard:[1,9,13],regardless:12,region:[3,4,6,9,12],regist:[6,20],reglasso:5,regr_1:[0,9],regr_2:[0,9],regr_3:[0,9],regress:[1,8,11,12,15,16,17,18],regressor:[0,7,10,23],regridg:[0,5,6],regular:[0,3,4,5,6,7,9,13,21,23,24],regularis:6,reilli:[0,15,22,23],reinforc:[0,8,17,23],reiter:1,reject:7,rel:[0,4,6,7,9,12,13,20,23,24],relat:[0,1,3,4,5,11,13,14,18,20,23],relationship:[0,4,9,23],relativeerror:[0,23,24],releas:[1,6,13,17,23],relev:[0,1,5,7,11,15,17,20,23],reli:[0,6,8,23],reliabl:[7,20],relu:[3,4],remain:[1,2,4,6,12,18,20,24],remaind:20,reman:2,remark:1,rememb:[0,8,13,18,23],remind:[0,5,11,13,18,20,24],remov:[0,4,5,6,23,24],render:[0,23,24],reorder:[5,7,24],reorgan:[0,23],repeat:[0,1,3,4,5,6,9,10,11,13,14,18,20,23],repeated:23,repeatedli:[0,6,10,13],repet:3,repetit:[6,23,24],rephras:13,replac:[0,1,3,4,5,6,10,12,14,15,16,17,23,24],replica:6,report:23,repositori:[0,4,23,24],repres:[0,1,2,3,4,5,6,7,8,9,10,12,13,20,23,24],represent:[0,1,3,6,20,23],representd:3,reproduc:[0,5,6,9,12,15,16,17,20,23,24],repuls:[0,23],request:[0,13,23],requir:[0,1,3,4,5,6,8,9,11,12,13,18,23,24],res1:2,res2:2,res3:2,res_analyt:2,res_analytical1:2,res_analytical2:2,res_analytical3:2,resaml:6,resampl:[0,7,10,17,23,24],rescal:[0,11,12,24],rescu:5,reseach:6,research:[0,4,13,17,22,23],resembl:[6,20],reserv:[1,5,6,20],reset:[],reshap:[0,1,2,3,4,6,8,9,10,15,16,18,23,24],residenti:[0,24],residu:[0,5,13,23],resiz:[5,24],resourc:23,respect:[0,1,2,3,5,6,7,8,10,11,12,13,14,16,20,23,24],respond:12,respons:[0,7,9,12,23,24],rest:[0,5,24],restat:[0,12,23],restor:4,restored_discrimin:4,restored_gener:4,restrict:[0,3,9,12,23],result:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,20,23],result_typ:[],retail:[0,24],retain:[5,6,24],return_data:14,return_kwarg:[],return_sequ:4,return_x_i:9,reus:[1,3,6],reveal:[0,12,23],revers:[1,18],review:[17,18],revisit:14,revolut:23,reward:[0,4,23],rewrit:[0,3,5,6,7,8,10,11,12,13,18,20],rewritten:[2,6,8,10,20],rewrot:13,rf:10,rgb:3,rgoj5yh7evk:17,rh:6,rho:[0,10,13,23],rho_1:10,rho_2:10,rho_m:10,rich:[0,23],ride:9,rideclass:9,ridedata:9,ridg:[7,11,13,17,23],ridge_sk:6,ridgebeta:5,right:[0,1,2,3,5,6,7,8,9,10,12,13,14,16,18,20,23,24],right_sid:2,rightarrow:[0,1,5,6,8,11,12,13,20,23,24],rigor:[0,23],ring:6,rise:[0,23],risk:[0,13,15,16,23],rival:4,river:[0,24],rm:[0,20,24],rmse:[0,24],rmsporp:13,rmsprop:[1,3,4,13],rnd_clf:10,rng:20,rnn1:4,rnn2:4,rnn:[4,12],rnn_2layer:4,rnn_input:4,rnn_output:4,rnn_train:4,rntrick1:20,rntrick2:20,rntrick3:20,rntrick4:20,ro:[0,13,23],robert:22,robust:[0,23],robustscal:[0,24],roc:[7,10],role:[0,2,5,6,8,17,23,24],roll:6,room:[0,21,23,24],root:[0,5,9,13,20,23,24],rot:23,rotat:[1,8,9,10],rotation_matrix:9,roughli:[1,3],round:[0,7,9,13,24],routin:[13,18,23],row:[0,1,2,5,6,7,9,11,18,23,24],rr:[5,24],rrr:[5,24],rthe:[],rug:13,rule:[0,1,5,6,13,23,24],run:[0,1,2,4,5,6,8,9,11,13,15,17,23,24],runtim:[1,6,14],runtimewarn:[1,6],russel:23,rust:[0,15,17,18,23],rustad:[],rvert:1,rvert_2:1,s:[0,1,2,3,4,5,6,7,9,11,12,13,16,17,18,20,23,24],s_1:6,s_:[3,6],s_i:[6,7],s_j:6,s_k:6,saddl:13,safe:[],sai:[0,1,2,3,4,5,6,7,8,9,10,11,12,18,20,23,24],said:[6,9,13],sake:[0,5,7,11,23,24],sale:[0,23],sam:23,same:[0,1,2,3,4,5,6,8,9,11,12,14,18,20,23,24],samm:10,sampl:[0,1,2,3,4,5,6,7,8,9,10,13,14,15,16,17,18,20,23,24],sample_vari:14,sample_weight:[],sampleexptvari:20,samwis:23,sastri:11,satisfactori:[0,23],satisfi:[1,2,3,6,8,13,18,20],satur:[1,6],save:[0,4,6,7,9,13,23,24],save_fig:[0,6,7,9,10,23,24],savefig:[0,4,6,7,9,20,23,24],savetxt:4,saw:[5,24],scalabl:10,scalar:[2,5,6,10,13,24],scale:[0,1,3,5,6,7,8,9,10,11,12,13,15,16,17,18,21,23],scale_mean:4,scale_std:4,scalei:[],scaler:[0,7,8,9,10,11,24],scalex:[],scan:[5,7],scari:5,scatter:[0,1,6,7,8,9,14,23,24],scenario:[6,13],schedul:[13,21],scheme:[1,13],schigsog2l:[],schrage:20,scienc:[0,1,10,12,13,17,19,20,21,22],scientif:[0,15,17,23],scientist:[0,23],scikit:[3,5,6,7,8,9,10,13,17,18,19,22],scikit_learn:[0,16],scikitlearn:23,scikitplot:[7,10],scipi:[0,3,5,6,13,15,17,18,23,24],scl:6,score:[0,1,3,6,7,9,10,11,15,16,21,23,24],scores_kfold:6,scratch:[1,13],sdg:13,sdt_bfla8ua:[],seaborn:[0,1,3,6,7,23,24],seamless:[0,15,17,23],search:[0,1,3,5,9,13,23],sec:6,second:[0,2,3,4,5,6,7,8,9,11,12,14,15,16,17,18,20,21,23,24],secondeigvector:11,secondli:12,section:[4,11,18,20,24],sector:[0,23],see:[0,1,2,3,4,5,6,7,8,10,11,12,13,15,16,17,18,20,23,24],seed:[0,1,2,3,4,5,6,8,9,11,13,14,15,16,20,23,24],seed_imag:4,seek:[1,2,8],seem:[1,3,4],seemingli:[0,23],seen:[0,1,3,5,10,12,20,23],segment:13,seismic:6,seldomli:[0,23],select:[1,5,6,8,9,10,11,19,20,21,22,23,24],self:[1,5,24],sell:4,semest:[7,19],semi:[8,13],semilogx:6,send:[5,12,13,21,23],senior:[19,21],sens:[0,4,6,8,23],sensibl:3,sensit:[0,5,6,9,13,23,24],sent:2,sentenc:[4,12],sep:[],separ:[0,1,2,4,6,8,9,12,14,15,17,20,23],septemb:[16,23,24],sequenc:[2,3,4,7,9,10,12,13,17,18,20,23],sequenti:[1,3,4,10,12,20],seri:[0,1,2,3,4,5,6,10,11,12,13,18,23,24],serif:[0,7,20,23],serv:[0,1,2,3,5,7,13,22,23,24],session:[1,19,21,23],set:[1,4,5,6,7,8,10,11,13,14,16,17,18,20,21],set_major_formatt:6,set_major_loc:6,set_stream:[],set_tick:[1,8],set_ticklabel:1,set_titl:[0,1,2,3,7,12,14,23],set_xlabel:[0,1,2,3,7,12,23],set_xlim:[7,12],set_xticklabel:1,set_ylabel:[0,1,2,3,7,23],set_ylim:[7,12],set_ytick:7,set_yticklabel:[1,6],set_zlim:6,seth:4,setiosflag:[],setminu:6,setosa:[8,9],setosa_or_versicolor:8,setp:6,setprecis:[],setse:[],setup:[1,4,6,8,17,23,24],setw:[],sever:[0,3,5,6,7,8,9,11,12,13,17,18,20,23,24],sgd:[1,3],sgd_clf:8,sgdclassifi:8,sgdreg:13,sgdregressor:13,sgn:[5,24],sh:[],shallow:13,shape:[0,1,2,3,4,5,6,7,8,9,10,11,13,14,15,16,18,23,24],shape_bas:2,share:[1,3,23],she:7,shift:[1,6,12,20],ship:3,shire:23,shortcom:13,shorten:4,shorter:20,shorthand:23,shortli:[18,23],should:[0,2,3,5,6,8,9,11,12,13,15,16,18,20,23,24],should_sync:[],show:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,16,18,20,23,24],show_shap:4,shown:[0,4,5,7,8,11,12,13,18,24],showpoint:[],shrink:[3,5,6,8,11,24],shrinkag:[5,6,24],shrunk:11,shuffl:[0,1,4,6,13,24],side:[0,2,5,8,12,13,18,23],sigh:[17,23],sigma0:20,sigma1:20,sigma2:20,sigma:[0,1,5,6,7,10,11,12,13,18,20,23,24],sigma_0:[5,24],sigma_1:[5,24],sigma_2:[5,24],sigma_:[5,18,23,24],sigma_fn:[7,12],sigma_i:[0,5,23,24],sigma_j:[5,24],sigma_m:[6,20],sigma_n:[11,20],sigma_t:13,sigma_x:20,sigmoid:[1,2,4,7,8,10,12],sigmundson:[6,24],sign:[1,2,7,8,10,20,21],signal:[1,3,10,12],signatur:[],signifi:4,signific:1,significantli:[1,13,20],sigurd:[],sim:[4,5,6,13,20],similar:[0,1,2,3,4,5,6,7,8,9,10,11,14,17,18,23],similarli:[0,1,3,5,8,10,13,20,23,24],simpl:[1,2,3,5,6,7,8,10,11,12,14,15,16,17,18,20],simple_rnn:[],simplepredict:10,simpler:[0,1,5,6,7,13,16,17,23],simplernn:4,simplest:[0,1,3,4,9,10,12,14,23],simpletre:10,simpli:[0,1,2,4,5,6,8,9,10,11,12,15,17,18,20,23,24],simplic:[2,5,6,7,8,9,10,11,12,14,24],simplicti:[5,24],simplifi:[0,6,9,15,17,23,24],simplist:[3,6,20],simul:6,simultan:6,sin:[0,1,2,3,4,9,12,13,18,23],sinc:[0,1,2,3,5,6,7,8,9,10,11,13,18,20,22,23,24],sine:[3,12],singl:[0,1,2,3,5,6,7,8,9,12,13,18,20,23,24],singular:[0,6,13,18,23],sinusoid:3,site:[0,1,2,3,4,6,7,8,11,13,14,19,23],situat:[0,4,5,7,13,20,23,24],six:[3,4,14,20],size:[0,1,2,3,4,5,6,8,9,10,11,13,18,20,23],sketch:10,ski:9,skill:[0,23],skip:11,skiprow:[],skl:[0,6,23,24],sklearn:[0,1,3,5,6,7,8,9,10,11,13,14,23,24],skplt:[7,10],sl:6,slack:8,slice:[2,18,23],slide:[0,3,15,16,20,23,24],slight:[6,13],slightli:[1,2,3,5,6,7,10,20,24],slope:[8,11,12],slow:[0,2,8,13,24],slower:[5,18,23,24],slowest:18,slowli:12,slp:1,small:[0,1,2,3,5,6,8,9,10,11,12,13,17,18,20,23,24],smaller:[0,1,2,5,6,8,9,11,13,20,23,24],smallest:[0,4,14,15,16,23],smallest_row_index:14,smooth:[0,3,6,13,23],sn:[0,1,3,6,7,23,24],sne:11,sneak:23,so:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,16,17,18,20,21,23,24],soar:6,social:[0,23],societ:23,soft:[1,7,10,12],soften:8,softmax:[3,7],softwar:[0,8,15,17,18],sol:8,sole:[0,6,23],solid:[0,7,23],solitem:[],soltyp:[],solut:[0,1,2,3,5,6,8,10,11,13,18,20,23,24],solutionsummari:[],soluton:2,solv:[0,1,3,5,6,8,10,11,12,13,18,23,24],solve_expdec:2,solve_ode_deep_neural_network:2,solve_ode_neural_network:2,solve_pde_deep_neural_network:2,solveod:2,solveode_popul:2,solver:[2,7,8,9,10,11,18],some:[0,1,2,3,4,5,6,7,8,9,10,11,12,14,20],some_model:[6,24],somehow:4,someth:[0,1,3,4,7,9,11,20,23,24],sometim:[0,1,11,12,13,14,23,24],soon:[18,21],sophist:[0,23],sopt:13,sort:[5,6,9,11,20,24],sound:[3,5],sourc:[0,1,3,6,15,17,18,20,23],space:[0,1,4,5,8,9,11,12,13,14,20,24],span:[0,3,5,9,11,18,23,24],spare:1,spars:[3,6,18,23],sparse_mtx:[18,23],sparsecategoricalcrossentropi:3,sparsiti:10,spatial:[1,2,3,12],spdiag:[],speak:20,special:[6,7,10,12,13,18,20,23,24],specif:[0,1,2,3,4,5,6,7,8,9,11,12,16,17,18,20,22,23,24],specifi:[0,3,5,6,7,9,11,13,14,20,23],specifici:[0,10,23],spectacular:3,spectral:1,speech:[0,1,3,4,12,23],speed:[1,2,4,13],spend:20,sphere:[0,24],spin:6,spite:[0,23],spline:8,split:[1,3,4,5,6,8,9,10,11,14,20],splite:0,splitter:[1,10],spmatrix:[],spontan:20,spot:3,spread:[0,11,20,23,24],springer:[22,23],spuriou:13,sqquar:[],sqrsignal:3,sqrt:[0,3,4,5,6,8,10,11,13,20,24],squar:[1,2,3,4,7,8,9,11,13,14,15,16,17,18,20],squarederror:10,squaredeuclidean:14,squash:12,squeez:[],srand:[],srtm:6,srtm_data_norway_1:6,sse4:[],stabil:5,stabl:[0,4,5,6,7,9,11,17,23,24],stack:[2,3,4],stacklevel:[0,23],stage:[5,13],stai:[0,2,4,5,11,23,24],stand:[0,5,9,12,23,24],standadscal:24,standard:[0,1,4,5,6,7,8,10,12,15,16,18,20,23],standard_basi:2,standardscal:[0,6,7,8,9,10,11,24],stanford:13,start:[0,1,2,3,4,5,6,8,9,10,11,12,13,14,18,20,21,23,24],start_box:[2,13],start_nod:[2,13],start_tim:14,startpoint:[],stat:6,state:[1,2,4,5,6,7,8,10,11,12,13,17,20,24],statement:[0,7,18],statist:[0,1,3,4,7,9,10,11,12,13,14,18,19,22,24],statu:[0,7,11,23,24],stavang:6,std:[0,4,6,23,24],stdev:[],stdout:[],steep:13,step:[0,1,2,4,6,7,9,10,11,12,13,14,18,23],step_fn:[7,12],step_length:13,steps_list:9,steps_per_epoch:[],stereo:3,stian:[],still:[0,2,3,5,6,11,13,20],stimuli:12,stk2100:[22,23],stk3155:[15,19,21],stk4021:[22,23],stk4051:[22,23],stk4155:[19,21],stk5000:22,stk:[22,23],stochast:[0,1,5,6,8,11,12,15,16,23],stock:4,stoke:12,stone:[0,7,23],stop:[1,4,7,9,11,13,14],storag:[5,24],store:[0,1,2,3,6,11,13,20,23],storehaug:[21,23],str:[1,3,4],straight:[0,6,8,13,23,24],straightforward:[0,2,3,5,6,8,9,10,13,18,23,24],strategi:[0,1,9,23],stratifi:6,streamtyp:[],strength:[0,5,14,24],stretch:11,strict:[8,13],strictli:[8,13],stride:[4,18],strike:6,string:1,stroke:7,strong:[3,6,9,10,12,18,20],strongli:[0,8,17,18,24],stronli:[0,24],structur:[0,1,2,3,6,9,10,12,17,23],stuck:[1,13],student:[0,19,21,22,23],studi:[0,3,4,5,6,7,8,11,12,13,17,22,23,24],studier:22,style:[0,7,9,18,23],sub:[9,12],subarg:[2,13],subdivid:[0,18,23],subfield:[0,23],subject:[6,8,20],submit:23,subplot:[0,1,3,4,6,7,8,9,10,13,14,23,24],subplots_adjust:[8,20],subprogram:[18,23],subract:[0,24],subroutin:[0,23],subscript:1,subsequ:[1,4,5,6,12,18,20,24],subset:[1,6,9,12,13,17,23],subspac:[0,8,11,24],substanti:[9,10],substep:11,substitut:[3,6,12,18],subsubset:9,subtask:6,subtl:1,subtract:[0,4,5,6,11,13,18,20],subtre:9,subval:[2,13],succeed:[0,4,23],success:[3,7,9,13,20],successfulli:[4,9],sucess:[],sudo:[0,15,17,23],suffer:[0,1,2,5,10,23,24],suffici:[1,6,8,11,13],suggest:[1,13,22],suit:[8,12],suitabl:[0,20,24],sum:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,18,20,23,24],sum_:[0,1,2,3,5,6,7,8,9,10,11,12,13,14,15,16,18,20,23,24],sum_i:[0,2,5,6,8,13,24],sum_j:6,sum_ja_:0,sum_k:[6,8,12,18],sum_logist:13,sum_m:3,sum_n:3,sum_nx_:3,summar:[5,6,9],summari:[1,3,4,10,19],summat:[0,3,16,24],sunni:9,superconduct:24,superfici:3,superscript:[1,12],supervis:[0,5,6,7,9,12,17,23,24],supplement:7,support:[0,1,9,10,11,13,17,23,24],suppos:[0,5,6,7,8,10,11,12,13,18,23,24],suppress:[5,13],sure:[0,1,4,6],surf:6,surfac:[0,6,23],surpass:6,surpris:[0,23],surround:[3,17],survei:[0,5,6,23,24],suyrzm0:[],svc:[8,9,10],svd:[0,6,11,23],svdinv:5,svm:[8,9,10,11],svm_clf:[8,10],swap:[],swapax:[],swath:[5,24],sy:[3,4,13,14],symbol:[1,5,11,13,17,20,23,24],symmeteri:1,symmetr:[0,5,8,11,12,13,18,23,24],symmetri:6,sympi:[0,15,17,23],synonim:20,syntax:[1,13],syntaxerror:1,syrk:[],system:[0,1,3,4,6,7,9,10,12,13,15,17,18,23],systemat:[4,6],t0:[3,6,13],t1:[2,13],t2:2,t3:2,t:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,20,21,23],t_0:[2,9,13],t_1:13,t_:2,t_b:10,t_i:[1,2,5,12,24],t_j:12,t_k:9,tabl:[9,20,21,23],tabul:[0,23],tabular:23,tackl:4,tag:[2,3,4,5,6,7,12,13,14,18,20,24],taht:[0,23],tail:20,tailor:[2,8,11,23],taiwan:[0,23],take:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,17,18,20,23,24],taken:[0,1,3,6,10,13,18,23],tan:[2,3],tangent:[1,4,12,13],tanh:[1,4,7,8,12],tape:[],target:[0,1,3,4,5,6,7,8,9,10,11,12,23,24],target_nam:9,task:[0,1,3,6,9,11,12,14,23],tau:[3,5,20],taught:23,tax:[0,24],taylor:[2,13],taylornr:13,tc:8,td:[1,6,13,23],teach:23,team:1,teaser:0,technic:[0,5,6,13,15,23,24],techniqu:[0,1,8,10,13,17,20,22,23,24],technolog:[0,1,23],tek5040:[],tell:[0,4,6,10,11,13,20],temp1:1,temp2:1,temp:1,temperatur:[0,9,23],temporarili:1,ten:[3,23],tend:[3,5,6,8,9,10,12,13,14,24],tendenc:[0,23],tension:6,tensor:3,tensorflow:[0,2,4,8,14,15,17,18,19,22,23,24],term1:[5,6,11,24],term2:[5,6,11,24],term3:[5,6,11,24],term4:[5,6,11,24],term:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,20,23,24],termin:[0,4,5,9,10,13,15,23,24],terrain1:6,terrain:6,test:[3,4,5,6,7,8,9,10,13,18,20],test_acc:3,test_accuraci:[1,3],test_error:6,test_imag:[3,4],test_ind:6,test_input:4,test_label:[3,4],test_loss:3,test_pr:1,test_predict:1,test_rnn:4,test_scor:[7,10],test_siz:[0,1,3,5,6,10,23,24],test_split:9,testerror:[0,6,24],testi:4,testpredict:4,testx:4,text:[0,1,2,4,5,8,9,11,13,15,18,20,22,23,24],textbook:24,textual:9,textur:1,tf:[1,3,4,13,14],tfe_py_execut:[],th:[0,1,2,5,6,7,9,12,13,14,15,16,18,20,23,24],than:[0,1,2,3,4,5,6,7,9,10,11,12,13,17,20,23,24],thank:[4,6,24],theano:[1,17,23],thei:[0,1,2,3,4,5,6,7,8,9,11,12,13,18,20,24],them:[0,1,3,4,6,8,9,10,11,12,13,18,23,24],theme:[0,23],themselv:[0,20,23],thenc:6,theorem:[2,6,7,24],theoret:[0,4,10,23],theori:[0,1,3,8,9,12,13,17,22,23],thereaft:[0,5,6,11,12,15,16,18,23],therebi:[0,5,7,11,23,24],therefor:[0,1,2,3,4,6,7,8,11,13,20,23,24],therein:11,thereof:[0,6,13,23],theta:[1,4,13,20],theta_:[1,13],theta_i:1,theta_k:[],theta_linreg:13,theta_t:13,thi:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,22,24],thing:[0,1,2,4,5,7,9,20,23],think:[0,1,3,4,6,9,12,13,14,20,23],third:[0,3,6,13,21,23],thirti:7,thorughout:23,those:[0,3,5,6,8,9,10,11,18,19,23,24],though:[1,2,3,4,13,18,20],thought:[6,14,20],thousand:[0,1,23,24],thread:[],three:[0,1,3,5,6,8,9,12,15,18,19,20,21,23],threshold:[1,3,9,10,11,12,13],through:[0,1,2,3,4,5,6,8,11,12,13,14,17,18,20,23,24],throughout:[0,4,5,14,17,18,20,23],thu:[0,1,2,5,6,7,8,10,11,12,13,21,23,24],thumb:[0,6,23,24],thursdai:[21,23],tibshirani:[6,19,22,23,24],tick_param:6,ticker:[6,13,20],tif:6,tight_layout:[1,7],tightli:11,tild:[0,5,6,7,11,15,16,20,23,24],till:[0,4,7,8,9,10,12,18,23,24],time:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,16,17,18,20,23,24],timefunct:[],timeit:4,timer:4,tini:1,tip:3,titl:[0,1,2,3,4,6,7,8,9,10,13,20,23,24],tmp:13,tmp_log:[],tn:[2,3,7],to_categor:[1,3,4],to_categorical_numpi:1,to_numer:[0,6,23],to_str:[],todai:3,togeth:[0,3,6,8,11,13,17,23,24],toi:14,told:13,toler:[2,6,14],tolist:4,tomographi:12,too:[0,2,4,5,6,9,11,13,15,20,22,23,24],took:[8,23],tool:[0,1,3,6,13,17,24],toolbox:8,top:[0,3,4,5,6,9,10,14,17,23],top_node_typ:2,top_trac:2,topic:[0,5,6,7,8,17,24],topolog:[1,3,12],toposort:2,torkjellsdatt:[21,23],toss:[10,20],total:[0,1,2,3,4,6,7,8,10,11,12,13,14,15,16,18,20,21,23,24],total_loss:4,totalclustervari:14,totalscatt:14,totalvari:[],toward:[1,2,7,12,13],town:[0,24],tp:[4,7],tpng:9,tpu:[13,17,23],tqdm:6,tr:24,trace:[2,13],trace_stack:[2,13],traceback:[0,2,3,4,6,8,9,10,13,14,15,23,24],traceback_util:[],tracer:[2,13],track:[3,13,14,18],tract:[0,24],tractabl:[0,23,24],trade:[5,9],tradeoff:[0,5,23,24],tradit:[0,1,4,6,23],train:[2,3,5,6,8,9,10,11,12,13],train_accuraci:[0,1,3,23],train_dataset:4,train_end:[0,1,24],train_error:6,train_funct:[],train_imag:[3,4],train_ind:6,train_label:[3,4],train_pr:1,train_siz:[0,1,3,24],train_step:4,train_test_split:[0,1,3,5,6,7,9,10,11,23,24],train_test_split_numpi:[0,1,24],trainabl:[],trainable_vari:4,trained_model:[6,24],trainerror:[0,24],traini:4,training_checkpoint:4,training_dataset:4,training_gradi:13,training_gradient_fun:[],training_loss:[],trainingerror:6,trainpredict:4,trainscor:4,trainx:4,trait:[0,23],trajectori:4,tran:[],transfer:9,transform:[0,5,6,7,8,9,10,11,12,13,17,18,23,24],transit:[6,12],translat:[1,4,6,10,24],transpos:[1,5,11,18,24],travers:[0,5],treat:[0,1,3,6,12,13,20,23,24],tree:[0,1,6,17,23],tree_clf:[9,10],tree_clf_:9,tree_clf_sr:9,tree_reg1:9,tree_reg2:9,tree_reg:9,trend:20,treue:7,trevor:22,tri:[2,3,4,9,13],triain:0,trial:[0,2,4,6,13,20,23],triangl:13,triangular:18,trick:[3,4,8,11,13,20],trickier:20,tridiagon:18,trillion:17,trivial:[0,1,5,11,20,23],troubl:[0,8,12,24],truck:3,true_beta:[6,24],true_divid:1,true_fun:6,truli:23,tucker:8,tuesdai:[21,23],tumor:[7,9],tumour:7,tunabl:1,tune:[4,9,13,18,23],tup:[],tupl:[2,13],turn:[0,1,5,6,7,8,9,10,11,12,13,18,20,23,24],tutori:[1,4],tv:2,tveito:2,tweak:[1,4,10,20],twice:13,twist:11,twister:[],two:[0,1,2,4,5,6,7,9,10,11,12,13,14,15,16,18,19,20,22,23],tx:13,tx_1:13,txt:4,ty:13,type:[0,1,3,6,8,10,13,16,18,20,24],typeerror:[2,13],typic:[0,1,2,3,4,5,7,9,10,12,13,20,23,24],u:[0,2,5,6,10,11,12,18,23,24],u_:18,u_i:12,u_m:10,ua:[0,23],ubuntu:[0,15,17,23],uci:[0,24],uio:[21,22],un:14,unari:[18,23],unary_f:[2,13],unary_oper:[2,13],unary_to_nari:[2,13],unbalanc:[6,9],unbias:[0,5,6,23],uncent:6,uncertainti:[0,5,23],uncertitud:20,unchang:[1,3],uncorrel:[10,20],undefin:[5,24],under:[0,1,5,6,10,13,15,16,17,23,24],underdetermin:[0,23],underfit:[1,6],underflowproblem:5,undergo:5,undergradu:[19,21],underli:[0,1,9,13,20,23],underset:[4,14],understand:[0,1,3,5,6,10,13,14,17,23,24],understood:[8,13],undesir:8,undetermin:[5,8],undo:4,unexpect:6,unexpected:20,unfair:[6,24],unfortun:[1,8,9,10],unicode_liter:[8,9],uniform:[0,1,5,6,11,13,15,16,20,23,24],uniform_real_distribut:[],uniformli:[13,20],unifrompdf:20,unimport:13,union:[5,6],uniqu:[0,2,6,13,14,18,23],unique_cluster_label:14,unit:[0,1,3,4,5,10,12,20,23,24],unitari:[5,6,18,24],unitarili:[18,23],uniti:20,univari:20,univers:[0,1,2,13,15,17,19,21,23,24],unix:1,unknow:[0,18,23],unknown:[0,1,3,4,5,6,8,10,13,16,18,23,24],unknowwn:12,unlabel:1,unless:[0,3,6,11,13,23],unlik:[1,3,8,13],unnecessarili:9,unord:3,unravel:1,unrol:[3,11],unseen:[0,7,9],unstabl:1,unsupervis:[0,1,4,12,17,23],unsymmetr:[18,23],until:[1,2,4,9,12,13,14],untouch:0,unusu:12,up:[1,3,4,5,6,8,10,11,13,14,16,17,18,20,21],updat:[1,2,10,12,13,14],uploa:23,upload:[17,22],upon:[0,1,6,7,11,18],upper:[0,8,9,16,18,24],uppercas:[18,23],upsampl:4,upscal:4,us:[4,5,6,8,9,10,11,12,14,15,16,18,19,20,22],usa:23,usag:[0,8,17,23,24],usd10000:[0,24],usd:[0,24],use_bia:4,use_multiprocess:[],usecol:[0,23],useless:1,user:[0,1,2,4,6,7,8,11,15,17,18,23,24],userwarn:6,usetex:20,usg:6,usr:20,usual:[0,3,4,7,12,13,14,23],ut:5,util:[0,1,3,4,6,7,10,14,23],ux:18,v0:20,v1:[3,4,14,20],v2:[3,4,14,20],v8ejbfezkui:[],v:[2,4,5,6,11,13,17,24],v_0:11,va:1,val:13,val_accuraci:3,val_loss:4,vale:2,valid:[0,1,4,7,9,10,13,17,20,23,24],validation_batch_s:[],validation_data:3,validation_freq:[],validation_split:4,validation_step:[],valu:[0,1,2,3,4,6,7,8,9,10,12,13,14,15,16,17,18,23],valuat:9,valueerror:[0,2,23],valy:4,van:[0,23,24],vandenbergh:[8,13],vandermond:[0,23],vanilla:[0,6,11,14,24],vanish:[1,4,13,20],var_x:20,varabl:8,varepsilon:[5,6],varepsilon_:[5,6],varepsilon_i:[5,6],vari:[0,1,3,5,6,10,15,16,23],variabl:[0,1,2,5,6,7,8,10,11,12,13,14,18,23,24],varianc:[0,1,5,7,9,10,11,13,14,17,18,20,23,24],variance_i:[5,11,24],variance_x:[5,11,24],variant:[0,1,6,8,12,13,23,24],variat:[3,4,11,23],varieti:[0,3,12,15,17,23],variou:[1,3,5,6,7,8,9,11,12,13,16,17,18,20,24],vartempvec:[],varvec:[],varydimens:4,vastli:3,vaue:1,vault:0,vdot:[2,13],vec:6,vector:[0,1,2,3,4,5,6,7,9,10,11,13,14,16,17],vector_mean:14,ventur:[0,8,15,17,23],verbos:[1,3,4],veri:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,20,22,23,24],verifi:[3,11,18,23],versatil:[8,23],versicolor:[8,9],version:[0,3,10,13,14,15,17,18,20,23],versu:1,vert:[0,1,5,6,7,8,9,11,13,23,24],vert_1:[5,6,24],vert_2:[5,6,11,24],via:[0,5,6,7,8,9,10,11,12,15,17,18,19,20,21,23,24],vidal:11,video:[0,1,12,17,19,21,23],view:[1,3,5,6,12,13,20,22,23],violat:8,virginica:9,viridi:[0,1,2,3,23],virtual:1,viscos:13,viscou:13,visibledeprecationwarn:2,vision:[0,3,23],visual:[0,3,11,12,15,17,23,24],visualis:1,viz:[6,8,20],vjiseqm2lci:[],vjp:[2,13],vjp_0:[],vjp_0_fun:[],vjp_1:[],vjp_1_fun:[],vjp_argnum:2,vjpfun:2,vjpmaker:[],vjpnode:[2,13],vmap:13,vmax:[1,6],vmc:[],vmin:[1,6],voic:3,volum:[0,3,23],vote:10,voting_clf:10,votingclassifi:10,votingsimpl:10,vrtx:[],vs:[0,4,6,24],vspace:[2,13],vstack:[5,11,18,20,23,24],vt:[5,24],w1:8,w2:[8,11],w3:8,w:[0,1,2,3,4,5,6,7,8,10,11,12,13,14,18,20,23,24],w_1:[8,18],w_1x_1:8,w_1x_:8,w_2:[8,18],w_2x_2:8,w_2x_:8,w_3:18,w_4:18,w_:[1,12],w_hidden:2,w_i:[1,2,10],w_ix_i:12,w_j:18,w_m:18,w_output:2,w_px_:8,w_px_p:8,wa:[0,1,3,4,5,6,7,10,11,12,13,14,18,23,24],wai:[0,1,2,3,4,5,6,7,8,10,11,12,13,14,18,20,23,24],walk:9,walker:20,wang:[0,23],want:[0,1,2,3,4,5,6,8,9,10,11,12,13,14,15,16,17,20,23,24],warn:[0,1,4,8,23],warrant:6,wast:3,watch:17,wave:3,wavelet:8,we:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,24],weak:[9,10,14],weather:[1,12],web:[17,19,21,23,24],webpag:23,websit:[6,18,19,23],wedg:[8,20],wednesdai:[21,23],wee:11,week:[0,5,6,7,19,21],weekli:[17,21,22,23],weight:[0,1,2,3,6,7,9,10,12,13,20,24],weigth:2,welcom:[8,17],well:[0,1,2,3,4,5,6,7,8,9,10,12,13,15,16,17,18,20,22,23,24],went:8,were:[0,1,3,4,5,6,7,8,10,11,12,14,20,23,24],wessel:[0,23,24],westbi:[],westby:[],what:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,20],whatev:3,when:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,16,18,20,23,24],whenev:[13,20],where:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,20,21,23,24],wherea:[6,20],wherein:[1,12],whether:[0,3,5,7,9,20,23],which:[0,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,23,24],whichev:[1,3],white:9,who:[0,19,23],whole:[1,3,4,5,9,11,13],whose:[0,6,10,20,24],whow:[11,24],why:[0,1,3,6,13],wide:[0,1,3,6,7,12,15,17,18,23],widehat:6,width:[0,3,8,9,23],wieringen:[0,23,24],win:10,wind:9,wing:[21,23],winther:2,wiothout:[6,24],wiscons:7,wisconsin:10,wisdom:6,wise:[0,1,5,12,13,24],wish:[0,2,5,7,8,11,13,14,18,23,24],with_std:[0,24],wither:6,within:[0,2,3,4,7,9,12,13,14,20,22,23],withinclust:14,without:[0,1,5,6,8,9,11,12,13,23,24],won:[0,23],wonder:8,woodi:23,word:[0,1,3,4,5,6,7,14,20,23,24],work:[0,1,4,6,7,8,9,13,15,17,19,20,21,23,24],worker:[],workshop:23,world:[0,8,23,24],worldwid:[0,23],wors:[0,1,3,4,6,23],worst:[],worth:9,would:[0,1,3,5,6,7,8,9,10,11,12,13,18,20,23,24],wrap:[2,6,18,23],wrap_toco:[3,4,14],wrap_util:[2,13],wrapper:[0,23],write:[0,1,2,3,5,6,7,8,12,13,15,16,18,23,24],written:[0,2,3,5,11,12,13,16,17,18,20,23,24],wrong:[1,8],wrongli:10,wrote:[5,11,24],wrt:[2,10,13],wth:[10,13],www:[17,18,22,23],wx_1:8,x0:8,x1:[4,8,9,10,13],x1_exampl:8,x1d:8,x2:[8,9,10,13],x2d:[8,11],x2d_train:11,x2dsl:11,x3:8,x:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,18,20,23],x_0:[0,5,11,18,23,24],x_1:[0,2,5,6,7,8,9,10,11,13,18,20,23,24],x_2:[0,2,5,6,7,8,9,10,11,13,18,20,23,24],x_3:[8,18,20],x_4:18,x_:[0,2,3,5,6,8,10,11,13,14,18,20,23,24],x_center:11,x_data:1,x_data_ful:1,x_hidden:2,x_i:[0,1,2,5,6,7,8,9,10,11,12,13,14,18,20,23,24],x_input:2,x_ix_:[0,23],x_iy_i:8,x_j:[0,2,8,9,12,16,20,24],x_jy_j:8,x_k:[12,14,18,20,24],x_l:20,x_m:[6,12,18,20],x_n:[0,2,3,6,8,11,12,13,18,20,23],x_new:[9,10],x_offset:[6,24],x_output:2,x_p:[3,7,9],x_poli:9,x_poly10:9,x_pred:4,x_prev:2,x_reduc:11,x_scale:8,x_small:13,x_test:[0,1,3,5,6,7,9,10,11,23,24],x_test_own:6,x_test_scal:[0,6,7,9,10,11,24],x_tot:4,x_train:[0,1,3,4,5,6,7,9,10,11,23,24],x_train_mean:[6,24],x_train_own:6,x_train_scal:[0,6,7,9,10,11,24],x_val:1,xarrai:[17,23],xavier:1,xbnew:13,xcode:[0,15,17,23],xdclassiffierconfus:10,xdclassiffierroc:10,xg_clf:10,xgb:10,xgbclassifi:10,xgboost:9,xgboot:10,xgbregressor:10,xgparam:10,xgtree:10,xi:[8,13],xi_1:8,xi_:8,xi_i:8,xk:8,xla:[13,17,23],xlabel:[0,1,2,3,4,5,6,7,8,9,10,13,20,23,24],xlim:[6,10],xm:9,xmesh:13,xnew:[0,13,23],xp:20,xpanda:[0,24],xpd:[5,11,24],xplot:0,xs:9,xscale:[0,24],xsr:9,xt_x:13,xtest:6,xtick:[3,6,8,9],xtrain:6,xu:[0,23],xx:[0,18,23],xy:[0,6,8,18,23],xytext:8,xz:[18,23],y1:4,y2:4,y3:4,y:[0,1,3,4,5,6,7,8,9,10,11,12,13,14,15,16,18,20,23,24],y_0:[0,5,11,18,23,24],y_1:[0,5,8,9,11,13,18,23,24],y_1y_1:8,y_1y_1k:8,y_1y_2:8,y_1y_2k:8,y_1y_n:8,y_1y_nk:8,y_2:[0,5,8,9,11,18,23,24],y_2y_1:8,y_2y_1k:8,y_2y_2:8,y_2y_2k:8,y_3:[0,9,18],y_4:18,y_:[0,1,5,6,10,11,18,23,24],y_data:[0,1,5,6,23,24],y_data_ful:1,y_decis:8,y_fit:[0,24],y_i:[0,1,5,6,7,8,9,10,11,12,13,15,16,18,23,24],y_if_:10,y_ix_:[0,23],y_ix_i:[7,8,13,24],y_iy_jk:8,y_j:[6,8,12],y_k:12,y_m:18,y_model:[0,4,5,6,23,24],y_n:[8,13],y_ny_1:8,y_ny_1k:8,y_ny_2:8,y_ny_2k:8,y_ny_n:8,y_ny_nk:8,y_offset:[6,24],y_plot:9,y_pred1:9,y_pred2:9,y_pred:[0,1,4,6,7,8,9,10,24],y_pred_rf:10,y_pred_tre:10,y_proba:[7,10],y_scaler:6,y_test:[0,1,3,4,5,6,7,9,10,11,23,24],y_test_onehot:1,y_test_predict:[0,24],y_tot:4,y_train:[0,1,3,4,5,6,7,9,10,11,23,24],y_train_mean:[6,24],y_train_onehot:1,y_train_predict:[0,24],y_train_scal:6,y_val:1,ye:[3,6,7],year:[0,17,23],yet:[0,1,6,8,11,13,23],yhd5w:[],yi:13,yield:[0,2,5,6,8,10,12,13,14,18,20,23],yk:8,ylabel:[0,1,2,3,4,5,6,7,8,9,10,13,20,23,24],ylim:[3,6],ym:9,ymesh:13,yn:0,yo:[8,9,10],yoshua:[1,22],you:[0,1,2,3,4,5,6,8,9,10,11,13,15,16,17,18,20,21,22,24],young:[0,23],your:[1,2,4,5,6,8,11,13,17,18],yourself:[11,13,23],youtu:[],youtub:17,ypred:6,ypredict2:13,ypredict:[0,13,23,24],ypredictlasso:5,ypredictol:[0,5],ypredictown:[6,24],ypredictownridg:6,ypredictridg:[0,5,6],ypredictskl:[6,24],yridg:23,ys:9,ytest:6,ytick:[3,6,8,9],ytild:[0,6,23,24],ytildelasso:5,ytildenp:[0,23,24],ytildeol:[0,5],ytildeownridg:6,ytilderidg:[5,6],ytrain:6,yvqgvcsovpw:[],yx:[18,23],yy:[18,23],yz:[18,23],yzbxji6lgl0:[],z:[0,1,2,3,4,5,6,7,8,9,11,12,13,18,20,23,24],z_0:[18,23],z_1:[18,23],z_2:[18,23],z_:[1,2,12,18,23],z_c:1,z_h:1,z_hidden:2,z_i:[1,12],z_j:[1,12],z_k:[12,24],z_m:1,z_mod:9,z_o:1,z_output:2,zaman:20,zaxi:6,zero:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,18,20,23,24],zeros_lik:4,zeroth:24,zfill:4,zip:[2,4,6,13],zl:[],zm_h:[0,23],zn:[0,24],zone:[0,24],zoom:23,zx:[18,23],zy:[18,23],zz:[18,23]},titles:["3. Linear Regression","14. Building a Feed Forward Neural Network","15. Solving Differential Equations with Deep Learning","16. Convolutional Neural Networks","17. Recurrent neural networks: Overarching view","4. Ridge and Lasso Regression","5. Resampling Methods","6. Logistic Regression","8. Support Vector Machines, overarching aims","9. Decision trees, overarching aims","10. Ensemble Methods: From a Single Tree to Many Trees and Extreme Boosting, Meet the Jungle of Methods","11. Basic ideas of the Principal Component Analysis (PCA)","13. Neural networks","7. Optimization, the central part of any Machine Learning algortithm","12. Clustering and Unsupervised Learning","19. Exercises week 34","Exercises week 35","Applied Data Analysis and Machine Learning","2. Linear Algebra, Handling of Arrays and more Python Features","Teaching schedule with links to material","1. Elements of Probability Theory and Statistical Data Analysis","Teachers and Grading","Textbooks","20. Week 34: Introduction to the course, Logistics and Practicalities","Week 35: From Ordinary Linear Regression to Ridge and Lasso Regression"],titleterms:{"1":[0,15,16,23,24],"10":[],"11":[],"12":[],"13":[],"14":[],"15":[],"16":[],"17":[],"18":[],"19":[],"2":[0,15,16,23,24],"20":[],"2021":[],"2022":[],"2023":21,"21":[],"22":[],"23":[],"24":[],"25":[],"26":[],"27":[],"28":[],"29":[],"3":[0,15,16,23,24],"30":[],"31":24,"34":[15,23],"35":[16,24],"36":[],"37":[],"38":[],"39":[],"4":[0,24],"40":[],"41":[],"4155":[],"42":[],"43":[],"44":[],"45":[],"46":[],"47":[],"5":0,"6":[],"7":[],"8":[],"9":[],"case":[8,10,20,24],"do":[1,23],"final":[12,24],"function":[0,1,6,7,8,10,11,12,13,20,23,24],"import":[5,18,23,24],"new":4,A:[0,1,4,8,9,23],And:[23,24],In:21,Ising:6,The:[0,1,2,3,5,6,7,8,9,11,12,17,23,24],To:[23,24],With:4,about:[23,24],activ:[1,12],actual:[],ad:[0,6,23,24],adaboost:10,adagrad:13,adam:13,adapt:10,adjust:1,adversari:4,again:[3,9],ai:23,aim:[8,9,23],aka:[23,24],algebra:[18,23],algorithm:[9,10,11,12,24],algortithm:13,all:8,an:[0,4,10,23],analys:[5,24],analysi:[0,5,6,11,17,20,23,24],analyt:[0,16],ani:13,anoth:9,appli:17,approach:[0,8,14,23],approxim:12,architectur:1,arrai:[18,23],assist:21,august:24,autocorrel:20,autograd:[2,13],automat:13,back:[1,11,12],background:17,bag:10,base:13,basic:[0,5,7,9,10,11,18,24],batch:1,bay:5,befor:11,better:8,bia:6,binari:1,bind:23,binomi:[],bird:10,block:[],boldsymbol:24,boost:10,bootstrap:[6,10],boston:[0,24],breast:1,brief:23,bring:12,build:[1,3,9],c:23,calcul:24,can:23,cancer:[1,7,9,11],cart:9,center:24,central:[13,17,20],chain:12,chang:10,channel:23,chi:[0,23],choos:1,cifar01:3,classic:11,classif:[1,9,10],classifi:8,clip:1,cluster:14,cnn:3,code:[0,1,2,5,9,11,12,13,14,23,24],collect:[1,3],commun:23,compar:[2,10],complet:24,complex:[0,6,24],complic:6,compon:11,comput:9,computerlab:23,con:9,concept:20,conjug:13,continu:[],contn:23,convex:[8,13],convolut:[3,12],correl:[11,24],cost:[1,10,24],cours:[17,22,23],covari:[5,11,20,24],cover:23,cross:6,cumul:[],cython:23,data:[0,1,3,6,7,9,11,15,16,17,20,23,24],dataset:[1,3],deadlin:23,decai:2,decis:[9,10],decomposit:[5,11,18,24],deep:[1,2],defin:[1,23],definit:[],degre:[0,24],demonstr:[],dens:[0,23],deriv:[5,12,24],descent:[2,10,13],design:24,detail:[3,23],develop:1,deviat:[],diagon:11,dice:[],differ:8,differenti:[2,13],diffus:2,dimension:[2,3,8,24],disadvantag:9,discret:20,disguis:[],distribut:[5,20],doe:24,domain:20,down:1,dropout:1,economi:24,element:[0,20,23],elimin:18,energi:23,ensembl:10,entropi:9,environ:[0,15,23],equat:[0,2,12,23,24],error:[0,10,23,24],essenti:23,etc:23,euler:2,evalu:1,event:[],exampl:[0,1,2,3,4,6,7,8,9,10,23,24],exercis:[0,6,15,16,23,24],expect:20,experi:20,explor:[0,15,16,23],exponenti:2,express:[23,24],extrapol:4,extrem:[10,23],ey:10,fall:21,famili:[1,23,24],famou:18,fantast:24,featur:[9,18,24],feed:[1,12],fine:1,first:[4,12,23,24],fit:[0,10,23],fix:24,forc:3,forest:10,format:23,forward:[1,2,12],fourier:3,frank:[6,24],freedom:[0,24],frequent:24,frequentist:[0,23],from:[5,10,12,24],full:2,further:[3,5,24],fy:[],gan:4,gaussian:18,gd:13,gener:[4,9,23],geometr:11,gini:9,good:[0,23],grade:[21,23],gradient:[1,2,10,13],growth:2,ha:17,handl:[18,23,24],have:23,heard:23,hessian:24,hidden:2,hous:[0,24],how:[],hyperparamet:1,hyperplan:8,i:1,id3:9,idea:11,ii:23,implement:1,implic:[5,24],improv:1,includ:13,increment:11,index:9,inform:21,input:2,instal:[17,23],instructor:21,intercept:24,interpret:[5,11,23,24],introduc:[11,13,24],introduct:[0,6,17,18,23],invers:[5,18],invert:24,iter:10,its:24,jackknif:[],jacobian:24,jax:13,julia:23,jungl:10,kera:[1,3],kernel:[8,11],lagrangian:8,lasso:[5,6,24],last:24,later:[5,24],layer:[1,2,3,12],learn:[0,1,2,11,13,14,15,16,17,23,24],least:[5,6,23,24],lectur:[23,24],level:10,librari:[17,23],likelihood:7,limit:[1,13,20],linear:[0,8,13,18,23,24],link:[5,11,19,22,24],logist:[7,23],loss:24,lu:18,machin:[0,8,13,17,23],mai:23,main:20,make:[0,9,10,15,16,23,24],mani:[10,12],manipul:24,mass:23,materi:[19,23,24],math:[5,24],mathemat:[3,5,8,24],matric:[5,18,23],matrix:[1,5,11,12,18,23,24],matter:[0,23],max:24,mean:[0,23,24],meet:[5,10,20,23,24],mercer:8,mersenn:[],method:[6,9,10,13],min:24,minim:23,ml:23,mlp:12,mnist:[3,4],model:[0,1,4,6,12,23],moment:[],momentum:13,moon:[8,9],more:[3,6,18,23,24],multilay:12,multipl:[1,3],multipli:8,name:[],need:23,network:[1,2,3,4,7,12,23],neural:[1,2,3,4,7,12,23],non:8,normal:[0,1],norwai:[],notat:12,note:24,novemb:[],now:[1,9,13],nuclear:[0,23],nueral:[],numba:23,number:[0,2,20,24],numer:[2,20],numpi:[18,23],object:3,observ:[],obtain:11,octob:[],od:2,off:6,ol:[5,6],one:[2,12],oper:18,optim:[1,8,13,17,23,24],order:13,ordinari:[5,6,23,24],organ:[0,23],oslo:22,other:[4,9,11,12,18,23,24],our:[0,4,5,11,13,23,24],outcom:[17,23],output:2,overarch:[0,4,8,9,23,24],overview:[10,23],own:[0,10,11,15,16,23,24],packag:[18,23],panda:[23,24],paramet:[23,24],part:[13,17,24],partial:2,pass:1,pca:11,pdf:20,perceptron:12,perform:[1,9],period:3,perspect:1,plan:24,point:4,poisson:2,polynomi:3,popul:2,practic:[13,21,23],pre:[1,3],predict:4,preprocess:24,prerequisit:[3,17,23],princip:11,principl:3,pro:9,probabl:[5,20],problem:[1,2,13,23,24],procedur:[9,23],process:[1,3],program:[2,13],project:[6,23],prop:13,propag:[1,12],properti:[5,20,24],pseudo:[],python:[0,9,15,17,18,23],quick:8,r:23,ran0:[],random:[10,11,20],read:[9,23,24],real:[6,23],recip:[],recommend:[23,24],recurr:[4,12],reduc:[0,24],reduct:3,reformul:2,regress:[0,5,6,7,9,10,13,23,24],regular:1,relat:24,relev:[22,24],relu:1,remark:3,remind:[6,8,23],repeat:24,replac:13,requir:[2,17],resampl:6,rescal:6,residu:24,resourc:2,result:24,revisit:13,rewrit:[23,24],ridg:[0,5,6,24],rm:13,rng:[],rule:12,s:[8,10],same:13,sampl:11,scale:24,schedul:[19,23],schemat:9,scheme:2,scienc:23,scikit:[0,1,11,15,16,23,24],second:13,select:[],semest:21,septemb:[],set:[0,2,3,9,12,15,23,24],sgd:13,should:1,similar:13,simpl:[0,4,9,13,23,24],singl:10,singular:[5,11,24],situat:[],size:24,soft:8,softmax:1,softwar:23,solv:2,solver:13,some:[13,18,23,24],specifi:2,split:[0,15,16,23,24],squar:[0,5,6,10,23,24],standard:[13,24],state:[0,23],statement:23,statist:[5,6,17,20,23],steepest:[10,13],still:24,stk3155:[],stochast:[13,20],strongli:23,subtract:24,suggest:23,summari:[21,23],superposit:3,supervis:1,support:8,svd:[5,24],systemat:3,t:24,teach:[19,21],teacher:[21,23],techniqu:[6,11],technolog:17,tensorflow:[1,3],tent:23,test:[0,1,15,16,23,24],textbook:[22,23],thei:23,theorem:[5,8,11,12,20],theori:20,thi:23,think:24,three:[],thursdai:24,tip:13,togeth:12,tool:23,top:1,topic:23,toss:[],toward:11,trade:6,tradeoff:6,train:[0,1,4,15,16,23,24],transform:3,tree:[9,10],tune:1,two:[3,8,17,24],type:[2,4,12,23],uio:23,uncorrel:[],uniform:[],univers:[12,22],unsupervis:14,up:[0,2,9,12,15,23,24],us:[0,1,2,3,7,13,17,23,24],valid:6,valu:[5,11,20,24],variabl:20,varianc:6,variou:[0,15,23],vector:[8,12,18,23,24],view:[0,4,10,24],visual:[1,9],vs:3,wai:9,wave:2,we:23,week:[15,16,23,24],weekli:19,what:[0,23,24],which:1,why:[23,24],wisconsin:7,wrap:24,write:[4,11],x:24,xgboost:10,you:23,your:[0,10,15,16,23,24]}}) \ No newline at end of file diff --git a/doc/LectureNotes/_build/html/week35.html b/doc/LectureNotes/_build/html/week35.html new file mode 100644 index 000000000..ac1b034c7 --- /dev/null +++ b/doc/LectureNotes/_build/html/week35.html @@ -0,0 +1,3588 @@ + + + + + + + + Week 35: From Ordinary Linear Regression to Ridge and Lasso Regression — Applied Data Analysis and Machine Learning + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + + + + + +
    + +
    +
    + +
    + + + + + + + + + + + + + + +
    + + +
    + +
    + Contents +
    + +
    +
    +
    +
    +
    + +
    +

    Week 35: From Ordinary Linear Regression to Ridge and Lasso Regression

    + +
    +
    + +
    +

    Contents

    +
    + +
    +
    +
    + +
    + + +
    +

    Week 35: From Ordinary Linear Regression to Ridge and Lasso Regression¶

    +

    Morten Hjorth-Jensen, Department of Physics, University of Oslo and Department of Physics and Astronomy and National Superconducting Cyclotron Laboratory, Michigan State University

    +

    Date: August 28-September 1

    +
    +

    Plans for week 35¶

    +

    The main topics are:

    +
      +
    1. Brief repetition from last week

    2. +
    3. Derivation of the equations for ordinary least squares

    4. +
    5. Discussion on how to prepare data and examples of applications of linear regression

    6. +
    7. Material for the lecture on Thursday: Mathematical interpretations of linear regression

    8. +
    9. Thursday: Ridge and Lasso regression and Singular Value Decomposition

    10. +
    +
    +

    Reading recommendations:¶

    +
      +
    1. See lecture notes for week 35 at https://compphysics.github.io/MachineLearning/doc/web/course.html

    2. +
    3. Goodfellow, Bengio and Courville, Deep Learning, chapter 2 on linear algebra and sections 3.1-3.10 on elements of statistics

    4. +
    5. Hastie, Tibshirani and Friedman, The elements of statistical learning, sections 3.1-3.4

    6. +
    +
    +
    +
    +

    Why Linear Regression (aka Ordinary Least Squares and family), repeat from last week¶

    +

    We need first a reminder from last week about linear regression.

    +

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

    +
      +
    • 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 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

    • +
    • Easy to code! And links well with classification problems and logistic regression and neural networks

    • +
    • Allows for easy hands-on understanding of gradient descent methods

    • +
    • and many more features

    • +
    +

    For more discussions of Ridge and Lasso regression, Wessel van Wieringen’s article is highly recommended. +Similarly, Mehta et al’s article is also recommended.

    +
    +
    +

    The equations for ordinary least squares¶

    +

    Our data which we want to apply a machine learning method on, consist +of a set of inputs \(\boldsymbol{x}^T=[x_0,x_1,x_2,\dots,x_{n-1}]\) and the +outputs we want to model \(\boldsymbol{y}^T=[y_0,y_1,y_2,\dots,y_{n-1}]\). +We assume that the output data can be represented (for a regression case) by a continuous function \(f\) +through

    +
    +\[ +y_i=f(x_i)+\epsilon_i, +\]
    +

    or in general

    +
    +\[ +\boldsymbol{y}=f(\boldsymbol{x})+\boldsymbol{\epsilon}, +\]
    +

    where \(\boldsymbol{\epsilon}\) represents some noise which is normally assumed to +be distributed via a normal probability distribution with zero mean +value and a variance \(\sigma^2\).

    +

    In linear regression we approximate the unknown function with another +continuous function \(\tilde{\boldsymbol{y}}(\boldsymbol{x})\) which depends linearly on +some unknown parameters +\(\boldsymbol{\beta}^T=[\beta_0,\beta_1,\beta_2,\dots,\beta_{p-1}]\).

    +

    Last week we introduced the so-called design matrix in order to define +the approximation \(\boldsymbol{\tilde{y}}\) via the unknown quantity +\(\boldsymbol{\beta}\) as

    +
    +\[ +\boldsymbol{\tilde{y}}= \boldsymbol{X}\boldsymbol{\beta}, +\]
    +

    and in order to find the optimal parameters \(\beta_i\) we defined a function which +gives a measure of the spread between the values \(y_i\) (which +represent the output values we want to reproduce) and the parametrized +values \(\tilde{y}_i\), namely the so-called cost/loss function.

    +
    +
    +

    The cost/loss function¶

    +

    We used the mean squared error to define the way we measure the quality of our model

    +
    +\[ +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\}, +\]
    +

    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\}. +\]
    +

    This function represents one of many possible ways to define the so-called cost function.

    +

    It is also common to define +the function \(C\) as

    +
    +\[ +C(\boldsymbol{\beta})=\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.

    +
    +
    +

    Interpretations and optimizing our parameters¶

    +

    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\}, +\]
    +

    can be linked to the variance of the quantity \(y_i\) if we interpret the latter as the mean value. +When linking (see the discussions next week) 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, +\]
    +

    where \(\langle y_i \rangle\) is the mean value. Keep in mind also that +till now we have treated \(y_i\) as the exact value. Normally, the +response (dependent or outcome) variable \(y_i\) is the outcome of a +numerical experiment or another type of experiment and could thus be treated itself as an +approximation to the true value. It is then always accompanied by an +error estimate, often limited to a statistical error estimate given by +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

    +
    +\[ +{\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\}. +\]
    +

    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, +\]
    +

    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, +\]
    +

    or in a matrix-vector form as (multiplying away the factor \(-2/n\), see derivation below)

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

    Interpretations and optimizing our parameters¶

    +

    We can rewrite, see the derivations below,

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

    as

    +
    +\[ +\boldsymbol{X}^T\boldsymbol{y} = \boldsymbol{X}^T\boldsymbol{X}\boldsymbol{\beta}, +\]
    +

    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}. +\]
    +

    We note also that since our design matrix is defined as \(\boldsymbol{X}\in +{\mathbb{R}}^{n\times p}\), the product \(\boldsymbol{X}^T\boldsymbol{X} \in +{\mathbb{R}}^{p\times p}\). In the above case we have that \(p \ll n\), +in our case \(p=5\) meaning that we end up with inverting a small +\(5\times 5\) matrix. This is a rather common situation, in many cases we end up with low-dimensional +matrices to invert. The methods discussed here and for many other +supervised learning algorithms like classification with logistic +regression or support vector machines, exhibit dimensionalities which +allow for the usage of direct linear algebra methods such as LU decomposition or Singular Value Decomposition (SVD) for finding the inverse of the matrix +\(\boldsymbol{X}^T\boldsymbol{X}\).

    +

    Small question: Do you think the example we have at hand here (the nuclear binding energies) can lead to problems in inverting the matrix \(\boldsymbol{X}^T\boldsymbol{X}\)? What kind of problems can we expect?

    +
    +
    +

    Some useful matrix and vector expressions¶

    +

    The following matrix and vector relation will be useful here and for +the rest of the course. Vectors are always written as boldfaced lower +case letters and matrices as upper case boldfaced letters. In the +following we will discuss how to calculate derivatives of various +matrices relevant for machine learning. We will often represent our +data in terms of matrices and vectors.

    +

    Let us introduce first some conventions. We assume that \(\boldsymbol{y}\) is a +vector of length \(m\), that is it has \(m\) elements \(y_0,y_1,\dots, +y_{m-1}\). By convention we start labeling vectors with the zeroth +element, as are arrays in Python and C++/C, for example. Similarly, we +have a vector \(\boldsymbol{x}\) of length \(n\), that is +\(\boldsymbol{x}^T=[x_0,x_1,\dots, x_{n-1}]\).

    +

    We assume also that \(\boldsymbol{y}\) is a function of \(\boldsymbol{x}\) through some +given function \(f\)

    +
    +\[ +\boldsymbol{y}=f(\boldsymbol{x}). +\]
    +
    +
    +

    The Jacobian¶

    +

    We define the partial derivatives of the various components of \(\boldsymbol{y}\) as functions of \(x_i\) in terms of the so-called Jacobian matrix

    +
    +\[\begin{split} +\boldsymbol{J}=\frac{\partial \boldsymbol{y}}{\partial \boldsymbol{x}}=\begin{bmatrix} \frac{\partial y_0}{\partial x_0} & \frac{\partial y_0}{\partial x_1} & \frac{\partial y_0}{\partial x_2} & \dots & \dots & \frac{\partial y_0}{\partial x_{n-1}} \\ \frac{\partial y_0}{\partial x_0} & \frac{\partial y_1}{\partial x_1} & \frac{\partial y_1}{\partial x_2} & \dots & \dots & \frac{\partial y_1}{\partial x_{n-1}} \\ +\frac{\partial y_2}{\partial x_0} & \frac{\partial y_2}{\partial x_1} & \frac{\partial y_2}{\partial x_2} & \dots & \dots & \frac{\partial y_2}{\partial x_{n-1}} \\ +\dots & \dots & \dots & \dots & \dots & \dots \\ +\dots & \dots & \dots & \dots & \dots & \dots \\ +\frac{\partial y_{m-1}}{\partial x_0} & \frac{\partial y_{m-1}}{\partial x_1} & \frac{\partial y_{m-1}}{\partial x_2} & \dots & \dots & \frac{\partial y_{m-1}}{\partial x_{n-1}} \end{bmatrix}, +\end{split}\]
    +

    which is an \(m\times n\) matrix. If \(\boldsymbol{x}\) is a scalar, then the +Jacobian is only a single-column vector, or an \(m\times 1\) matrix. If +on the other hand \(\boldsymbol{y}\) is a scalar, the Jacobian becomes a +\(1\times n\) matrix.

    +

    When this matrix is a square matrix \(m=n\), its determinant is often referred to as the Jacobian +determinant. Both the matrix and (if \(m=n\)) the determinant are +often referred to simply as the Jacobian. The Jacobian matrix represents the differential of \(\boldsymbol{y}\) at every point where the +vector is differentiable.

    +
    +
    +

    Derivatives, example 1¶

    +

    Let now \(\boldsymbol{y}=\boldsymbol{A}\boldsymbol{x}\), where \(\boldsymbol{A}\) is an \(m\times n\) matrix and the matrix does not depend on \(\boldsymbol{x}\). If we write out the vector \(\boldsymbol{y}\) compoment by component we have

    +
    +\[ +y_i = \sum_{j=0}^{n-1}a_{ij}x_j, +\]
    +

    with \(\forall i=0,1,2,\dots,m-1\). The individual matrix elements of \(\boldsymbol{A}\) are given by the symbol \(a_{ij}\). +It follows that the partial derivatives of \(y_i\) with respect to \(x_k\)

    +
    +\[ +\frac{\partial y_i }{\partial x_k}= a_{ik} \forall i=0,1,2,\dots,m-1. +\]
    +

    From this we have, using the definition of the Jacobian

    +
    +\[ +\frac{\partial \boldsymbol{y} }{\partial \boldsymbol{x}}= \boldsymbol{A}. +\]
    +
    +
    +

    Example 2¶

    +

    We define a scalar (our cost/loss functions are in general also scalars, +just think of the mean squared error) as the result of some matrix vector +multiplications

    +
    +\[ +\alpha = \boldsymbol{y}^T\boldsymbol{A}\boldsymbol{x}, +\]
    +

    with \(\boldsymbol{y}\) a vector of length \(m\), \(\boldsymbol{A}\) an \(m\times n\) matrix and \(\boldsymbol{x}\) a vector of length \(n\). We assume also that \(\boldsymbol{A}\) does not depend on any of the two vectors. +In order to find the derivative of \(\alpha\) with respect to the two vectors, we define an intermediate vector \(\boldsymbol{z}\). We define first +\(\boldsymbol{z}^T=\boldsymbol{y}^T\boldsymbol{A}\), a vector of length \(n\). We have then

    +
    +\[ +\alpha = \boldsymbol{z}^T\boldsymbol{x}, +\]
    +

    which means that (using our previous example) we have

    +
    +\[ +\frac{\partial \alpha}{\partial \boldsymbol{x}} = \boldsymbol{z}^T=\boldsymbol{y}^T\boldsymbol{A}. +\]
    +

    Since \(\alpha\) is a scalar we have \(\alpha =\alpha^T=\boldsymbol{x}^T\boldsymbol{A}^T\boldsymbol{y}\). Defining now \(\boldsymbol{z}=\boldsymbol{x}^T\boldsymbol{A}^T\) we find that

    +
    +\[ +\frac{\partial \alpha}{\partial \boldsymbol{y}} = \boldsymbol{z}^T=\boldsymbol{x}^T\boldsymbol{A}^T. +\]
    +
    +
    +

    Example 3¶

    +

    We start with a new scalar but where now the vector \(\boldsymbol{y}\) is +replaced by a vector \(\boldsymbol{x}\) and the matrix \(\boldsymbol{A}\) is a square +matrix with dimension \(n\times n\).

    +
    +\[ +\alpha = \boldsymbol{x}^T\boldsymbol{A}\boldsymbol{x}, +\]
    +

    with \(\boldsymbol{x}\) a vector of length \(n\).

    +

    We write out the specific sums involved in the calculation of \(\alpha\)

    +
    +\[ +\alpha = \sum_{i=0}^{n-1}\sum_{j=0}^{n-1}x_i a_{ij}x_j, +\]
    +

    taking the derivative of \(\alpha\) with respect to a given component \(x_k\) we get the two sums

    +
    +\[ +\frac{\partial \alpha}{\partial x_k} = \sum_{i=0}^{n-1}a_{ik}x_i+\sum_{j=0}^{n-1}a_{kj}x_j, +\]
    +

    for \(\forall k =0,1,2,\dots,n-1\). We identify these sums as

    +
    +\[ +\frac{\partial \alpha}{\partial \boldsymbol{x}} = \boldsymbol{x}^T\left(\boldsymbol{A}^T+\boldsymbol{A}\right). +\]
    +

    If the matrix \(\boldsymbol{A}\) is symmetric, that is \(\boldsymbol{A}=\boldsymbol{A}^T\), we have

    +
    +\[ +\frac{\partial \alpha}{\partial \boldsymbol{x}} = 2\boldsymbol{x}^T\boldsymbol{A}. +\]
    +
    +
    +

    Example 4¶

    +

    We let the scalar \(\alpha\) be defined by

    +
    +\[ +\alpha = \boldsymbol{y}^T\boldsymbol{x}, +\]
    +

    where both \(\boldsymbol{y}\) and \(\boldsymbol{x}\) have the same length \(n\), or if we +wish to think of them as column vectors, they have dimensions \(n\times +1\). We assume that both \(\boldsymbol{y}\) and \(\boldsymbol{x}\) depend on a vector +\(\boldsymbol{z}\) of the same length. To calculate the derivative of \(\alpha\) +with respect to a given component \(z_k\) we need first to write out the +inner product that defines \(\alpha\) as

    +
    +\[ +\alpha = \sum_{i=0}^{n-1}y_ix_i, +\]
    +

    and the partial derivative

    +
    +\[ +\frac{\partial \alpha}{\partial z_k} = \sum_{i=0}^{n-1}\left(x_i\frac{\partial y_i}{\partial z_k}+y_i\frac{\partial x_i}{\partial z_k}\right), +\]
    +

    for \(\forall k =0,1,2,\dots,n-1\). We can rewrite the partial derivative in a more compact form as

    +
    +\[ +\frac{\partial \alpha}{\partial \boldsymbol{z}} = \boldsymbol{x}^T\frac{\partial \boldsymbol{y}}{\partial \boldsymbol{z}}+\boldsymbol{y}^T\frac{\partial \boldsymbol{x}}{\partial \boldsymbol{z}}, +\]
    +

    and if \(\boldsymbol{y}=\boldsymbol{x}\) we have

    +
    +\[ +\frac{\partial \alpha}{\partial \boldsymbol{z}} = 2\boldsymbol{x}^T\frac{\partial \boldsymbol{x}}{\partial \boldsymbol{z}}. +\]
    +
    +
    +

    The mean squared error and its derivative¶

    +

    We defined earlier a possible cost function using the mean squared error

    +
    +\[ +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\}, +\]
    +

    or using the design/feature matrix \(\boldsymbol{X}\) we have the more compact matrix-vector

    +
    +\[ +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\}. +\]
    +

    We note that the design matrix \(\boldsymbol{X}\) does not depend on the unknown parameters defined by the vector \(\boldsymbol{\beta}\). +We are now interested in minimizing the cost function with respect to the unknown parameters \(\boldsymbol{\beta}\).

    +

    The mean squared error is a scalar and if we use the results from the last example, we define a new vector

    +
    +\[ +\boldsymbol{w}=\boldsymbol{y}-\boldsymbol{X}\boldsymbol{\beta}, +\]
    +

    which depends on \(\boldsymbol{\beta}\). We rewrite the cost function as

    +
    +\[ +C(\boldsymbol{\beta})=\frac{1}{n}\boldsymbol{w}^T\boldsymbol{w}, +\]
    +

    with partial derivative

    +
    +\[ +\frac{\partial C(\boldsymbol{\beta})}{\partial \boldsymbol{\beta}}=\frac{2}{n}\boldsymbol{w}^T\frac{\partial \boldsymbol{w}}{\partial \boldsymbol{\beta}}, +\]
    +

    and using that

    +
    +\[ +\frac{\partial \boldsymbol{w}}{\partial \boldsymbol{\beta}}=-\boldsymbol{X}, +\]
    +

    where we used the result from example two above. Inserting the last expression we obtain

    +
    +\[ +\frac{\partial C(\boldsymbol{\beta})}{\partial \boldsymbol{\beta}}=-\frac{2}{n}\left(\boldsymbol{y}-\boldsymbol{X}\boldsymbol{\beta}\right)^T\boldsymbol{X}, +\]
    +

    or as

    +
    +\[ +\frac{\partial C(\boldsymbol{\beta})}{\partial \boldsymbol{\beta}^T}=-\frac{2}{n}\boldsymbol{X}^T\left(\boldsymbol{y}-\boldsymbol{X}\boldsymbol{\beta}\right). +\]
    +
    +
    +

    Other useful relations¶

    +

    We list here some other useful relations we may encounter (recall that vectors are defined by boldfaced low-key letters)

    +
    +\[ +\frac{\partial (\boldsymbol{b}^T\boldsymbol{a})}{\partial \boldsymbol{a}} = \boldsymbol{b}, +\]
    +
    +\[ +\frac{\partial tr(\boldsymbol{B}\boldsymbol{A})}{\partial \boldsymbol{A}} = \boldsymbol{B}^T, +\]
    +
    +\[ +\frac{\partial \log{\vert\boldsymbol{A}\vert}}{\partial \boldsymbol{A}} = (\boldsymbol{A}^{-1})^T. +\]
    +
    +
    +

    Meet the Hessian Matrix¶

    +

    A very important matrix we will meet again and again in machine +learning is the Hessian. It is given by the second derivative of the +cost function with respect to the parameters \(\boldsymbol{\beta}\). Using the above +expression for derivatives of vectors and matrices, we find that the +second derivative of the mean squared error as cost function is,

    +
    +\[ +\frac{\partial}{\partial \boldsymbol{\beta}}\frac{\partial C(\boldsymbol{\beta})}{\partial \boldsymbol{\beta}^T} =\frac{\partial}{\partial \boldsymbol{\beta}}\left[-\frac{2}{n}\boldsymbol{X}^T\left( \boldsymbol{y}-\boldsymbol{X}\boldsymbol{\beta}\right)\right]=\frac{2}{n}\boldsymbol{X}^T\boldsymbol{X}. +\]
    +

    The Hessian matrix plays an important role and is defined here as

    +
    +\[ +\boldsymbol{H}=\boldsymbol{X}^T\boldsymbol{X}. +\]
    +

    For ordinary least squares, it is inversely proportional (derivation +next week) with the variance of the optimal parameters +\(\hat{\boldsymbol{\beta}}\). Furthermore, we will see later this week that it is +(aside the factor \(1/n\)) equal to the covariance matrix. It plays also a very +important role in optmization algorithms and Principal Component +Analysis as a way to reduce the dimensionality of a machine learning/data analysis +problem.

    +

    Linear algebra question: Can we use the Hessian matrix to say something about properties of the cost function (our optmization problem)? (hint: think about convex or concave problems and how to relate these to a matrix!).

    +
    +
    +

    Interpretations and optimizing our parameters¶

    +

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

    +
    +\[ +\boldsymbol{\epsilon} = \boldsymbol{y}-\boldsymbol{\tilde{y}} = \boldsymbol{y}-\boldsymbol{X}\boldsymbol{\beta}, +\]
    +

    and with

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

    we have

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

    meaning that the solution for \(\boldsymbol{\beta}\) is the one which minimizes the residuals.

    +
    +
    +

    Example relevant for the exercises¶

    +

    In order to understand the relation among the predictors \(p\), the set of data \(n\) and the target (outcome, output etc) \(\boldsymbol{y}\), +we condiser a simple polynomial fit. +We assume our data can represented by a fourth-order polynomial. For the \(i\)th component we have

    +
    +\[ +\tilde{y}_i = \beta_0+\beta_1x_i+\beta_2x_i^2+\beta_3x_i^3+\beta_4x_i^4. +\]
    +

    we have five predictors/features. The first is the intercept \(\beta_0\). The other terms are \(\beta_i\) with \(i=1,2,3,4\). Furthermore we have \(n\) entries for each predictor. It means that our design matrix is a +\(p\times n\) matrix \(\boldsymbol{X}\).

    +
    +
    +

    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}\) and the outputs \(\boldsymbol{y}\) we have

    +
    +
    +
    # matrix inversion to find beta
    +beta = (np.linalg.inv(X.T @ X) @ X.T ) @ y
    +# and then make the prediction
    +ytilde = X @ beta
    +
    +
    +
    +
    +
    ---------------------------------------------------------------------------
    +NameError                                 Traceback (most recent call last)
    +Input In [1], in <cell line: 2>()
    +      1 # matrix inversion to find beta
    +----> 2 beta = (np.linalg.inv(X.T @ X) @ X.T ) @ y
    +      3 # and then make the prediction
    +      4 ytilde = X @ beta
    +
    +NameError: name 'np' is not defined
    +
    +
    +
    +
    +

    Alternatively, you can use the least squares functionality in Numpy as

    +
    +
    +
    fit = np.linalg.lstsq(X, Energies, rcond =None)[0]
    +ytildenp = np.dot(fit,X.T)
    +
    +
    +
    +
    +
    +
    +

    Adding error analysis and training set up¶

    +

    We can easily test our fit by computing the \(R2\) score that we discussed in connection with the functionality of Scikit-Learn in the introductory slides. +Since we are not using Scikit-Learn here we can define our own \(R2\) function as

    +
    +
    +
    def R2(y_data, y_model):
    +    return 1 - np.sum((y_data - y_model) ** 2) / np.sum((y_data - np.mean(y_data)) ** 2)
    +
    +
    +
    +
    +

    and we would be using it as

    +
    +
    +
    print(R2(Energies,ytilde))
    +
    +
    +
    +
    +

    We can easily add our MSE score as

    +
    +
    +
    def MSE(y_data,y_model):
    +    n = np.size(y_model)
    +    return np.sum((y_data-y_model)**2)/n
    +
    +print(MSE(Energies,ytilde))
    +
    +
    +
    +
    +

    and finally the relative error as

    +
    +
    +
    def RelativeError(y_data,y_model):
    +    return abs((y_data-y_model)/y_data)
    +print(RelativeError(Energies, ytilde))
    +
    +
    +
    +
    +
    +
    +

    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.

    +
    +
    +

    The complete code with a simple data set¶

    +
    +
    +
    %matplotlib inline
    +
    +import os
    +import numpy as np
    +import pandas as pd
    +import matplotlib.pyplot as plt
    +from sklearn.model_selection import train_test_split
    +
    +
    +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
    +
    +x = np.random.rand(100)
    +y = 2.0+5*x*x+0.1*np.random.randn(100)
    +
    +
    +#  The design matrix now as function of a fourth-order polynomial
    +X = np.zeros((len(x),5))
    +X[:,0] = 1.0
    +X[:,1] = x
    +X[:,2] = x**2
    +X[:,3] = x**3
    +X[:,4] = x**4
    +# We split the data in test and training data
    +X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2)
    +# matrix inversion to find beta
    +beta = np.linalg.inv(X_train.T @ X_train) @ X_train.T @ y_train
    +print(beta)
    +# 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))
    +
    +
    +
    +
    +
    +
    +

    Making your own test-train splitting¶

    +
    +
    +
    # equivalently in numpy
    +def train_test_split_numpy(inputs, labels, train_size, test_size):
    +    n_inputs = len(inputs)
    +    inputs_shuffled = inputs.copy()
    +    labels_shuffled = labels.copy()
    +
    +    np.random.shuffle(inputs_shuffled)
    +    np.random.shuffle(labels_shuffled)
    +
    +    train_end = int(n_inputs*train_size)
    +    X_train, X_test = inputs_shuffled[:train_end], inputs_shuffled[train_end:]
    +    Y_train, Y_test = labels_shuffled[:train_end], labels_shuffled[train_end:]
    +
    +    return X_train, X_test, Y_train, Y_test
    +
    +
    +
    +
    +

    But since scikit-learn has its own function for doing this and since +it interfaces easily with tensorflow and other libraries, we +normally recommend using the latter functionality.

    +
    +
    +

    Reducing the number of degrees of freedom, overarching view¶

    +

    Many Machine Learning problems involve thousands or even millions of +features for each training instance. Not only does this make training +extremely slow, it can also make it much harder to find a good +solution, as we will see. This problem is often referred to as the +curse of dimensionality. Fortunately, in real-world problems, it is +often possible to reduce the number of features considerably, turning +an intractable problem into a tractable one.

    +

    Later we will discuss some of the most popular dimensionality reduction +techniques: the principal component analysis (PCA), Kernel PCA, and +Locally Linear Embedding (LLE).

    +

    Principal component analysis and its various variants deal with the +problem of fitting a low-dimensional affine +subspace to a set of of +data points in a high-dimensional space. With its family of methods it +is one of the most used tools in data modeling, compression and +visualization.

    +
    +
    +

    Preprocessing our data¶

    +

    Before we proceed however, we will discuss how to preprocess our +data. Till now and in connection with our previous examples we have +not met so many cases where we are too sensitive to the scaling of our +data. Normally the data may need a rescaling and/or may be sensitive +to extreme values. Scaling the data renders our inputs much more +suitable for the algorithms we want to employ.

    +

    For data sets gathered for real world applications, it is rather normal that +different features have very different units and +numerical scales. For example, a data set detailing health habits may include +features such as age in the range \(0-80\), and caloric intake of order \(2000\). +Many machine learning methods sensitive to the scales of the features and may perform poorly if they +are very different scales. Therefore, it is typical to scale +the features in a way to avoid such outlier values.

    +
    +
    +

    Functionality in Scikit-Learn¶

    +

    Scikit-Learn has several functions which allow us to rescale the +data, normally resulting in much better results in terms of various +accuracy scores. The StandardScaler function in Scikit-Learn +ensures that for each feature/predictor we study the mean value is +zero and the variance is one (every column in the design/feature +matrix). This scaling has the drawback that it does not ensure that +we have a particular maximum or minimum in our data set. Another +function included in Scikit-Learn is the MinMaxScaler which +ensures that all features are exactly between \(0\) and \(1\). The

    +
    +
    +

    More preprocessing¶

    +

    The Normalizer scales each data +point such that the feature vector has a euclidean length of one. In other words, it +projects a data point on the circle (or sphere in the case of higher dimensions) with a +radius of 1. This means every data point is scaled by a different number (by the +inverse of it’s length). +This normalization is often used when only the direction (or angle) of the data matters, +not the length of the feature vector.

    +

    The RobustScaler works similarly to the StandardScaler in that it +ensures statistical properties for each feature that guarantee that +they are on the same scale. However, the RobustScaler uses the median +and quartiles, instead of mean and variance. This makes the +RobustScaler ignore data points that are very different from the rest +(like measurement errors). These odd data points are also called +outliers, and might often lead to trouble for other scaling +techniques.

    +
    +
    +

    Frequently used scaling functions¶

    +

    Many features are often scaled using standardization to improve performance. In Scikit-Learn this is given by the StandardScaler function as discussed above. It is easy however to write your own. +Mathematically, this involves subtracting the mean and divide by the standard deviation over the data set, for each feature:

    +
    +\[ +x_j^{(i)} \rightarrow \frac{x_j^{(i)} - \overline{x}_j}{\sigma(x_j)}, +\]
    +

    where \(\overline{x}_j\) and \(\sigma(x_j)\) are the mean and standard deviation, respectively, of the feature \(x_j\). +This ensures that each feature has zero mean and unit standard deviation. For data sets where we do not have the standard deviation or don’t wish to calculate it, it is then common to simply set it to one.

    +
    +
    +

    Example of own Standard scaling¶

    +

    Let us consider the following vanilla example where we use both +Scikit-Learn and write our own function as well. We produce a +simple test design matrix with random numbers. Each column could then +represent a specific feature whose mean value is subracted.

    +
    +
    +
    import sklearn.linear_model as skl
    +from sklearn.metrics import mean_squared_error
    +from sklearn.model_selection import  train_test_split
    +from sklearn.preprocessing import MinMaxScaler, StandardScaler, Normalizer
    +import numpy as np
    +import pandas as pd
    +from IPython.display import display
    +np.random.seed(100)
    +# setting up a 10 x 5 matrix
    +rows = 10
    +cols = 5
    +X = np.random.randn(rows,cols)
    +XPandas = pd.DataFrame(X)
    +display(XPandas)
    +print(XPandas.mean())
    +print(XPandas.std())
    +XPandas = (XPandas -XPandas.mean())
    +display(XPandas)
    +#  This option does not include the standard deviation
    +scaler = StandardScaler(with_std=False)
    +scaler.fit(X)
    +Xscaled = scaler.transform(X)
    +display(XPandas-Xscaled)
    +
    +
    +
    +
    +

    Small exercise: perform the standard scaling by including the standard deviation and compare with what Scikit-Learn gives.

    +
    +
    +

    Min-Max Scaling¶

    +

    Another commonly used scaling method is min-max scaling. This is very +useful for when we want the features to lie in a certain interval. To +scale the feature \(x_j\) to the interval \([a, b]\), we can apply the +transformation

    +
    +\[ +x_j^{(i)} \rightarrow (b-a)\frac{x_j^{(i)} - \min(x_j)}{\max(x_j) - \min(x_j)} - a +\]
    +

    where \(\min(x_j)\) and \(\max(x_j)\) return the minimum and maximum value of \(x_j\) over the data set, respectively.

    +
    +
    +

    Testing the Means Squared Error as function of Complexity¶

    +

    One of +the aims is to reproduce Figure 2.11 of Hastie et al.

    +

    Our data is defined by \(x\in [-3,3]\) with a total of for example \(100\) data points.

    +
    +
    +
    np.random.seed()
    +n = 100
    +maxdegree = 14
    +# Make data set.
    +x = np.linspace(-3, 3, n).reshape(-1, 1)
    +y = np.exp(-x**2) + 1.5 * np.exp(-(x-2)**2)+ np.random.normal(0, 0.1, x.shape)
    +
    +
    +
    +
    +

    where \(y\) is the function we want to fit with a given polynomial.

    +

    Write a first code which sets up a design matrix \(X\) defined by a fourth-order polynomial. Scale your data and split it in training and test data.

    +
    +
    +
    import matplotlib.pyplot as plt
    +import numpy as np
    +from sklearn.linear_model import LinearRegression
    +from sklearn.preprocessing import PolynomialFeatures
    +from sklearn.model_selection import train_test_split
    +from sklearn.pipeline import make_pipeline
    +
    +
    +np.random.seed(2018)
    +n = 50
    +maxdegree = 5
    +# Make data set.
    +x = np.linspace(-3, 3, n).reshape(-1, 1)
    +y = np.exp(-x**2) + 1.5 * np.exp(-(x-2)**2)+ np.random.normal(0, 0.1, x.shape)
    +TestError = np.zeros(maxdegree)
    +TrainError = np.zeros(maxdegree)
    +polydegree = np.zeros(maxdegree)
    +x_train, x_test, y_train, y_test = train_test_split(x, y, test_size=0.2)
    +scaler = StandardScaler()
    +scaler.fit(x_train)
    +x_train_scaled = scaler.transform(x_train)
    +x_test_scaled = scaler.transform(x_test)
    +
    +for degree in range(maxdegree):
    +    model = make_pipeline(PolynomialFeatures(degree=degree), LinearRegression(fit_intercept=False))
    +    clf = model.fit(x_train_scaled,y_train)
    +    y_fit = clf.predict(x_train_scaled)
    +    y_pred = clf.predict(x_test_scaled) 
    +    polydegree[degree] = degree
    +    TestError[degree] = np.mean( np.mean((y_test - y_pred)**2) )
    +    TrainError[degree] = np.mean( np.mean((y_train - y_fit)**2) )
    +
    +plt.plot(polydegree, TestError, label='Test Error')
    +plt.plot(polydegree, TrainError, label='Train Error')
    +plt.legend()
    +plt.show()
    +
    +
    +
    +
    +
    +
    +

    More preprocessing examples, two-dimensional example, the Franke function¶

    +
    +
    +
    # Common imports
    +import os
    +import numpy as np
    +import pandas as pd
    +import matplotlib.pyplot as plt
    +import sklearn.linear_model as skl
    +from sklearn.metrics import mean_squared_error
    +from sklearn.model_selection import  train_test_split
    +from sklearn.preprocessing import MinMaxScaler, StandardScaler, Normalizer
    +
    +# 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 FrankeFunction(x,y):
    +	term1 = 0.75*np.exp(-(0.25*(9*x-2)**2) - 0.25*((9*y-2)**2))
    +	term2 = 0.75*np.exp(-((9*x+1)**2)/49.0 - 0.1*(9*y+1))
    +	term3 = 0.5*np.exp(-(9*x-7)**2/4.0 - 0.25*((9*y-3)**2))
    +	term4 = -0.2*np.exp(-(9*x-4)**2 - (9*y-7)**2)
    +	return term1 + term2 + term3 + term4
    +
    +
    +def create_X(x, y, n ):
    +	if len(x.shape) > 1:
    +		x = np.ravel(x)
    +		y = np.ravel(y)
    +
    +	N = len(x)
    +	l = int((n+1)*(n+2)/2)		# Number of elements in beta
    +	X = np.ones((N,l))
    +
    +	for i in range(1,n+1):
    +		q = int((i)*(i+1)/2)
    +		for k in range(i+1):
    +			X[:,q+k] = (x**(i-k))*(y**k)
    +
    +	return X
    +
    +
    +# Making meshgrid of datapoints and compute Franke's function
    +n = 5
    +N = 1000
    +x = np.sort(np.random.uniform(0, 1, N))
    +y = np.sort(np.random.uniform(0, 1, N))
    +z = FrankeFunction(x, y)
    +X = create_X(x, y, n=n)    
    +# split in training and test data
    +X_train, X_test, y_train, y_test = train_test_split(X,z,test_size=0.2)
    +
    +
    +clf = skl.LinearRegression().fit(X_train, y_train)
    +
    +# The mean squared error and R2 score
    +print("MSE before scaling: {:.2f}".format(mean_squared_error(clf.predict(X_test), y_test)))
    +print("R2 score before scaling {:.2f}".format(clf.score(X_test,y_test)))
    +
    +scaler = StandardScaler()
    +scaler.fit(X_train)
    +X_train_scaled = scaler.transform(X_train)
    +X_test_scaled = scaler.transform(X_test)
    +
    +print("Feature min values before scaling:\n {}".format(X_train.min(axis=0)))
    +print("Feature max values before scaling:\n {}".format(X_train.max(axis=0)))
    +
    +print("Feature min values after scaling:\n {}".format(X_train_scaled.min(axis=0)))
    +print("Feature max values after scaling:\n {}".format(X_train_scaled.max(axis=0)))
    +
    +clf = skl.LinearRegression().fit(X_train_scaled, y_train)
    +
    +
    +print("MSE after  scaling: {:.2f}".format(mean_squared_error(clf.predict(X_test_scaled), y_test)))
    +print("R2 score for  scaled data: {:.2f}".format(clf.score(X_test_scaled,y_test)))
    +
    +
    +
    +
    +
    +
    +

    To think about, first part¶

    +

    When you are comparing your own code with for example Scikit-Learn’s +library, there are some technicalities to keep in mind. The examples +here demonstrate some of these aspects with potential pitfalls.

    +

    The discussion here focuses on the role of the intercept, how we can +set up the design matrix, what scaling we should use and other topics +which tend confuse us.

    +

    The intercept can be interpreted as the expected value of our +target/output variables when all other predictors are set to zero. +Thus, if we cannot assume that the expected outputs/targets are zero +when all predictors are zero (the columns in the design matrix), it +may be a bad idea to implement a model which penalizes the intercept. +Furthermore, in for example Ridge and Lasso regression (to be discussed in moe detail next week), the default solutions +from the library Scikit-Learn (when not shrinking \(\beta_0\)) for the unknown parameters +\(\boldsymbol{\beta}\), are derived under the assumption that both \(\boldsymbol{y}\) and +\(\boldsymbol{X}\) are zero centered, that is we subtract the mean values.

    +
    +
    +

    More thinking¶

    +

    If our predictors represent different scales, then it is important to +standardize the design matrix \(\boldsymbol{X}\) by subtracting the mean of each +column from the corresponding column and dividing the column with its +standard deviation. Most machine learning libraries do this as a default. This means that if you compare your code with the results from a given library, +the results may differ.

    +

    The +Standadscaler +function in Scikit-Learn does this for us. For the data sets we +have been studying in our various examples, the data are in many cases +already scaled and there is no need to scale them. You as a user of different machine learning algorithms, should always perform a +survey of your data, with a critical assessment of them in case you need to scale the data.

    +

    If you need to scale the data, not doing so will give an unfair +penalization of the parameters since their magnitude depends on the +scale of their corresponding predictor.

    +

    Suppose as an example that you +you have an input variable given by the heights of different persons. +Human height might be measured in inches or meters or +kilometers. If measured in kilometers, a standard linear regression +model with this predictor would probably give a much bigger +coefficient term, than if measured in millimeters. +This can clearly lead to problems in evaluating the cost/loss functions.

    +
    +
    +

    Still thinking¶

    +

    Keep in mind that when you transform your data set before training a model, the same transformation needs to be done +on your eventual new data set before making a prediction. If we translate this into a Python code, it would could be implemented as follows

    +
    +
    +
    #Model training, we compute the mean value of y and X
    +y_train_mean = np.mean(y_train)
    +X_train_mean = np.mean(X_train,axis=0)
    +X_train = X_train - X_train_mean
    +y_train = y_train - y_train_mean
    +
    +# The we fit our model with the training data
    +trained_model = some_model.fit(X_train,y_train)
    +
    +
    +#Model prediction, we need also to transform our data set used for the prediction.
    +X_test = X_test - X_train_mean #Use mean from training data
    +y_pred = trained_model(X_test)
    +y_pred = y_pred + y_train_mean
    +
    +
    +
    +
    +
    +
    +

    What does centering (subtracting the mean values) mean mathematically?¶

    +

    Let us try to understand what this may imply mathematically when we +subtract the mean values, also known as zero centering. For +simplicity, we will focus on ordinary regression, as done in the above example.

    +

    The cost/loss function for regression is

    +
    +\[ +C(\beta_0, \beta_1, ... , \beta_{p-1}) = \frac{1}{n}\sum_{i=0}^{n} \left(y_i - \beta_0 - \sum_{j=1}^{p-1} X_{ij}\beta_j\right)^2,. +\]
    +

    Recall also that we use the squared value since this leads to an increase of the penalty for higher differences between predicted and output/target values.

    +

    What we have done is to single out the \(\beta_0\) term in the definition of the mean squared error (MSE). +The design matrix +\(X\) does in this case not contain any intercept column. +When we take the derivative with respect to \(\beta_0\), we want the derivative to obey

    +
    +\[ +\frac{\partial C}{\partial \beta_j} = 0, +\]
    +

    for all \(j\). For \(\beta_0\) we have

    +
    +\[ +\frac{\partial C}{\partial \beta_0} = -\frac{2}{n}\sum_{i=0}^{n-1} \left(y_i - \beta_0 - \sum_{j=1}^{p-1} X_{ij} \beta_j\right). +\]
    +

    Multiplying away the constant \(2/n\), we obtain

    +
    +\[ +\sum_{i=0}^{n-1} \beta_0 = \sum_{i=0}^{n-1}y_i - \sum_{i=0}^{n-1} \sum_{j=1}^{p-1} X_{ij} \beta_j. +\]
    +
    +
    +

    Further Manipulations¶

    +

    Let us special first to the case where we have only two parameters \(\beta_0\) and \(\beta_1\). +Our result for \(\beta_0\) simplifies then to

    +
    +\[ +n\beta_0 = \sum_{i=0}^{n-1}y_i - \sum_{i=0}^{n-1} X_{i1} \beta_1. +\]
    +

    We obtain then

    +
    +\[ +\beta_0 = \frac{1}{n}\sum_{i=0}^{n-1}y_i - \beta_1\frac{1}{n}\sum_{i=0}^{n-1} X_{i1}. +\]
    +

    If we define

    +
    +\[ +\mu_1=\frac{1}{n}\sum_{i=0}^{n-1} (X_{i1}, +\]
    +

    and if we define the mean value of the outputs as

    +
    +\[ +\mu_y=\frac{1}{n}\sum_{i=0}^{n-1}y_i, +\]
    +

    we have

    +
    +\[ +\beta_0 = \mu_y - \beta_1\mu_{1}. +\]
    +

    In the general case, that is we have more parameters than \(\beta_0\) and \(\beta_1\), we have

    +
    +\[ +\beta_0 = \frac{1}{n}\sum_{i=0}^{n-1}y_i - \frac{1}{n}\sum_{i=0}^{n-1}\sum_{j=1}^{p-1} X_{ij}\beta_j. +\]
    +

    Replacing \(y_i\) with \(y_i - y_i - \overline{\boldsymbol{y}}\) and centering also our design matrix results in a cost function (in vector-matrix disguise)

    +
    +\[ +C(\boldsymbol{\beta}) = (\boldsymbol{\tilde{y}} - \tilde{X}\boldsymbol{\beta})^T(\boldsymbol{\tilde{y}} - \tilde{X}\boldsymbol{\beta}). +\]
    +
    +
    +

    Wrapping it up¶

    +

    If we minimize with respect to \(\boldsymbol{\beta}\) we have then

    +
    +\[ +\hat{\boldsymbol{\beta}} = (\tilde{X}^T\tilde{X})^{-1}\tilde{X}^T\boldsymbol{\tilde{y}}, +\]
    +

    where \(\boldsymbol{\tilde{y}} = \boldsymbol{y} - \overline{\boldsymbol{y}}\) +and \(\tilde{X}_{ij} = X_{ij} - \frac{1}{n}\sum_{k=0}^{n-1}X_{kj}\).

    +

    For Ridge regression we need to add \(\lambda \boldsymbol{\beta}^T\boldsymbol{\beta}\) to the cost function and get then

    +
    +\[ +\hat{\boldsymbol{\beta}} = (\tilde{X}^T\tilde{X} + \lambda I)^{-1}\tilde{X}^T\boldsymbol{\tilde{y}}. +\]
    +

    What does this mean? And why do we insist on all this? Let us look at some examples.

    +
    +
    +

    Linear Regression code, Intercept handling first¶

    +

    This code shows a simple first-order fit to a data set using the above transformed data, where we consider the role of the intercept first, by either excluding it or including it (code example thanks to Øyvind Sigmundson Schøyen). Here our scaling of the data is done by subtracting the mean values only. +Note also that we do not split the data into training and test.

    +
    +
    +
    import numpy as np
    +import matplotlib.pyplot as plt
    +
    +from sklearn.linear_model import LinearRegression
    +
    +
    +np.random.seed(2021)
    +
    +def MSE(y_data,y_model):
    +    n = np.size(y_model)
    +    return np.sum((y_data-y_model)**2)/n
    +
    +
    +def fit_beta(X, y):
    +    return np.linalg.pinv(X.T @ X) @ X.T @ y
    +
    +
    +true_beta = [2, 0.5, 3.7]
    +
    +x = np.linspace(0, 1, 11)
    +y = np.sum(
    +    np.asarray([x ** p * b for p, b in enumerate(true_beta)]), axis=0
    +) + 0.1 * np.random.normal(size=len(x))
    +
    +degree = 3
    +X = np.zeros((len(x), degree))
    +
    +# Include the intercept in the design matrix
    +for p in range(degree):
    +    X[:, p] = x ** p
    +
    +beta = fit_beta(X, y)
    +
    +# Intercept is included in the design matrix
    +skl = LinearRegression(fit_intercept=False).fit(X, y)
    +
    +print(f"True beta: {true_beta}")
    +print(f"Fitted beta: {beta}")
    +print(f"Sklearn fitted beta: {skl.coef_}")
    +ypredictOwn = X @ beta
    +ypredictSKL = skl.predict(X)
    +print(f"MSE with intercept column")
    +print(MSE(y,ypredictOwn))
    +print(f"MSE with intercept column from SKL")
    +print(MSE(y,ypredictSKL))
    +
    +
    +plt.figure()
    +plt.scatter(x, y, label="Data")
    +plt.plot(x, X @ beta, label="Fit")
    +plt.plot(x, skl.predict(X), label="Sklearn (fit_intercept=False)")
    +
    +
    +# Do not include the intercept in the design matrix
    +X = np.zeros((len(x), degree - 1))
    +
    +for p in range(degree - 1):
    +    X[:, p] = x ** (p + 1)
    +
    +# Intercept is not included in the design matrix
    +skl = LinearRegression(fit_intercept=True).fit(X, y)
    +
    +# Use centered values for X and y when computing coefficients
    +y_offset = np.average(y, axis=0)
    +X_offset = np.average(X, axis=0)
    +
    +beta = fit_beta(X - X_offset, y - y_offset)
    +intercept = np.mean(y_offset - X_offset @ beta)
    +
    +print(f"Manual intercept: {intercept}")
    +print(f"Fitted beta (wiothout intercept): {beta}")
    +print(f"Sklearn intercept: {skl.intercept_}")
    +print(f"Sklearn fitted beta (without intercept): {skl.coef_}")
    +ypredictOwn = X @ beta
    +ypredictSKL = skl.predict(X)
    +print(f"MSE with Manual intercept")
    +print(MSE(y,ypredictOwn+intercept))
    +print(f"MSE with Sklearn intercept")
    +print(MSE(y,ypredictSKL))
    +
    +plt.plot(x, X @ beta + intercept, "--", label="Fit (manual intercept)")
    +plt.plot(x, skl.predict(X), "--", label="Sklearn (fit_intercept=True)")
    +plt.grid()
    +plt.legend()
    +
    +plt.show()
    +
    +
    +
    +
    +

    The intercept is the value of our output/target variable +when all our features are zero and our function crosses the \(y\)-axis (for a one-dimensional case).

    +

    Printing the MSE, we see first that both methods give the same MSE, as +they should. However, when we move to for example Ridge regression (discussed next week), +the way we treat the intercept may give a larger or smaller MSE, +meaning that the MSE can be penalized by the value of the +intercept. Not including the intercept in the fit, means that the +regularization term does not include \(\beta_0\). For different values +of \(\lambda\), this may lead to differing MSE values.

    +

    To remind the reader, the regularization term, with the intercept in Ridge regression is given by

    +
    +\[ +\lambda \vert\vert \boldsymbol{\beta} \vert\vert_2^2 = \lambda \sum_{j=0}^{p-1}\beta_j^2, +\]
    +

    but when we take out the intercept, this equation becomes

    +
    +\[ +\lambda \vert\vert \boldsymbol{\beta} \vert\vert_2^2 = \lambda \sum_{j=1}^{p-1}\beta_j^2. +\]
    +

    For Lasso regression we have

    +
    +\[ +\lambda \vert\vert \boldsymbol{\beta} \vert\vert_1 = \lambda \sum_{j=1}^{p-1}\vert\beta_j\vert. +\]
    +

    It means that, when scaling the design matrix and the outputs/targets, +by subtracting the mean values, we have an optimization problem which +is not penalized by the intercept. The MSE value can then be smaller +since it focuses only on the remaining quantities. If we however bring +back the intercept, we will get an MSE which then contains the +intercept. This becomes more important when we discuss Ridge and Lasso +regression next week.

    +
    +
    +

    The Boston housing data example¶

    +

    The Boston housing
    +data set was originally a part of UCI Machine Learning Repository +and has been removed now. The data set is now included in Scikit-Learn’s +library. There are 506 samples and 13 feature (predictor) variables +in this data set. The objective is to predict the value of prices of +the house using the features (predictors) listed here.

    +

    The features/predictors are

    +
      +
    1. CRIM: Per capita crime rate by town

    2. +
    3. ZN: Proportion of residential land zoned for lots over 25000 square feet

    4. +
    5. INDUS: Proportion of non-retail business acres per town

    6. +
    7. CHAS: Charles River dummy variable (= 1 if tract bounds river; 0 otherwise)

    8. +
    9. NOX: Nitric oxide concentration (parts per 10 million)

    10. +
    11. RM: Average number of rooms per dwelling

    12. +
    13. AGE: Proportion of owner-occupied units built prior to 1940

    14. +
    15. DIS: Weighted distances to five Boston employment centers

    16. +
    17. RAD: Index of accessibility to radial highways

    18. +
    19. TAX: Full-value property tax rate per USD10000

    20. +
    21. B: \(1000(Bk - 0.63)^2\), where \(Bk\) is the proportion of [people of African American descent] by town

    22. +
    23. LSTAT: Percentage of lower status of the population

    24. +
    25. MEDV: Median value of owner-occupied homes in USD 1000s

    26. +
    +
    +
    +

    Housing data, the code¶

    +

    We start by importing the libraries

    +
    +
    +
    import numpy as np
    +import matplotlib.pyplot as plt 
    +
    +import pandas as pd  
    +import seaborn as sns
    +
    +
    +
    +
    +

    and load the Boston Housing DataSet from Scikit-Learn

    +
    +
    +
    from sklearn.datasets import load_boston
    +
    +boston_dataset = load_boston()
    +
    +# boston_dataset is a dictionary
    +# let's check what it contains
    +boston_dataset.keys()
    +
    +
    +
    +
    +

    Then we invoke Pandas

    +
    +
    +
    boston = pd.DataFrame(boston_dataset.data, columns=boston_dataset.feature_names)
    +boston.head()
    +boston['MEDV'] = boston_dataset.target
    +
    +
    +
    +
    +

    and preprocess the data

    +
    +
    +
    # check for missing values in all the columns
    +boston.isnull().sum()
    +
    +
    +
    +
    +

    We can then visualize the data

    +
    +
    +
    # set the size of the figure
    +sns.set(rc={'figure.figsize':(11.7,8.27)})
    +
    +# plot a histogram showing the distribution of the target values
    +sns.distplot(boston['MEDV'], bins=30)
    +plt.show()
    +
    +
    +
    +
    +

    It is now useful to look at the correlation matrix

    +
    +
    +
    # compute the pair wise correlation for all columns  
    +correlation_matrix = boston.corr().round(2)
    +# use the heatmap function from seaborn to plot the correlation matrix
    +# annot = True to print the values inside the square
    +sns.heatmap(data=correlation_matrix, annot=True)
    +
    +
    +
    +
    +

    From the above coorelation plot we can see that MEDV is strongly correlated to LSTAT and RM. We see also that RAD and TAX are stronly correlated, but we don’t include this in our features together to avoid multi-colinearity

    +
    +
    +
    plt.figure(figsize=(20, 5))
    +
    +features = ['LSTAT', 'RM']
    +target = boston['MEDV']
    +
    +for i, col in enumerate(features):
    +    plt.subplot(1, len(features) , i+1)
    +    x = boston[col]
    +    y = target
    +    plt.scatter(x, y, marker='o')
    +    plt.title(col)
    +    plt.xlabel(col)
    +    plt.ylabel('MEDV')
    +
    +
    +
    +
    +

    Now we start training our model

    +
    +
    +
    X = pd.DataFrame(np.c_[boston['LSTAT'], boston['RM']], columns = ['LSTAT','RM'])
    +Y = boston['MEDV']
    +
    +
    +
    +
    +

    We split the data into training and test sets

    +
    +
    +
    from sklearn.model_selection import train_test_split
    +
    +# splits the training and test data set in 80% : 20%
    +# assign random_state to any value.This ensures consistency.
    +X_train, X_test, Y_train, Y_test = train_test_split(X, Y, test_size = 0.2, random_state=5)
    +print(X_train.shape)
    +print(X_test.shape)
    +print(Y_train.shape)
    +print(Y_test.shape)
    +
    +
    +
    +
    +

    Then we use the linear regression functionality from Scikit-Learn

    +
    +
    +
    from sklearn.linear_model import LinearRegression
    +from sklearn.metrics import mean_squared_error, r2_score
    +
    +lin_model = LinearRegression()
    +lin_model.fit(X_train, Y_train)
    +
    +# model evaluation for training set
    +
    +y_train_predict = lin_model.predict(X_train)
    +rmse = (np.sqrt(mean_squared_error(Y_train, y_train_predict)))
    +r2 = r2_score(Y_train, y_train_predict)
    +
    +print("The model performance for training set")
    +print("--------------------------------------")
    +print('RMSE is {}'.format(rmse))
    +print('R2 score is {}'.format(r2))
    +print("\n")
    +
    +# model evaluation for testing set
    +
    +y_test_predict = lin_model.predict(X_test)
    +# root mean square error of the model
    +rmse = (np.sqrt(mean_squared_error(Y_test, y_test_predict)))
    +
    +# r-squared score of the model
    +r2 = r2_score(Y_test, y_test_predict)
    +
    +print("The model performance for testing set")
    +print("--------------------------------------")
    +print('RMSE is {}'.format(rmse))
    +print('R2 score is {}'.format(r2))
    +
    +
    +
    +
    +
    +
    +
    # plotting the y_test vs y_pred
    +# ideally should have been a straight line
    +plt.scatter(Y_test, y_test_predict)
    +plt.show()
    +
    +
    +
    +
    +
    +
    +

    Material for lecture Thursday, August 31¶

    +
    +
    +

    Mathematical Interpretation of Ordinary Least Squares¶

    +

    What is presented here is a mathematical analysis of various regression algorithms (ordinary least squares, Ridge and Lasso Regression). The analysis is based on an important algorithm in linear algebra, the so-called Singular Value Decomposition (SVD).

    +

    We have shown that in ordinary least squares the optimal parameters \(\beta\) are given by

    +
    +\[ +\hat{\boldsymbol{\beta}} = \left(\boldsymbol{X}^T\boldsymbol{X}\right)^{-1}\boldsymbol{X}^T\boldsymbol{y}. +\]
    +

    The hat over \(\boldsymbol{\beta}\) means we have the optimal parameters after minimization of the cost function.

    +

    This means that our best model is defined as

    +
    +\[ +\tilde{\boldsymbol{y}}=\boldsymbol{X}\hat{\boldsymbol{\beta}} = \boldsymbol{X}\left(\boldsymbol{X}^T\boldsymbol{X}\right)^{-1}\boldsymbol{X}^T\boldsymbol{y}. +\]
    +

    We now define a matrix

    +
    +\[ +\boldsymbol{A}=\boldsymbol{X}\left(\boldsymbol{X}^T\boldsymbol{X}\right)^{-1}\boldsymbol{X}^T. +\]
    +

    We can rewrite

    +
    +\[ +\tilde{\boldsymbol{y}}=\boldsymbol{X}\hat{\boldsymbol{\beta}} = \boldsymbol{A}\boldsymbol{y}. +\]
    +

    The matrix \(\boldsymbol{A}\) has the important property that \(\boldsymbol{A}^2=\boldsymbol{A}\). This is the definition of a projection matrix. +We can then interpret our optimal model \(\tilde{\boldsymbol{y}}\) as being represented by an orthogonal projection of \(\boldsymbol{y}\) onto a space defined by the column vectors of \(\boldsymbol{X}\). In our case here the matrix \(\boldsymbol{A}\) is a square matrix. If it is a general rectangular matrix we have an oblique projection matrix.

    +
    +
    +

    Residual Error¶

    +

    We have defined the residual error as

    +
    +\[ +\boldsymbol{\epsilon}=\boldsymbol{y}-\tilde{\boldsymbol{y}}=\left[\boldsymbol{I}-\boldsymbol{X}\left(\boldsymbol{X}^T\boldsymbol{X}\right)^{-1}\boldsymbol{X}^T\right]\boldsymbol{y}. +\]
    +

    The residual errors are then the projections of \(\boldsymbol{y}\) onto the orthogonal component of the space defined by the column vectors of \(\boldsymbol{X}\).

    +
    +
    +

    Simple case¶

    +

    If the matrix \(\boldsymbol{X}\) is an orthogonal (or unitary in case of complex values) matrix, we have

    +
    +\[ +\boldsymbol{X}^T\boldsymbol{X}=\boldsymbol{X}\boldsymbol{X}^T = \boldsymbol{I}. +\]
    +

    In this case the matrix \(\boldsymbol{A}\) becomes

    +
    +\[ +\boldsymbol{A}=\boldsymbol{X}\left(\boldsymbol{X}^T\boldsymbol{X}\right)^{-1}\boldsymbol{X}^T)=\boldsymbol{I}, +\]
    +

    and we have the obvious case

    +
    +\[ +\boldsymbol{\epsilon}=\boldsymbol{y}-\tilde{\boldsymbol{y}}=0. +\]
    +

    This serves also as a useful test of our codes.

    +
    +
    +

    The singular value decomposition¶

    +

    The examples we have looked at so far are cases where we normally can +invert the matrix \(\boldsymbol{X}^T\boldsymbol{X}\). Using a polynomial expansion where we fit of various functions leads to +row vectors of the design matrix which are essentially orthogonal due +to the polynomial character of our model. Obtaining the inverse of the +design matrix is then often done via a so-called LU, QR or Cholesky +decomposition.

    +

    As we will also see in the first project, +this may +however not the be case in general and a standard matrix inversion +algorithm based on say LU, QR or Cholesky decomposition may lead to singularities. We will see examples of this below.

    +

    There is however a way to circumvent this problem and also +gain some insights about the ordinary least squares approach, and +later shrinkage methods like Ridge and Lasso regressions.

    +

    This is given by the Singular Value Decomposition (SVD) algorithm, +perhaps the most powerful linear algebra algorithm. The SVD provides +a numerically stable matrix decomposition that is used in a large +swath oc applications and the decomposition is always stable +numerically.

    +

    In machine learning it plays a central role in dealing with for +example design matrices that may be near singular or singular. +Furthermore, as we will see here, the singular values can be related +to the covariance matrix (and thereby the correlation matrix) and in +turn the variance of a given quantity. It plays also an important role +in the principal component analysis where high-dimensional data can be +reduced to the statistically relevant features.

    +
    +
    +

    Linear Regression Problems¶

    +

    One of the typical problems we encounter with linear regression, in particular +when the matrix \(\boldsymbol{X}\) (our so-called design matrix) is high-dimensional, +are problems with near singular or singular matrices. The column vectors of \(\boldsymbol{X}\) +may be linearly dependent, normally referred to as super-collinearity.
    +This means that the matrix may be rank deficient and it is basically impossible to +to model the data using linear regression. As an example, consider the matrix

    +
    +\[\begin{split} +\begin{align*} +\mathbf{X} & = \left[ +\begin{array}{rrr} +1 & -1 & 2 +\\ +1 & 0 & 1 +\\ +1 & 2 & -1 +\\ +1 & 1 & 0 +\end{array} \right] +\end{align*} +\end{split}\]
    +

    The columns of \(\boldsymbol{X}\) are linearly dependent. We see this easily since the +the first column is the row-wise sum of the other two columns. The rank (more correct, +the column rank) of a matrix is the dimension of the space spanned by the +column vectors. Hence, the rank of \(\mathbf{X}\) is equal to the number +of linearly independent columns. In this particular case the matrix has rank 2.

    +

    Super-collinearity of an \((n \times p)\)-dimensional design matrix \(\mathbf{X}\) implies +that the inverse of the matrix \(\boldsymbol{X}^T\boldsymbol{X}\) (the matrix we need to invert to solve the linear regression equations) is non-invertible. If we have a square matrix that does not have an inverse, we say this matrix singular. The example here demonstrates this

    +
    +\[\begin{split} +\begin{align*} +\boldsymbol{X} & = \left[ +\begin{array}{rr} +1 & -1 +\\ +1 & -1 +\end{array} \right]. +\end{align*} +\end{split}\]
    +

    We see easily that \(\mbox{det}(\boldsymbol{X}) = x_{11} x_{22} - x_{12} x_{21} = 1 \times (-1) - 1 \times (-1) = 0\). Hence, \(\mathbf{X}\) is singular and its inverse is undefined. +This is equivalent to saying that the matrix \(\boldsymbol{X}\) has at least an eigenvalue which is zero.

    +
    +
    +

    Fixing the singularity¶

    +

    If our design matrix \(\boldsymbol{X}\) which enters the linear regression problem

    + +
    +
    +\[ +\begin{equation} +\boldsymbol{\beta} = (\boldsymbol{X}^{T} \boldsymbol{X})^{-1} \boldsymbol{X}^{T} \boldsymbol{y}, +\label{_auto1} \tag{1} +\end{equation} +\]
    +

    has linearly dependent column vectors, we will not be able to compute the inverse +of \(\boldsymbol{X}^T\boldsymbol{X}\) and we cannot find the parameters (estimators) \(\beta_i\). +The estimators are only well-defined if \((\boldsymbol{X}^{T}\boldsymbol{X})^{-1}\) exits. +This is more likely to happen when the matrix \(\boldsymbol{X}\) is high-dimensional. In this case it is likely to encounter a situation where +the regression parameters \(\beta_i\) cannot be estimated.

    +

    A cheap ad hoc approach is simply to add a small diagonal component to the matrix to invert, that is we change

    +
    +\[ +\boldsymbol{X}^{T} \boldsymbol{X} \rightarrow \boldsymbol{X}^{T} \boldsymbol{X}+\lambda \boldsymbol{I}, +\]
    +

    where \(\boldsymbol{I}\) is the identity matrix. When we discuss Ridge regression this is actually what we end up evaluating. The parameter \(\lambda\) is called a hyperparameter. More about this later.

    +
    +
    +

    Basic math of the SVD¶

    +

    From standard linear algebra we know that a square matrix \(\boldsymbol{X}\) can be diagonalized if and only it is +a so-called normal matrix, that is if \(\boldsymbol{X}\in {\mathbb{R}}^{n\times n}\) +we have \(\boldsymbol{X}\boldsymbol{X}^T=\boldsymbol{X}^T\boldsymbol{X}\) or if \(\boldsymbol{X}\in {\mathbb{C}}^{n\times n}\) we have \(\boldsymbol{X}\boldsymbol{X}^{\dagger}=\boldsymbol{X}^{\dagger}\boldsymbol{X}\). +The matrix has then a set of eigenpairs

    +
    +\[ +(\lambda_1,\boldsymbol{u}_1),\dots, (\lambda_n,\boldsymbol{u}_n), +\]
    +

    and the eigenvalues are given by the diagonal matrix

    +
    +\[ +\boldsymbol{\Sigma}=\mathrm{Diag}(\lambda_1, \dots,\lambda_n). +\]
    +

    The matrix \(\boldsymbol{X}\) can be written in terms of an orthogonal/unitary transformation \(\boldsymbol{U}\)

    +
    +\[ +\boldsymbol{X} = \boldsymbol{U}\boldsymbol{\Sigma}\boldsymbol{V}^T, +\]
    +

    with \(\boldsymbol{U}\boldsymbol{U}^T=\boldsymbol{I}\) or \(\boldsymbol{U}\boldsymbol{U}^{\dagger}=\boldsymbol{I}\).

    +

    Not all square matrices are diagonalizable. A matrix like the one discussed above

    +
    +\[\begin{split} +\boldsymbol{X} = \begin{bmatrix} +1& -1 \\ +1& -1\\ +\end{bmatrix} +\end{split}\]
    +

    is not diagonalizable, it is a so-called defective matrix. It is easy to see that the condition +\(\boldsymbol{X}\boldsymbol{X}^T=\boldsymbol{X}^T\boldsymbol{X}\) is not fulfilled.

    +
    +
    +

    The SVD, a Fantastic Algorithm¶

    +

    However, and this is the strength of the SVD algorithm, any general +matrix \(\boldsymbol{X}\) can be decomposed in terms of a diagonal matrix and +two orthogonal/unitary matrices. The Singular Value Decompostion +(SVD) theorem +states that a general \(m\times n\) matrix \(\boldsymbol{X}\) can be written in +terms of a diagonal matrix \(\boldsymbol{\Sigma}\) of dimensionality \(m\times n\) +and two orthognal matrices \(\boldsymbol{U}\) and \(\boldsymbol{V}\), where the first has +dimensionality \(m \times m\) and the last dimensionality \(n\times n\). +We have then

    +
    +\[ +\boldsymbol{X} = \boldsymbol{U}\boldsymbol{\Sigma}\boldsymbol{V}^T +\]
    +

    As an example, the above defective matrix can be decomposed as

    +
    +\[\begin{split} +\boldsymbol{X} = \frac{1}{\sqrt{2}}\begin{bmatrix} 1& 1 \\ 1& -1\\ \end{bmatrix} \begin{bmatrix} 2& 0 \\ 0& 0\\ \end{bmatrix} \frac{1}{\sqrt{2}}\begin{bmatrix} 1& -1 \\ 1& 1\\ \end{bmatrix}=\boldsymbol{U}\boldsymbol{\Sigma}\boldsymbol{V}^T, +\end{split}\]
    +

    with eigenvalues \(\sigma_1=2\) and \(\sigma_2=0\). +The SVD exits always!

    +

    The SVD +decomposition (singular values) gives eigenvalues +\(\sigma_i\geq\sigma_{i+1}\) for all \(i\) and for dimensions larger than \(i=p\), the +eigenvalues (singular values) are zero.

    +

    In the general case, where our design matrix \(\boldsymbol{X}\) has dimension +\(n\times p\), the matrix is thus decomposed into an \(n\times n\) +orthogonal matrix \(\boldsymbol{U}\), a \(p\times p\) orthogonal matrix \(\boldsymbol{V}\) +and a diagonal matrix \(\boldsymbol{\Sigma}\) with \(r=\mathrm{min}(n,p)\) +singular values \(\sigma_i\geq 0\) on the main diagonal and zeros filling +the rest of the matrix. There are at most \(p\) singular values +assuming that \(n > p\). In our regression examples for the nuclear +masses and the equation of state this is indeed the case, while for +the Ising model we have \(p > n\). These are often cases that lead to +near singular or singular matrices.

    +

    The columns of \(\boldsymbol{U}\) are called the left singular vectors while the columns of \(\boldsymbol{V}\) are the right singular vectors.

    +
    +
    +

    Economy-size SVD¶

    +

    If we assume that \(n > p\), then our matrix \(\boldsymbol{U}\) has dimension \(n +\times n\). The last \(n-p\) columns of \(\boldsymbol{U}\) become however +irrelevant in our calculations since they are multiplied with the +zeros in \(\boldsymbol{\Sigma}\).

    +

    The economy-size decomposition removes extra rows or columns of zeros +from the diagonal matrix of singular values, \(\boldsymbol{\Sigma}\), along with the columns +in either \(\boldsymbol{U}\) or \(\boldsymbol{V}\) that multiply those zeros in the expression. +Removing these zeros and columns can improve execution time +and reduce storage requirements without compromising the accuracy of +the decomposition.

    +

    If \(n > p\), we keep only the first \(p\) columns of \(\boldsymbol{U}\) and \(\boldsymbol{\Sigma}\) has dimension \(p\times p\). +If \(p > n\), then only the first \(n\) columns of \(\boldsymbol{V}\) are computed and \(\boldsymbol{\Sigma}\) has dimension \(n\times n\). +The \(n=p\) case is obvious, we retain the full SVD. +In general the economy-size SVD leads to less FLOPS and still conserving the desired accuracy.

    +
    +
    +

    Codes for the SVD¶

    +
    +
    +
    import numpy as np
    +# SVD inversion
    +def SVD(A):
    +    ''' Takes as input a numpy matrix A and returns inv(A) based on singular value decomposition (SVD).
    +    SVD is numerically more stable than the inversion algorithms provided by
    +    numpy and scipy.linalg at the cost of being slower.
    +    '''
    +    U, S, VT = np.linalg.svd(A,full_matrices=True)
    +    print('test U')
    +    print( (np.transpose(U) @ U - U @np.transpose(U)))
    +    print('test VT')
    +    print( (np.transpose(VT) @ VT - VT @np.transpose(VT)))
    +    print(U)
    +    print(S)
    +    print(VT)
    +
    +    D = np.zeros((len(U),len(VT)))
    +    for i in range(0,len(VT)):
    +        D[i,i]=S[i]
    +    return U @ D @ VT
    +
    +
    +X = np.array([ [1.0,-1.0], [1.0,-1.0]])
    +#X = np.array([[1, 2], [3, 4], [5, 6]])
    +
    +print(X)
    +C = SVD(X)
    +# Print the difference between the original matrix and the SVD one
    +print(C-X)
    +
    +
    +
    +
    +

    The matrix \(\boldsymbol{X}\) has columns that are linearly dependent. The first +column is the row-wise sum of the other two columns. The rank of a +matrix (the column rank) is the dimension of space spanned by the +column vectors. The rank of the matrix is the number of linearly +independent columns, in this case just \(2\). We see this from the +singular values when running the above code. Running the standard +inversion algorithm for matrix inversion with \(\boldsymbol{X}^T\boldsymbol{X}\) results +in the program terminating due to a singular matrix.

    +
    +
    +

    Note about SVD Calculations¶

    +

    The \(U\), \(S\), and \(V\) matrices returned from the svd() function +cannot be multiplied directly.

    +

    As you can see from the code, the \(S\) vector must be converted into a +diagonal matrix. This may cause a problem as the size of the matrices +do not fit the rules of matrix multiplication, where the number of +columns in a matrix must match the number of rows in the subsequent +matrix.

    +

    If you wish to include the zero singular values, you will need to +resize the matrices and set up a diagonal matrix as done in the above +example

    +
    +
    +

    Mathematics of the SVD and implications¶

    +

    Let us take a closer look at the mathematics of the SVD and the various implications for machine learning studies.

    +

    Our starting point is our design matrix \(\boldsymbol{X}\) of dimension \(n\times p\)

    +
    +\[\begin{split} +\boldsymbol{X}=\begin{bmatrix} +x_{0,0} & x_{0,1} & x_{0,2}& \dots & \dots x_{0,p-1}\\ +x_{1,0} & x_{1,1} & x_{1,2}& \dots & \dots x_{1,p-1}\\ +x_{2,0} & x_{2,1} & x_{2,2}& \dots & \dots x_{2,p-1}\\ +\dots & \dots & \dots & \dots \dots & \dots \\ +x_{n-2,0} & x_{n-2,1} & x_{n-2,2}& \dots & \dots x_{n-2,p-1}\\ +x_{n-1,0} & x_{n-1,1} & x_{n-1,2}& \dots & \dots x_{n-1,p-1}\\ +\end{bmatrix}. +\end{split}\]
    +

    We can SVD decompose our matrix as

    +
    +\[ +\boldsymbol{X}=\boldsymbol{U}\boldsymbol{\Sigma}\boldsymbol{V}^T, +\]
    +

    where \(\boldsymbol{U}\) is an orthogonal matrix of dimension \(n\times n\), meaning that \(\boldsymbol{U}\boldsymbol{U}^T=\boldsymbol{U}^T\boldsymbol{U}=\boldsymbol{I}_n\). Here \(\boldsymbol{I}_n\) is the unit matrix of dimension \(n \times n\).

    +

    Similarly, \(\boldsymbol{V}\) is an orthogonal matrix of dimension \(p\times p\), meaning that \(\boldsymbol{V}\boldsymbol{V}^T=\boldsymbol{V}^T\boldsymbol{V}=\boldsymbol{I}_p\). Here \(\boldsymbol{I}_n\) is the unit matrix of dimension \(p \times p\).

    +

    Finally \(\boldsymbol{\Sigma}\) contains the singular values \(\sigma_i\). This matrix has dimension \(n\times p\) and the singular values \(\sigma_i\) are all positive. The non-zero values are ordered in descending order, that is

    +
    +\[ +\sigma_0 > \sigma_1 > \sigma_2 > \dots > \sigma_{p-1} > 0. +\]
    +

    All values beyond \(p-1\) are all zero.

    +
    +
    +

    Example Matrix¶

    +

    As an example, consider the following \(3\times 2\) example for the matrix \(\boldsymbol{\Sigma}\)

    +
    +\[\begin{split} +\boldsymbol{\Sigma}= +\begin{bmatrix} +2& 0 \\ +0 & 1 \\ +0 & 0 \\ +\end{bmatrix} +\end{split}\]
    +

    The singular values are \(\sigma_0=2\) and \(\sigma_1=1\). It is common to rewrite the matrix \(\boldsymbol{\Sigma}\) as

    +
    +\[\begin{split} +\boldsymbol{\Sigma}= +\begin{bmatrix} +\boldsymbol{\tilde{\Sigma}}\\ +\boldsymbol{0}\\ +\end{bmatrix}, +\end{split}\]
    +

    where

    +
    +\[\begin{split} +\boldsymbol{\tilde{\Sigma}}= +\begin{bmatrix} +2& 0 \\ +0 & 1 \\ +\end{bmatrix}, +\end{split}\]
    +

    contains only the singular values. Note also (and we will use this below) that

    +
    +\[\begin{split} +\boldsymbol{\Sigma}^T\boldsymbol{\Sigma}= +\begin{bmatrix} +4& 0 \\ +0 & 1 \\ +\end{bmatrix}, +\end{split}\]
    +

    which is a \(2\times 2 \) matrix while

    +
    +\[\begin{split} +\boldsymbol{\Sigma}\boldsymbol{\Sigma}^T= +\begin{bmatrix} +4& 0 & 0\\ +0 & 1 & 0\\ +0 & 0 & 0\\ +\end{bmatrix}, +\end{split}\]
    +

    is a \(3\times 3 \) matrix. The last row and column of this last matrix +contain only zeros. This will have important consequences for our SVD +decomposition of the design matrix.

    +
    +
    +

    Setting up the Matrix to be inverted¶

    +

    The matrix that may cause problems for us is \(\boldsymbol{X}^T\boldsymbol{X}\). Using the SVD we can rewrite this matrix as

    +
    +\[ +\boldsymbol{X}^T\boldsymbol{X}=\boldsymbol{V}\boldsymbol{\Sigma}^T\boldsymbol{U}^T\boldsymbol{U}\boldsymbol{\Sigma}\boldsymbol{V}^T, +\]
    +

    and using the orthogonality of the matrix \(\boldsymbol{U}\) we have

    +
    +\[ +\boldsymbol{X}^T\boldsymbol{X}=\boldsymbol{V}\boldsymbol{\Sigma}^T\boldsymbol{\Sigma}\boldsymbol{V}^T. +\]
    +

    We define \(\boldsymbol{\Sigma}^T\boldsymbol{\Sigma}=\tilde{\boldsymbol{\Sigma}}^2\) which is a diagonal matrix containing only the singular values squared. It has dimensionality \(p \times p\).

    +

    We can now insert the result for the matrix \(\boldsymbol{X}^T\boldsymbol{X}\) into our equation for ordinary least squares where

    +
    +\[ +\tilde{y}_{\mathrm{OLS}}=\boldsymbol{X}\left(\boldsymbol{X}^T\boldsymbol{X}\right)^{-1}\boldsymbol{X}^T\boldsymbol{y}, +\]
    +

    and using our SVD decomposition of \(\boldsymbol{X}\) we have

    +
    +\[ +\tilde{y}_{\mathrm{OLS}}=\boldsymbol{U}\boldsymbol{\Sigma}\boldsymbol{V}^T\left(\boldsymbol{V}\tilde{\boldsymbol{\Sigma}}^{2}(\boldsymbol{V}^T\right)^{-1}\boldsymbol{V}\boldsymbol{\Sigma}^T\boldsymbol{U}^T\boldsymbol{y}, +\]
    +

    which gives us, using the orthogonality of the matrices \(\boldsymbol{U}\) and \(\boldsymbol{V}\),

    +
    +\[ +\tilde{y}_{\mathrm{OLS}}=\boldsymbol{U}\boldsymbol{U}^T\boldsymbol{y}=\sum_{i=0}^{p-1}\boldsymbol{u}_i\boldsymbol{u}^T_i\boldsymbol{y}, +\]
    +

    It means that the ordinary least square model (with the optimal +parameters) \(\boldsymbol{\tilde{y}}\), corresponds to an orthogonal +transformation of the output (or target) vector \(\boldsymbol{y}\) by the +vectors of the matrix \(\boldsymbol{U}\). Note that the summation ends at \(p-1\), +that is \(\boldsymbol{\tilde{y}}\ne \boldsymbol{y}\).

    +
    +
    +

    Further properties (important for our analyses later)¶

    +

    Let us study again \(\boldsymbol{X}^T\boldsymbol{X}\) in terms of our SVD,

    +
    +\[ +\boldsymbol{X}^T\boldsymbol{X}=\boldsymbol{V}\boldsymbol{\Sigma}^T\boldsymbol{U}^T\boldsymbol{U}\boldsymbol{\Sigma}\boldsymbol{V}^T=\boldsymbol{V}\boldsymbol{\Sigma}^T\boldsymbol{\Sigma}\boldsymbol{V}^T. +\]
    +

    If we now multiply from the right with \(\boldsymbol{V}\) (using the orthogonality of \(\boldsymbol{V}\)) we get

    +
    +\[ +\left(\boldsymbol{X}^T\boldsymbol{X}\right)\boldsymbol{V}=\boldsymbol{V}\boldsymbol{\Sigma}^T\boldsymbol{\Sigma}. +\]
    +

    This means the vectors \(\boldsymbol{v}_i\) of the orthogonal matrix \(\boldsymbol{V}\) are the eigenvectors of the matrix \(\boldsymbol{X}^T\boldsymbol{X}\) +with eigenvalues given by the singular values squared, that is

    +
    +\[ +\left(\boldsymbol{X}^T\boldsymbol{X}\right)\boldsymbol{v}_i=\boldsymbol{v}_i\sigma_i^2. +\]
    +

    Similarly, if we use the SVD decomposition for the matrix \(\boldsymbol{X}\boldsymbol{X}^T\), we have

    +
    +\[ +\boldsymbol{X}\boldsymbol{X}^T=\boldsymbol{U}\boldsymbol{\Sigma}\boldsymbol{V}^T\boldsymbol{V}\boldsymbol{\Sigma}^T\boldsymbol{U}^T=\boldsymbol{U}\boldsymbol{\Sigma}\boldsymbol{\Sigma}^T\boldsymbol{U}^T. +\]
    +

    If we now multiply from the right with \(\boldsymbol{U}\) (using the orthogonality of \(\boldsymbol{U}\)) we get

    +
    +\[ +\left(\boldsymbol{X}\boldsymbol{X}^T\right)\boldsymbol{U}=\boldsymbol{U}\boldsymbol{\Sigma}\boldsymbol{\Sigma}^T. +\]
    +

    This means the vectors \(\boldsymbol{u}_i\) of the orthogonal matrix \(\boldsymbol{U}\) are the eigenvectors of the matrix \(\boldsymbol{X}\boldsymbol{X}^T\) +with eigenvalues given by the singular values squared, that is

    +
    +\[ +\left(\boldsymbol{X}\boldsymbol{X}^T\right)\boldsymbol{u}_i=\boldsymbol{u}_i\sigma_i^2. +\]
    +

    Important note: we have defined our design matrix \(\boldsymbol{X}\) to be an +\(n\times p\) matrix. In most supervised learning cases we have that \(n +\ge p\), and quite often we have \(n >> p\). For linear algebra based methods like ordinary least squares or Ridge regression, this leads to a matrix \(\boldsymbol{X}^T\boldsymbol{X}\) which is small and thereby easier to handle from a computational point of view (in terms of number of floating point operations).

    +

    In our lectures, the number of columns will +always refer to the number of features in our data set, while the +number of rows represents the number of data inputs. Note that in +other texts you may find the opposite notation. This has consequences +for the definition of for example the covariance matrix and its relation to the SVD.

    +
    +
    +

    Meet the Covariance Matrix¶

    +

    Before we move on to a discussion of Ridge and Lasso regression, we want to show an important example of the above.

    +

    We have already noted that the matrix \(\boldsymbol{X}^T\boldsymbol{X}\) in ordinary +least squares is proportional to the second derivative of the cost +function, that is we have

    +
    +\[ +\frac{\partial^2 C(\boldsymbol{\beta})}{\partial \boldsymbol{\beta}^T\partial \boldsymbol{\beta}} =\frac{2}{n}\boldsymbol{X}^T\boldsymbol{X}. +\]
    +

    This quantity defines was what is called the Hessian matrix (the second derivative of a function we want to optimize).

    +

    The Hessian matrix plays an important role and is defined in this course as

    +
    +\[ +\boldsymbol{H}=\boldsymbol{X}^T\boldsymbol{X}. +\]
    +

    The Hessian matrix for ordinary least squares is also proportional to +the covariance matrix. This means also that we can use the SVD to find +the eigenvalues of the covariance matrix and the Hessian matrix in +terms of the singular values. Let us develop these arguments, as they will play an important role in our machine learning studies.

    +
    +
    +

    Introducing the Covariance and Correlation functions¶

    +

    Before we discuss the link between for example Ridge regression and the singular value decomposition, we need to remind ourselves about +the definition of the covariance and the correlation function. These are quantities that play a central role in machine learning methods.

    +

    Suppose we have defined two vectors +\(\hat{x}\) and \(\hat{y}\) with \(n\) elements each. The covariance matrix \(\boldsymbol{C}\) is defined as

    +
    +\[\begin{split} +\boldsymbol{C}[\boldsymbol{x},\boldsymbol{y}] = \begin{bmatrix} \mathrm{cov}[\boldsymbol{x},\boldsymbol{x}] & \mathrm{cov}[\boldsymbol{x},\boldsymbol{y}] \\ + \mathrm{cov}[\boldsymbol{y},\boldsymbol{x}] & \mathrm{cov}[\boldsymbol{y},\boldsymbol{y}] \\ + \end{bmatrix}, +\end{split}\]
    +

    where for example

    +
    +\[ +\mathrm{cov}[\boldsymbol{x},\boldsymbol{y}] =\frac{1}{n} \sum_{i=0}^{n-1}(x_i- \overline{x})(y_i- \overline{y}). +\]
    +

    With this definition and recalling that the variance is defined as

    +
    +\[ +\mathrm{var}[\boldsymbol{x}]=\frac{1}{n} \sum_{i=0}^{n-1}(x_i- \overline{x})^2, +\]
    +

    we can rewrite the covariance matrix as

    +
    +\[\begin{split} +\boldsymbol{C}[\boldsymbol{x},\boldsymbol{y}] = \begin{bmatrix} \mathrm{var}[\boldsymbol{x}] & \mathrm{cov}[\boldsymbol{x},\boldsymbol{y}] \\ + \mathrm{cov}[\boldsymbol{x},\boldsymbol{y}] & \mathrm{var}[\boldsymbol{y}] \\ + \end{bmatrix}. +\end{split}\]
    +

    Note: we have used \(1/n\) in the above definitions of the sample variance and covariance. We assume then that we can calculate the exact mean value. +What you will find in essentially all statistics texts are equations +with a factor \(1/(n-1)\). This is called Bessel’s correction. This +method corrects the bias in the estimation of the population variance +and covariance. It also partially corrects the bias in the estimation +of the population standard deviation. If you use a library like +Scikit-Learn or nunmpy’s function calculate the covariance, this +quantity will be computed with a factor \(1/(n-1)\).

    +
    +
    +

    Covariance and Correlation Matrix¶

    +

    The covariance takes values between zero and infinity and may thus +lead to problems with loss of numerical precision for particularly +large values. It is common to scale the covariance matrix by +introducing instead the correlation matrix defined via the so-called +correlation function

    +
    +\[ +\mathrm{corr}[\boldsymbol{x},\boldsymbol{y}]=\frac{\mathrm{cov}[\boldsymbol{x},\boldsymbol{y}]}{\sqrt{\mathrm{var}[\boldsymbol{x}] \mathrm{var}[\boldsymbol{y}]}}. +\]
    +

    The correlation function is then given by values \(\mathrm{corr}[\boldsymbol{x},\boldsymbol{y}] +\in [-1,1]\). This avoids eventual problems with too large values. We +can then define the correlation matrix for the two vectors \(\boldsymbol{x}\) +and \(\boldsymbol{y}\) as

    +
    +\[\begin{split} +\boldsymbol{K}[\boldsymbol{x},\boldsymbol{y}] = \begin{bmatrix} 1 & \mathrm{corr}[\boldsymbol{x},\boldsymbol{y}] \\ + \mathrm{corr}[\boldsymbol{y},\boldsymbol{x}] & 1 \\ + \end{bmatrix}, +\end{split}\]
    +

    In the above example this is the function we constructed using pandas.

    +
    +
    +

    Correlation Function and Design/Feature Matrix¶

    +

    In our derivation of the various regression algorithms like Ordinary Least Squares or Ridge regression +we defined the design/feature matrix \(\boldsymbol{X}\) as

    +
    +\[\begin{split} +\boldsymbol{X}=\begin{bmatrix} +x_{0,0} & x_{0,1} & x_{0,2}& \dots & \dots x_{0,p-1}\\ +x_{1,0} & x_{1,1} & x_{1,2}& \dots & \dots x_{1,p-1}\\ +x_{2,0} & x_{2,1} & x_{2,2}& \dots & \dots x_{2,p-1}\\ +\dots & \dots & \dots & \dots \dots & \dots \\ +x_{n-2,0} & x_{n-2,1} & x_{n-2,2}& \dots & \dots x_{n-2,p-1}\\ +x_{n-1,0} & x_{n-1,1} & x_{n-1,2}& \dots & \dots x_{n-1,p-1}\\ +\end{bmatrix}, +\end{split}\]
    +

    with \(\boldsymbol{X}\in {\mathbb{R}}^{n\times p}\), with the predictors/features \(p\) refering to the column numbers and the +entries \(n\) being the row elements. +We can rewrite the design/feature matrix in terms of its column vectors as

    +
    +\[ +\boldsymbol{X}=\begin{bmatrix} \boldsymbol{x}_0 & \boldsymbol{x}_1 & \boldsymbol{x}_2 & \dots & \dots & \boldsymbol{x}_{p-1}\end{bmatrix}, +\]
    +

    with a given vector

    +
    +\[ +\boldsymbol{x}_i^T = \begin{bmatrix}x_{0,i} & x_{1,i} & x_{2,i}& \dots & \dots x_{n-1,i}\end{bmatrix}. +\]
    +

    With these definitions, we can now rewrite our \(2\times 2\) +correlation/covariance matrix in terms of a moe general design/feature +matrix \(\boldsymbol{X}\in {\mathbb{R}}^{n\times p}\). This leads to a \(p\times p\) +covariance matrix for the vectors \(\boldsymbol{x}_i\) with \(i=0,1,\dots,p-1\)

    +
    +\[\begin{split} +\boldsymbol{C}[\boldsymbol{x}] = \begin{bmatrix} +\mathrm{var}[\boldsymbol{x}_0] & \mathrm{cov}[\boldsymbol{x}_0,\boldsymbol{x}_1] & \mathrm{cov}[\boldsymbol{x}_0,\boldsymbol{x}_2] & \dots & \dots & \mathrm{cov}[\boldsymbol{x}_0,\boldsymbol{x}_{p-1}]\\ +\mathrm{cov}[\boldsymbol{x}_1,\boldsymbol{x}_0] & \mathrm{var}[\boldsymbol{x}_1] & \mathrm{cov}[\boldsymbol{x}_1,\boldsymbol{x}_2] & \dots & \dots & \mathrm{cov}[\boldsymbol{x}_1,\boldsymbol{x}_{p-1}]\\ +\mathrm{cov}[\boldsymbol{x}_2,\boldsymbol{x}_0] & \mathrm{cov}[\boldsymbol{x}_2,\boldsymbol{x}_1] & \mathrm{var}[\boldsymbol{x}_2] & \dots & \dots & \mathrm{cov}[\boldsymbol{x}_2,\boldsymbol{x}_{p-1}]\\ +\dots & \dots & \dots & \dots & \dots & \dots \\ +\dots & \dots & \dots & \dots & \dots & \dots \\ +\mathrm{cov}[\boldsymbol{x}_{p-1},\boldsymbol{x}_0] & \mathrm{cov}[\boldsymbol{x}_{p-1},\boldsymbol{x}_1] & \mathrm{cov}[\boldsymbol{x}_{p-1},\boldsymbol{x}_{2}] & \dots & \dots & \mathrm{var}[\boldsymbol{x}_{p-1}]\\ +\end{bmatrix}, +\end{split}\]
    +

    and the correlation matrix

    +
    +\[\begin{split} +\boldsymbol{K}[\boldsymbol{x}] = \begin{bmatrix} +1 & \mathrm{corr}[\boldsymbol{x}_0,\boldsymbol{x}_1] & \mathrm{corr}[\boldsymbol{x}_0,\boldsymbol{x}_2] & \dots & \dots & \mathrm{corr}[\boldsymbol{x}_0,\boldsymbol{x}_{p-1}]\\ +\mathrm{corr}[\boldsymbol{x}_1,\boldsymbol{x}_0] & 1 & \mathrm{corr}[\boldsymbol{x}_1,\boldsymbol{x}_2] & \dots & \dots & \mathrm{corr}[\boldsymbol{x}_1,\boldsymbol{x}_{p-1}]\\ +\mathrm{corr}[\boldsymbol{x}_2,\boldsymbol{x}_0] & \mathrm{corr}[\boldsymbol{x}_2,\boldsymbol{x}_1] & 1 & \dots & \dots & \mathrm{corr}[\boldsymbol{x}_2,\boldsymbol{x}_{p-1}]\\ +\dots & \dots & \dots & \dots & \dots & \dots \\ +\dots & \dots & \dots & \dots & \dots & \dots \\ +\mathrm{corr}[\boldsymbol{x}_{p-1},\boldsymbol{x}_0] & \mathrm{corr}[\boldsymbol{x}_{p-1},\boldsymbol{x}_1] & \mathrm{corr}[\boldsymbol{x}_{p-1},\boldsymbol{x}_{2}] & \dots & \dots & 1\\ +\end{bmatrix}, +\end{split}\]
    +
    +
    +

    Covariance Matrix Examples¶

    +

    The Numpy function np.cov calculates the covariance elements using +the factor \(1/(n-1)\) instead of \(1/n\) since it assumes we do not have +the exact mean values. The following simple function uses the +np.vstack function which takes each vector of dimension \(1\times n\) +and produces a \(2\times n\) matrix \(\boldsymbol{W}\)

    +

    Note that this assumes you have the features as the rows, and the inputs as columns, that is

    +
    +\[\begin{split} +\boldsymbol{W} = \begin{bmatrix} x_0 & x_1 & x_2 & \dots & x_{n-2} & x_{n-1} \\ + y_0 & y_1 & y_2 & \dots & y_{n-2} & y_{n-1} \\ + \end{bmatrix}, +\end{split}\]
    +

    which in turn is converted into into the \(2\times 2\) covariance matrix +\(\boldsymbol{C}\) via the Numpy function np.cov(). We note that we can also calculate +the mean value of each set of samples \(\boldsymbol{x}\) etc using the Numpy +function np.mean(x). We can also extract the eigenvalues of the +covariance matrix through the np.linalg.eig() function.

    +
    +
    +
    # Importing various packages
    +import numpy as np
    +n = 100
    +x = np.random.normal(size=n)
    +print(np.mean(x))
    +y = 4+3*x+np.random.normal(size=n)
    +print(np.mean(y))
    +W = np.vstack((x, y))
    +C = np.cov(W)
    +print(C)
    +
    +
    +
    +
    +
    +
    +

    Correlation Matrix¶

    +

    The previous example can be converted into the correlation matrix by +simply scaling the matrix elements with the variances. We should also +subtract the mean values for each column. This leads to the following +code which sets up the correlations matrix for the previous example in +a more brute force way. Here we scale the mean values for each column of the design matrix, calculate the relevant mean values and variances and then finally set up the \(2\times 2\) correlation matrix (since we have only two vectors).

    +
    +
    +
    import numpy as np
    +n = 100
    +# define two vectors                                                                                           
    +x = np.random.random(size=n)
    +y = 4+3*x+np.random.normal(size=n)
    +#scaling the x and y vectors                                                                                   
    +x = x - np.mean(x)
    +y = y - np.mean(y)
    +variance_x = np.sum(x@x)/n
    +variance_y = np.sum(y@y)/n
    +print(variance_x)
    +print(variance_y)
    +cov_xy = np.sum(x@y)/n
    +cov_xx = np.sum(x@x)/n
    +cov_yy = np.sum(y@y)/n
    +C = np.zeros((2,2))
    +C[0,0]= cov_xx/variance_x
    +C[1,1]= cov_yy/variance_y
    +C[0,1]= cov_xy/np.sqrt(variance_y*variance_x)
    +C[1,0]= C[0,1]
    +print(C)
    +
    +
    +
    +
    +

    We see that the matrix elements along the diagonal are one as they +should be and that the matrix is symmetric. Furthermore, diagonalizing +this matrix we easily see that it is a positive definite matrix.

    +

    The above procedure with numpy can be made more compact if we use pandas.

    +
    +
    +

    Correlation Matrix with Pandas¶

    +

    We whow here how we can set up the correlation matrix using pandas, as done in this simple code

    +
    +
    +
    import numpy as np
    +import pandas as pd
    +n = 10
    +x = np.random.normal(size=n)
    +x = x - np.mean(x)
    +y = 4+3*x+np.random.normal(size=n)
    +y = y - np.mean(y)
    +# Note that we transpose the matrix in order to stay with our ordering n x p
    +X = (np.vstack((x, y))).T
    +print(X)
    +Xpd = pd.DataFrame(X)
    +print(Xpd)
    +correlation_matrix = Xpd.corr()
    +print(correlation_matrix)
    +
    +
    +
    +
    +

    We expand this model to the Franke function discussed above.

    +
    +
    +

    Correlation Matrix with Pandas and the Franke function¶

    +
    +
    +
    # Common imports
    +import numpy as np
    +import pandas as pd
    +
    +
    +def FrankeFunction(x,y):
    +	term1 = 0.75*np.exp(-(0.25*(9*x-2)**2) - 0.25*((9*y-2)**2))
    +	term2 = 0.75*np.exp(-((9*x+1)**2)/49.0 - 0.1*(9*y+1))
    +	term3 = 0.5*np.exp(-(9*x-7)**2/4.0 - 0.25*((9*y-3)**2))
    +	term4 = -0.2*np.exp(-(9*x-4)**2 - (9*y-7)**2)
    +	return term1 + term2 + term3 + term4
    +
    +
    +def create_X(x, y, n ):
    +	if len(x.shape) > 1:
    +		x = np.ravel(x)
    +		y = np.ravel(y)
    +
    +	N = len(x)
    +	l = int((n+1)*(n+2)/2)		# Number of elements in beta
    +	X = np.ones((N,l))
    +
    +	for i in range(1,n+1):
    +		q = int((i)*(i+1)/2)
    +		for k in range(i+1):
    +			X[:,q+k] = (x**(i-k))*(y**k)
    +
    +	return X
    +
    +
    +# Making meshgrid of datapoints and compute Franke's function
    +n = 4
    +N = 100
    +x = np.sort(np.random.uniform(0, 1, N))
    +y = np.sort(np.random.uniform(0, 1, N))
    +z = FrankeFunction(x, y)
    +X = create_X(x, y, n=n)    
    +
    +Xpd = pd.DataFrame(X)
    +# subtract the mean values and set up the covariance matrix
    +Xpd = Xpd - Xpd.mean()
    +covariance_matrix = Xpd.cov()
    +print(covariance_matrix)
    +
    +
    +
    +
    +

    We note here that the covariance is zero for the first rows and +columns since all matrix elements in the design matrix were set to one +(we are fitting the function in terms of a polynomial of degree \(n\)).

    +

    This means that the variance for these elements will be zero and will +cause problems when we set up the correlation matrix. We can simply +drop these elements and construct a correlation +matrix without these elements.

    +
    +
    +

    Rewriting the Covariance and/or Correlation Matrix¶

    +

    We can rewrite the covariance matrix in a more compact form in terms of the design/feature matrix \(\boldsymbol{X}\) as

    +
    +\[ +\boldsymbol{C}[\boldsymbol{x}] = \frac{1}{n}\boldsymbol{X}^T\boldsymbol{X}= \mathbb{E}[\boldsymbol{X}^T\boldsymbol{X}]. +\]
    +

    To see this let us simply look at a design matrix \(\boldsymbol{X}\in {\mathbb{R}}^{2\times 2}\)

    +
    +\[\begin{split} +\boldsymbol{X}=\begin{bmatrix} +x_{00} & x_{01}\\ +x_{10} & x_{11}\\ +\end{bmatrix}=\begin{bmatrix} +\boldsymbol{x}_{0} & \boldsymbol{x}_{1}\\ +\end{bmatrix}. +\end{split}\]
    +

    If we then compute the expectation value (note the \(1/n\) factor instead of \(1/(n-1)\))

    +
    +\[\begin{split} +\mathbb{E}[\boldsymbol{X}^T\boldsymbol{X}] = \frac{1}{n}\boldsymbol{X}^T\boldsymbol{X}=\frac{1}{n}\begin{bmatrix} +x_{00}^2+x_{10}^2 & x_{00}x_{01}+x_{10}x_{11}\\ +x_{01}x_{00}+x_{11}x_{10} & x_{01}^2+x_{11}^2\\ +\end{bmatrix}, +\end{split}\]
    +

    which is just

    +
    +\[\begin{split} +\boldsymbol{C}[\boldsymbol{x}_0,\boldsymbol{x}_1] = \boldsymbol{C}[\boldsymbol{x}]=\begin{bmatrix} \mathrm{var}[\boldsymbol{x}_0] & \mathrm{cov}[\boldsymbol{x}_0,\boldsymbol{x}_1] \\ + \mathrm{cov}[\boldsymbol{x}_1,\boldsymbol{x}_0] & \mathrm{var}[\boldsymbol{x}_1] \\ + \end{bmatrix}, +\end{split}\]
    +

    where we wrote $\(\boldsymbol{C}[\boldsymbol{x}_0,\boldsymbol{x}_1] = \boldsymbol{C}[\boldsymbol{x}]\)\( to indicate that this is the covariance of the vectors \)\boldsymbol{x}\( of the design/feature matrix \)\boldsymbol{X}$.

    +

    It is easy to generalize this to a matrix \(\boldsymbol{X}\in {\mathbb{R}}^{n\times p}\).

    +
    +
    +

    Linking with the SVD¶

    +

    We saw earlier that

    +
    +\[ +\boldsymbol{X}^T\boldsymbol{X}=\boldsymbol{V}\boldsymbol{\Sigma}^T\boldsymbol{U}^T\boldsymbol{U}\boldsymbol{\Sigma}\boldsymbol{V}^T=\boldsymbol{V}\boldsymbol{\Sigma}^T\boldsymbol{\Sigma}\boldsymbol{V}^T. +\]
    +

    Since the matrices here have dimension \(p\times p\), with \(p\) corresponding to the singular values, we defined earlier the matrix

    +
    +\[\begin{split} +\boldsymbol{\Sigma}^T\boldsymbol{\Sigma} = \begin{bmatrix} \tilde{\boldsymbol{\Sigma}} & \boldsymbol{0}\\ \end{bmatrix}\begin{bmatrix} \tilde{\boldsymbol{\Sigma}} \\ \boldsymbol{0}\\ \end{bmatrix}, +\end{split}\]
    +

    where the tilde-matrix \(\tilde{\boldsymbol{\Sigma}}\) is a matrix of dimension \(p\times p\) containing only the singular values \(\sigma_i\), that is

    +
    +\[\begin{split} +\tilde{\boldsymbol{\Sigma}}=\begin{bmatrix} \sigma_0 & 0 & 0 & \dots & 0 & 0 \\ + 0 & \sigma_1 & 0 & \dots & 0 & 0 \\ + 0 & 0 & \sigma_2 & \dots & 0 & 0 \\ + 0 & 0 & 0 & \dots & \sigma_{p-2} & 0 \\ + 0 & 0 & 0 & \dots & 0 & \sigma_{p-1} \\ +\end{bmatrix}, +\end{split}\]
    +

    meaning we can write

    +
    +\[ +\boldsymbol{X}^T\boldsymbol{X}=\boldsymbol{V}\tilde{\boldsymbol{\Sigma}}^2\boldsymbol{V}^T. +\]
    +

    Multiplying from the right with \(\boldsymbol{V}\) (using the orthogonality of \(\boldsymbol{V}\)) we get

    +
    +\[ +\left(\boldsymbol{X}^T\boldsymbol{X}\right)\boldsymbol{V}=\boldsymbol{V}\tilde{\boldsymbol{\Sigma}}^2. +\]
    +
    +
    +

    What does it mean?¶

    +

    This means the vectors \(\boldsymbol{v}_i\) of the orthogonal matrix \(\boldsymbol{V}\) +are the eigenvectors of the matrix \(\boldsymbol{X}^T\boldsymbol{X}\) with eigenvalues +given by the singular values squared, that is

    +
    +\[ +\left(\boldsymbol{X}^T\boldsymbol{X}\right)\boldsymbol{v}_i=\boldsymbol{v}_i\sigma_i^2. +\]
    +

    In other words, each non-zero singular value of \(\boldsymbol{X}\) is a positive +square root of an eigenvalue of \(\boldsymbol{X}^T\boldsymbol{X}\). It means also that +the columns of \(\boldsymbol{V}\) are the eigenvectors of +\(\boldsymbol{X}^T\boldsymbol{X}\). Since we have ordered the singular values of +\(\boldsymbol{X}\) in a descending order, it means that the column vectors +\(\boldsymbol{v}_i\) are hierarchically ordered by how much correlation they +encode from the columns of \(\boldsymbol{X}\).

    +

    Note that these are also the eigenvectors and eigenvalues of the +Hessian matrix.

    +

    If we now recall the definition of the covariance matrix (not using +Bessel’s correction) we have

    +
    +\[ +\boldsymbol{C}[\boldsymbol{X}]=\frac{1}{n}\boldsymbol{X}^T\boldsymbol{X}, +\]
    +

    meaning that every squared non-singular value of \(\boldsymbol{X}\) divided by \(n\) ( +the number of samples) are the eigenvalues of the covariance +matrix. Every singular value of \(\boldsymbol{X}\) is thus a positive square +root of an eigenvalue of \(\boldsymbol{X}^T\boldsymbol{X}\). If the matrix \(\boldsymbol{X}\) is +self-adjoint, the singular values of \(\boldsymbol{X}\) are equal to the +absolute value of the eigenvalues of \(\boldsymbol{X}\).

    +
    +
    +

    And finally \(\boldsymbol{X}\boldsymbol{X}^T\)¶

    +

    For \(\boldsymbol{X}\boldsymbol{X}^T\) we found

    +
    +\[ +\boldsymbol{X}\boldsymbol{X}^T=\boldsymbol{U}\boldsymbol{\Sigma}\boldsymbol{V}^T\boldsymbol{V}\boldsymbol{\Sigma}^T\boldsymbol{U}^T=\boldsymbol{U}\boldsymbol{\Sigma}^T\boldsymbol{\Sigma}\boldsymbol{U}^T. +\]
    +

    Since the matrices here have dimension \(n\times n\), we have

    +
    +\[\begin{split} +\boldsymbol{\Sigma}\boldsymbol{\Sigma}^T = \begin{bmatrix} \tilde{\boldsymbol{\Sigma}} \\ \boldsymbol{0}\\ \end{bmatrix}\begin{bmatrix} \tilde{\boldsymbol{\Sigma}} \boldsymbol{0}\\ \end{bmatrix}=\begin{bmatrix} \tilde{\boldsymbol{\Sigma}} & \boldsymbol{0} \\ \boldsymbol{0} & \boldsymbol{0}\\ \end{bmatrix}, +\end{split}\]
    +

    leading to

    +
    +\[\begin{split} +\boldsymbol{X}\boldsymbol{X}^T=\boldsymbol{U}\begin{bmatrix} \tilde{\boldsymbol{\Sigma}} & \boldsymbol{0} \\ \boldsymbol{0} & \boldsymbol{0}\\ \end{bmatrix}\boldsymbol{U}^T. +\end{split}\]
    +

    Multiplying with \(\boldsymbol{U}\) from the right gives us the eigenvalue problem

    +
    +\[\begin{split} +(\boldsymbol{X}\boldsymbol{X}^T)\boldsymbol{U}=\boldsymbol{U}\begin{bmatrix} \tilde{\boldsymbol{\Sigma}} & \boldsymbol{0} \\ \boldsymbol{0} & \boldsymbol{0}\\ \end{bmatrix}. +\end{split}\]
    +

    It means that the eigenvalues of \(\boldsymbol{X}\boldsymbol{X}^T\) are again given by +the non-zero singular values plus now a series of zeros. The column +vectors of \(\boldsymbol{U}\) are the eigenvectors of \(\boldsymbol{X}\boldsymbol{X}^T\) and +measure how much correlations are contained in the rows of \(\boldsymbol{X}\).

    +

    Since we will mainly be interested in the correlations among the features +of our data (the columns of \(\boldsymbol{X}\), the quantity of interest for us are the non-zero singular +values and the column vectors of \(\boldsymbol{V}\).

    +
    +
    +

    Ridge and LASSO Regression¶

    +

    Let us remind ourselves about the expression for the standard Mean Squared Error (MSE) which we used to define our cost function and the equations for the ordinary least squares (OLS) method, that is +our optimization problem is

    +
    +\[ +{\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\}. +\]
    +

    or we can state it as

    +
    +\[ +{\displaystyle \min_{\boldsymbol{\beta}\in +{\mathbb{R}}^{p}}}\frac{1}{n}\sum_{i=0}^{n-1}\left(y_i-\tilde{y}_i\right)^2=\frac{1}{n}\vert\vert \boldsymbol{y}-\boldsymbol{X}\boldsymbol{\beta}\vert\vert_2^2, +\]
    +

    where we have used the definition of a norm-2 vector, that is

    +
    +\[ +\vert\vert \boldsymbol{x}\vert\vert_2 = \sqrt{\sum_i x_i^2}. +\]
    +

    By minimizing the above equation with respect to the parameters +\(\boldsymbol{\beta}\) we could then obtain an analytical expression for the +parameters \(\boldsymbol{\beta}\). We can add a regularization parameter \(\lambda\) by +defining a new cost function to be optimized, that is

    +
    +\[ +{\displaystyle \min_{\boldsymbol{\beta}\in +{\mathbb{R}}^{p}}}\frac{1}{n}\vert\vert \boldsymbol{y}-\boldsymbol{X}\boldsymbol{\beta}\vert\vert_2^2+\lambda\vert\vert \boldsymbol{\beta}\vert\vert_2^2 +\]
    +

    which leads to the Ridge regression minimization problem where we +require that \(\vert\vert \boldsymbol{\beta}\vert\vert_2^2\le t\), where \(t\) is +a finite number larger than zero. By defining

    +
    +\[ +C(\boldsymbol{X},\boldsymbol{\beta})=\frac{1}{n}\vert\vert \boldsymbol{y}-\boldsymbol{X}\boldsymbol{\beta}\vert\vert_2^2+\lambda\vert\vert \boldsymbol{\beta}\vert\vert_1, +\]
    +

    we have a new optimization equation

    +
    +\[ +{\displaystyle \min_{\boldsymbol{\beta}\in +{\mathbb{R}}^{p}}}\frac{1}{n}\vert\vert \boldsymbol{y}-\boldsymbol{X}\boldsymbol{\beta}\vert\vert_2^2+\lambda\vert\vert \boldsymbol{\beta}\vert\vert_1 +\]
    +

    which leads to Lasso regression. Lasso stands for least absolute shrinkage and selection operator.

    +

    Here we have defined the norm-1 as

    +
    +\[ +\vert\vert \boldsymbol{x}\vert\vert_1 = \sum_i \vert x_i\vert. +\]
    +
    +
    +

    Deriving the Ridge Regression Equations¶

    +

    Using the matrix-vector expression for Ridge regression and dropping the parameter \(1/n\) in front of the standard means squared error equation, we have

    +
    +\[ +C(\boldsymbol{X},\boldsymbol{\beta})=\left\{(\boldsymbol{y}-\boldsymbol{X}\boldsymbol{\beta})^T(\boldsymbol{y}-\boldsymbol{X}\boldsymbol{\beta})\right\}+\lambda\boldsymbol{\beta}^T\boldsymbol{\beta}, +\]
    +

    and +taking the derivatives with respect to \(\boldsymbol{\beta}\) we obtain then +a slightly modified matrix inversion problem which for finite values +of \(\lambda\) does not suffer from singularity problems. We obtain +the optimal parameters

    +
    +\[ +\hat{\boldsymbol{\beta}}_{\mathrm{Ridge}} = \left(\boldsymbol{X}^T\boldsymbol{X}+\lambda\boldsymbol{I}\right)^{-1}\boldsymbol{X}^T\boldsymbol{y}, +\]
    +

    with \(\boldsymbol{I}\) being a \(p\times p\) identity matrix with the constraint that

    +
    +\[ +\sum_{i=0}^{p-1} \beta_i^2 \leq t, +\]
    +

    with \(t\) a finite positive number.

    +

    If we keep the \(1/n\) factor, the equation for the optimal \(\beta\) changes to

    +
    +\[ +\hat{\boldsymbol{\beta}}_{\mathrm{Ridge}} = \left(\boldsymbol{X}^T\boldsymbol{X}+n\lambda\boldsymbol{I}\right)^{-1}\boldsymbol{X}^T\boldsymbol{y}. +\]
    +

    In many textbooks the \(1/n\) term is often omitted. Note that a library like Scikit-Learn does not include the \(1/n\) factor in the setup of the cost function.

    +

    When we compare this with the ordinary least squares result we have

    +
    +\[ +\hat{\boldsymbol{\beta}}_{\mathrm{OLS}} = \left(\boldsymbol{X}^T\boldsymbol{X}\right)^{-1}\boldsymbol{X}^T\boldsymbol{y}, +\]
    +

    which can lead to singular matrices. However, with the SVD, we can always compute the inverse of the matrix \(\boldsymbol{X}^T\boldsymbol{X}\).

    +

    We see that Ridge regression is nothing but the standard OLS with a +modified diagonal term added to \(\boldsymbol{X}^T\boldsymbol{X}\). The consequences, in +particular for our discussion of the bias-variance tradeoff are rather +interesting. We will see that for specific values of \(\lambda\), we may +even reduce the variance of the optimal parameters \(\boldsymbol{\beta}\). These topics and other related ones, will be discussed after the more linear algebra oriented analysis here.

    +

    Using our insights about the SVD of the design matrix \(\boldsymbol{X}\) +We have already analyzed the OLS solutions in terms of the eigenvectors (the columns) of the right singular value matrix \(\boldsymbol{U}\) as

    +
    +\[ +\tilde{\boldsymbol{y}}_{\mathrm{OLS}}=\boldsymbol{X}\boldsymbol{\beta} =\boldsymbol{U}\boldsymbol{U}^T\boldsymbol{y}. +\]
    +

    For Ridge regression this becomes

    +
    +\[ +\tilde{\boldsymbol{y}}_{\mathrm{Ridge}}=\boldsymbol{X}\boldsymbol{\beta}_{\mathrm{Ridge}} = \boldsymbol{U\Sigma V^T}\left(\boldsymbol{V}\boldsymbol{\Sigma}^2\boldsymbol{V}^T+\lambda\boldsymbol{I} \right)^{-1}(\boldsymbol{U\Sigma V^T})^T\boldsymbol{y}=\sum_{j=0}^{p-1}\boldsymbol{u}_j\boldsymbol{u}_j^T\frac{\sigma_j^2}{\sigma_j^2+\lambda}\boldsymbol{y}, +\]
    +

    with the vectors \(\boldsymbol{u}_j\) being the columns of \(\boldsymbol{U}\) from the SVD of the matrix \(\boldsymbol{X}\).

    +
    +
    +

    Interpreting the Ridge results¶

    +

    Since \(\lambda \geq 0\), it means that compared to OLS, we have

    +
    +\[ +\frac{\sigma_j^2}{\sigma_j^2+\lambda} \leq 1. +\]
    +

    Ridge regression finds the coordinates of \(\boldsymbol{y}\) with respect to the +orthonormal basis \(\boldsymbol{U}\), it then shrinks the coordinates by +\(\frac{\sigma_j^2}{\sigma_j^2+\lambda}\). Recall that the SVD has +eigenvalues ordered in a descending way, that is \(\sigma_i \geq +\sigma_{i+1}\).

    +

    For small eigenvalues \(\sigma_i\) it means that their contributions become less important, a fact which can be used to reduce the number of degrees of freedom. More about this when we have covered the material on a statistical interpretation of various linear regression methods.

    +
    +
    +

    More interpretations¶

    +

    For the sake of simplicity, let us assume that the design matrix is orthonormal, that is

    +
    +\[ +\boldsymbol{X}^T\boldsymbol{X}=(\boldsymbol{X}^T\boldsymbol{X})^{-1} =\boldsymbol{I}. +\]
    +

    In this case the standard OLS results in

    +
    +\[ +\boldsymbol{\beta}^{\mathrm{OLS}} = \boldsymbol{X}^T\boldsymbol{y}=\sum_{i=0}^{n-1}\boldsymbol{u}_i\boldsymbol{u}_i^T\boldsymbol{y}, +\]
    +

    and

    +
    +\[ +\boldsymbol{\beta}^{\mathrm{Ridge}} = \left(\boldsymbol{I}+\lambda\boldsymbol{I}\right)^{-1}\boldsymbol{X}^T\boldsymbol{y}=\left(1+\lambda\right)^{-1}\boldsymbol{\beta}^{\mathrm{OLS}}, +\]
    +

    that is the Ridge estimator scales the OLS estimator by the inverse of a factor \(1+\lambda\), and +the Ridge estimator converges to zero when the hyperparameter goes to +infinity.

    +

    We will come back to more interpreations after we have gone through some of the statistical analysis part.

    +

    For more discussions of Ridge and Lasso regression, Wessel van Wieringen’s article is highly recommended. +Similarly, Mehta et al’s article is also recommended.

    +
    +
    +

    Deriving the Lasso Regression Equations¶

    +

    Using the matrix-vector expression for Lasso regression and dropping the parameter \(1/n\) in front of the standard means squared error equation, we have the following cost function

    +
    +\[ +C(\boldsymbol{X},\boldsymbol{\beta})=\left\{(\boldsymbol{y}-\boldsymbol{X}\boldsymbol{\beta})^T(\boldsymbol{y}-\boldsymbol{X}\boldsymbol{\beta})\right\}+\lambda\vert\vert\boldsymbol{\beta}\vert\vert_1, +\]
    +

    Taking the derivative with respect to \(\boldsymbol{\beta}\) and recalling that the derivative of the absolute value is (we drop the boldfaced vector symbol for simplicty)

    +
    +\[\begin{split} +\frac{d \vert \beta\vert}{d \boldsymbol{\beta}}=\mathrm{sgn}(\boldsymbol{\beta})=\left\{\begin{array}{cc} 1 & \beta > 0 \\-1 & \beta < 0, \end{array}\right. +\end{split}\]
    +

    we have that the derivative of the cost function is

    +
    +\[ +\frac{\partial C(\boldsymbol{X},\boldsymbol{\beta})}{\partial \boldsymbol{\beta}}=-2\boldsymbol{X}^T(\boldsymbol{y}-\boldsymbol{X}\boldsymbol{\beta})+\lambda sgn(\boldsymbol{\beta})=0, +\]
    +

    and reordering we have

    +
    +\[ +\boldsymbol{X}^T\boldsymbol{X}\boldsymbol{\beta}+\lambda sgn(\boldsymbol{\beta})=2\boldsymbol{X}^T\boldsymbol{y}. +\]
    +

    This equation does not lead to a nice analytical equation as in either Ridge regression or ordinary least squares. This equation can however be solved by using standard convex optimization algorithms using for example the Python package CVXOPT. We will discuss this later.

    +
    +
    + + + + +
    + + + + + +
    +
    +
    +

    + + By Morten Hjorth-Jensen
    + + © Copyright 2021.
    +

    +
    +
    + + +
    +
    + + + + + \ No newline at end of file diff --git a/doc/LectureNotes/_build/jupyter_execute/exercisesweek35.ipynb b/doc/LectureNotes/_build/jupyter_execute/exercisesweek35.ipynb new file mode 100644 index 000000000..0b4eb4f75 --- /dev/null +++ b/doc/LectureNotes/_build/jupyter_execute/exercisesweek35.ipynb @@ -0,0 +1,411 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "053b96d5", + "metadata": { + "editable": true + }, + "source": [ + "\n", + "" + ] + }, + { + "cell_type": "markdown", + "id": "a09cb811", + "metadata": { + "editable": true + }, + "source": [ + "# Exercises week 35\n", + "**August 28-September 1, 2023**\n", + "\n", + "Date: **Deadline is Friday September 1 at midnight**" + ] + }, + { + "cell_type": "markdown", + "id": "8e83839e", + "metadata": { + "editable": true + }, + "source": [ + "## Exercise 1: Analytical exercises\n", + "\n", + "In this exercise we derive the expressions for various derivatives of\n", + "products of vectors and matrices. Such derivatives are central to the\n", + "optimization of various cost functions. Although we will often use\n", + "automatic differentiation in actual calculations, to be able to have\n", + "analytical expressions is extremely helpful in case we have simpler\n", + "derivatives as well as when we analyze various properties (like second\n", + "derivatives) of the chosen cost functions. Vectors are always written\n", + "as boldfaced lower case letters and matrices as upper case boldfaced\n", + "letters. You will find useful the notes from week 35 on derivatives of vectors and matrices.\n", + "\n", + "Show that" + ] + }, + { + "cell_type": "markdown", + "id": "fe2b1c49", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\frac{\\partial (\\boldsymbol{b}^T\\boldsymbol{a})}{\\partial \\boldsymbol{a}} = \\boldsymbol{b},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "259f2ad1", + "metadata": { + "editable": true + }, + "source": [ + "and" + ] + }, + { + "cell_type": "markdown", + "id": "5ac63202", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\frac{\\partial (\\boldsymbol{a}^T\\boldsymbol{A}\\boldsymbol{a})}{\\partial \\boldsymbol{a}} = \\boldsymbol{a}^T(\\boldsymbol{A}+\\boldsymbol{A}^T),\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "a52c6353", + "metadata": { + "editable": true + }, + "source": [ + "and" + ] + }, + { + "cell_type": "markdown", + "id": "910282dd", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\frac{\\partial \\left(\\boldsymbol{x}-\\boldsymbol{A}\\boldsymbol{s}\\right)^T\\left(\\boldsymbol{x}-\\boldsymbol{A}\\boldsymbol{s}\\right)}{\\partial \\boldsymbol{s}} = -2\\left(\\boldsymbol{x}-\\boldsymbol{A}\\boldsymbol{s}\\right)^T\\boldsymbol{A},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "f3d0f2f5", + "metadata": { + "editable": true + }, + "source": [ + "and finally find the second derivative of this function with respect to the vector $\\boldsymbol{s}$. If we replace the vector $\\boldsymbol{s}$ with the unknown parameters $\\boldsymbol{\\beta}$ used to define the ordinary least squares method, we end up with the equations that determine these parameters. The matrix $\\boldsymbol{A}$ is then the design matrix $\\boldsymbol{X}$ and $\\boldsymbol{x}$ here has to be replaced with the outputs $\\boldsymbol{y}$.\n", + "\n", + "The second derivative of the mean squared error is then proportional to the so-called Hessian matrix $\\boldsymbol{H}=\\boldsymbol{X}^T\\boldsymbol{X}$.\n", + "\n", + "**Hint**: In these exercises it is always useful to write out with summation indices the various quantities.\n", + "As an example, consider the function" + ] + }, + { + "cell_type": "markdown", + "id": "5fe4bc49", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "f(\\boldsymbol{x}) =\\boldsymbol{A}\\boldsymbol{x},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "55fee214", + "metadata": { + "editable": true + }, + "source": [ + "which reads for a specific component $f_i$ (we define the matrix $\\boldsymbol{A}$ to have dimension $n\\times n$ and the vector $\\boldsymbol{x}$ to have length $n$)" + ] + }, + { + "cell_type": "markdown", + "id": "92b0b614", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "f_i =\\sum_{j=0}^{n-1}a_{ij}x_j,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "6b68973e", + "metadata": { + "editable": true + }, + "source": [ + "which leads to" + ] + }, + { + "cell_type": "markdown", + "id": "89e679e8", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\frac{\\partial f_i}{\\partial x_j}= a_{ij},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "a35b6ab2", + "metadata": { + "editable": true + }, + "source": [ + "and written out in terms of the vector $\\boldsymbol{x}$ we have" + ] + }, + { + "cell_type": "markdown", + "id": "747d2724", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\frac{\\partial f(\\boldsymbol{x})}{\\partial \\boldsymbol{x}}= \\boldsymbol{A}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "911dc89a", + "metadata": { + "editable": true + }, + "source": [ + "## Exercise 2: making your own data and exploring scikit-learn\n", + "\n", + "We will generate our own dataset for a function $y(x)$ where $x \\in\n", + "[0,1]$ and defined by random numbers computed with the uniform\n", + "distribution. The function $y$ is a quadratic polynomial in $x$ with\n", + "added stochastic noise according to the normal distribution $\\cal\n", + "{N}(0,1)$. The following simple Python instructions define our $x$\n", + "and $y$ values (with 100 data points)." + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "id": "09971906", + "metadata": { + "collapsed": false, + "editable": true + }, + "outputs": [], + "source": [ + "import numpy as np\n", + "x = np.random.rand(100,1)\n", + "y = 2.0+5*x*x+0.1*np.random.randn(100,1)" + ] + }, + { + "cell_type": "markdown", + "id": "de82ebe8", + "metadata": { + "editable": true + }, + "source": [ + "1. Write your own code (following the examples under the [regression notes](https://compphysics.github.io/MachineLearning/doc/LectureNotes/_build/html/chapter1.html)) for computing the parametrization of the data set fitting a second-order polynomial. \n", + "\n", + "2. Use thereafter **scikit-learn** (see again the examples in the slides for week 35) and compare with your own code. Note here that **scikit-learn** does not include, by default, the intercept. See the discussions on scaling your data in the slides for this week. This type of problems appear in particular if we fit a polynomial with an intercept. \n", + "\n", + "3. Using scikit-learn, compute also the mean squared error, a risk metric corresponding to the expected value of the squared (quadratic) error defined as" + ] + }, + { + "cell_type": "markdown", + "id": "21b2c91f", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "MSE(\\boldsymbol{y},\\boldsymbol{\\tilde{y}}) = \\frac{1}{n}\n", + "\\sum_{i=0}^{n-1}(y_i-\\tilde{y}_i)^2,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "3b542aa1", + "metadata": { + "editable": true + }, + "source": [ + "and the $R^2$ score function.\n", + "If $\\tilde{\\boldsymbol{y}}_i$ is the predicted value of the $i-th$ sample and $y_i$ is the corresponding true value, then the score $R^2$ is defined as" + ] + }, + { + "cell_type": "markdown", + "id": "5393a93f", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "R^2(\\boldsymbol{y}, \\tilde{\\boldsymbol{y}}) = 1 - \\frac{\\sum_{i=0}^{n - 1} (y_i - \\tilde{y}_i)^2}{\\sum_{i=0}^{n - 1} (y_i - \\bar{y})^2},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "df1b8e23", + "metadata": { + "editable": true + }, + "source": [ + "where we have defined the mean value of $\\boldsymbol{y}$ as" + ] + }, + { + "cell_type": "markdown", + "id": "30ad9bb6", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\bar{y} = \\frac{1}{n} \\sum_{i=0}^{n - 1} y_i.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "0e2c0d15", + "metadata": { + "editable": true + }, + "source": [ + "You can use the functionality included in scikit-learn. If you feel for it, you can use your own program and define functions which compute the above two functions. \n", + "Discuss the meaning of these results. Try also to vary the coefficient in front of the added stochastic noise term and discuss the quality of the fits." + ] + }, + { + "cell_type": "markdown", + "id": "80eab896", + "metadata": { + "editable": true + }, + "source": [ + "## Exercise 3: Split data in test and training data\n", + "\n", + "In this exercise we want you to to compute the MSE for the training\n", + "data and the test data as function of the complexity of a polynomial,\n", + "that is the degree of a given polynomial. \n", + "\n", + "The aim is to reproduce Figure 2.11 of [Hastie et al](https://github.com/CompPhysics/MLErasmus/blob/master/doc/Textbooks/elementsstat.pdf).\n", + "Feel free to read the discussions leading to figure 2.11 of Hastie et al. \n", + "\n", + "Our data is defined by $x\\in [-3,3]$ with a total of for example $n=100$ data points. You should try to vary the number of data points $n$ in your analysis." + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "887378fa", + "metadata": { + "collapsed": false, + "editable": true + }, + "outputs": [], + "source": [ + "np.random.seed()\n", + "n = 100\n", + "# Make data set.\n", + "x = np.linspace(-3, 3, n).reshape(-1, 1)\n", + "y = np.exp(-x**2) + 1.5 * np.exp(-(x-2)**2)+ np.random.normal(0, 0.1, x.shape)" + ] + }, + { + "cell_type": "markdown", + "id": "a059a330", + "metadata": { + "editable": true + }, + "source": [ + "where $y$ is the function we want to fit with a given polynomial." + ] + }, + { + "cell_type": "markdown", + "id": "e2614fe9", + "metadata": { + "editable": true + }, + "source": [ + "**a)**\n", + "Write a first code which sets up a design matrix $X$ defined by a fifth-order polynomial and split your data set in training and test data." + ] + }, + { + "cell_type": "markdown", + "id": "8522c8f4", + "metadata": { + "editable": true + }, + "source": [ + "**b)**\n", + "Write thereafter (using either **scikit-learn** or your matrix inversion code using for example **numpy**)\n", + "and perform an ordinary least squares fitting and compute the mean squared error for the training data and the test data. These calculations should apply to a model given by a fifth-order polynomial. If you compare your own code with _scikit_learn_, not that the latter does not include by default the intercept. See the discussions on scaling your data in the slides for this week." + ] + }, + { + "cell_type": "markdown", + "id": "c4e99901", + "metadata": { + "editable": true + }, + "source": [ + "**c)**\n", + "Add now a model which allows you to make polynomials up to degree $15$. Perform a standard OLS fitting of the training data and compute the MSE for the training and test data and plot both test and training data MSE as functions of the polynomial degree. Compare what you see with Figure 2.11 of Hastie et al. Comment your results. For which polynomial degree do you find an optimal MSE (smallest value)?" + ] + } + ], + "metadata": { + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.10" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} \ No newline at end of file diff --git a/doc/LectureNotes/_build/jupyter_execute/exercisesweek35.py b/doc/LectureNotes/_build/jupyter_execute/exercisesweek35.py new file mode 100644 index 000000000..68069029a --- /dev/null +++ b/doc/LectureNotes/_build/jupyter_execute/exercisesweek35.py @@ -0,0 +1,147 @@ +#!/usr/bin/env python +# coding: utf-8 + +# +# + +# # Exercises week 35 +# **August 28-September 1, 2023** +# +# Date: **Deadline is Friday September 1 at midnight** + +# ## Exercise 1: Analytical exercises +# +# In this exercise we derive the expressions for various derivatives of +# products of vectors and matrices. Such derivatives are central to the +# optimization of various cost functions. Although we will often use +# automatic differentiation in actual calculations, to be able to have +# analytical expressions is extremely helpful in case we have simpler +# derivatives as well as when we analyze various properties (like second +# derivatives) of the chosen cost functions. Vectors are always written +# as boldfaced lower case letters and matrices as upper case boldfaced +# letters. You will find useful the notes from week 35 on derivatives of vectors and matrices. +# +# Show that + +# $$ +# \frac{\partial (\boldsymbol{b}^T\boldsymbol{a})}{\partial \boldsymbol{a}} = \boldsymbol{b}, +# $$ + +# and + +# $$ +# \frac{\partial (\boldsymbol{a}^T\boldsymbol{A}\boldsymbol{a})}{\partial \boldsymbol{a}} = \boldsymbol{a}^T(\boldsymbol{A}+\boldsymbol{A}^T), +# $$ + +# and + +# $$ +# \frac{\partial \left(\boldsymbol{x}-\boldsymbol{A}\boldsymbol{s}\right)^T\left(\boldsymbol{x}-\boldsymbol{A}\boldsymbol{s}\right)}{\partial \boldsymbol{s}} = -2\left(\boldsymbol{x}-\boldsymbol{A}\boldsymbol{s}\right)^T\boldsymbol{A}, +# $$ + +# and finally find the second derivative of this function with respect to the vector $\boldsymbol{s}$. If we replace the vector $\boldsymbol{s}$ with the unknown parameters $\boldsymbol{\beta}$ used to define the ordinary least squares method, we end up with the equations that determine these parameters. The matrix $\boldsymbol{A}$ is then the design matrix $\boldsymbol{X}$ and $\boldsymbol{x}$ here has to be replaced with the outputs $\boldsymbol{y}$. +# +# The second derivative of the mean squared error is then proportional to the so-called Hessian matrix $\boldsymbol{H}=\boldsymbol{X}^T\boldsymbol{X}$. +# +# **Hint**: In these exercises it is always useful to write out with summation indices the various quantities. +# As an example, consider the function + +# $$ +# f(\boldsymbol{x}) =\boldsymbol{A}\boldsymbol{x}, +# $$ + +# which reads for a specific component $f_i$ (we define the matrix $\boldsymbol{A}$ to have dimension $n\times n$ and the vector $\boldsymbol{x}$ to have length $n$) + +# $$ +# f_i =\sum_{j=0}^{n-1}a_{ij}x_j, +# $$ + +# which leads to + +# $$ +# \frac{\partial f_i}{\partial x_j}= a_{ij}, +# $$ + +# and written out in terms of the vector $\boldsymbol{x}$ we have + +# $$ +# \frac{\partial f(\boldsymbol{x})}{\partial \boldsymbol{x}}= \boldsymbol{A}. +# $$ + +# ## Exercise 2: making your own data and exploring scikit-learn +# +# We will generate our own dataset for a function $y(x)$ where $x \in +# [0,1]$ and defined by random numbers computed with the uniform +# distribution. The function $y$ is a quadratic polynomial in $x$ with +# added stochastic noise according to the normal distribution $\cal +# {N}(0,1)$. The following simple Python instructions define our $x$ +# and $y$ values (with 100 data points). + +# In[1]: + + +import numpy as np +x = np.random.rand(100,1) +y = 2.0+5*x*x+0.1*np.random.randn(100,1) + + +# 1. Write your own code (following the examples under the [regression notes](https://compphysics.github.io/MachineLearning/doc/LectureNotes/_build/html/chapter1.html)) for computing the parametrization of the data set fitting a second-order polynomial. +# +# 2. Use thereafter **scikit-learn** (see again the examples in the slides for week 35) and compare with your own code. Note here that **scikit-learn** does not include, by default, the intercept. See the discussions on scaling your data in the slides for this week. This type of problems appear in particular if we fit a polynomial with an intercept. +# +# 3. Using scikit-learn, compute also the mean squared error, a risk metric corresponding to the expected value of the squared (quadratic) error defined as + +# $$ +# MSE(\boldsymbol{y},\boldsymbol{\tilde{y}}) = \frac{1}{n} +# \sum_{i=0}^{n-1}(y_i-\tilde{y}_i)^2, +# $$ + +# and the $R^2$ score function. +# If $\tilde{\boldsymbol{y}}_i$ is the predicted value of the $i-th$ sample and $y_i$ is the corresponding true value, then the score $R^2$ is defined as + +# $$ +# R^2(\boldsymbol{y}, \tilde{\boldsymbol{y}}) = 1 - \frac{\sum_{i=0}^{n - 1} (y_i - \tilde{y}_i)^2}{\sum_{i=0}^{n - 1} (y_i - \bar{y})^2}, +# $$ + +# where we have defined the mean value of $\boldsymbol{y}$ as + +# $$ +# \bar{y} = \frac{1}{n} \sum_{i=0}^{n - 1} y_i. +# $$ + +# You can use the functionality included in scikit-learn. If you feel for it, you can use your own program and define functions which compute the above two functions. +# Discuss the meaning of these results. Try also to vary the coefficient in front of the added stochastic noise term and discuss the quality of the fits. + +# ## Exercise 3: Split data in test and training data +# +# In this exercise we want you to to compute the MSE for the training +# data and the test data as function of the complexity of a polynomial, +# that is the degree of a given polynomial. +# +# The aim is to reproduce Figure 2.11 of [Hastie et al](https://github.com/CompPhysics/MLErasmus/blob/master/doc/Textbooks/elementsstat.pdf). +# Feel free to read the discussions leading to figure 2.11 of Hastie et al. +# +# Our data is defined by $x\in [-3,3]$ with a total of for example $n=100$ data points. You should try to vary the number of data points $n$ in your analysis. + +# In[2]: + + +np.random.seed() +n = 100 +# Make data set. +x = np.linspace(-3, 3, n).reshape(-1, 1) +y = np.exp(-x**2) + 1.5 * np.exp(-(x-2)**2)+ np.random.normal(0, 0.1, x.shape) + + +# where $y$ is the function we want to fit with a given polynomial. + +# **a)** +# Write a first code which sets up a design matrix $X$ defined by a fifth-order polynomial and split your data set in training and test data. + +# **b)** +# Write thereafter (using either **scikit-learn** or your matrix inversion code using for example **numpy**) +# and perform an ordinary least squares fitting and compute the mean squared error for the training data and the test data. These calculations should apply to a model given by a fifth-order polynomial. If you compare your own code with _scikit_learn_, not that the latter does not include by default the intercept. See the discussions on scaling your data in the slides for this week. + +# **c)** +# Add now a model which allows you to make polynomials up to degree $15$. Perform a standard OLS fitting of the training data and compute the MSE for the training and test data and plot both test and training data MSE as functions of the polynomial degree. Compare what you see with Figure 2.11 of Hastie et al. Comment your results. For which polynomial degree do you find an optimal MSE (smallest value)? diff --git a/doc/LectureNotes/_build/jupyter_execute/week35.ipynb b/doc/LectureNotes/_build/jupyter_execute/week35.ipynb new file mode 100644 index 000000000..12c5d0cea --- /dev/null +++ b/doc/LectureNotes/_build/jupyter_execute/week35.ipynb @@ -0,0 +1,6027 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "c02138a8", + "metadata": { + "editable": true + }, + "source": [ + "\n", + "" + ] + }, + { + "cell_type": "markdown", + "id": "919baf6d", + "metadata": { + "editable": true + }, + "source": [ + "# Week 35: From Ordinary Linear Regression to Ridge and Lasso Regression\n", + "**Morten Hjorth-Jensen**, Department of Physics, University of Oslo and Department of Physics and Astronomy and National Superconducting Cyclotron Laboratory, Michigan State University\n", + "\n", + "Date: **August 28-September 1**" + ] + }, + { + "cell_type": "markdown", + "id": "4d5e7179", + "metadata": { + "editable": true + }, + "source": [ + "## Plans for week 35\n", + "\n", + "The main topics are:\n", + "\n", + "1. Brief repetition from last week\n", + "\n", + "2. Derivation of the equations for ordinary least squares\n", + "\n", + "3. Discussion on how to prepare data and examples of applications of linear regression\n", + "\n", + "4. Material for the lecture on Thursday: Mathematical interpretations of linear regression\n", + "\n", + "5. Thursday: Ridge and Lasso regression and Singular Value Decomposition" + ] + }, + { + "cell_type": "markdown", + "id": "3b3f68ae", + "metadata": { + "editable": true + }, + "source": [ + "### Reading recommendations:\n", + "\n", + "1. See lecture notes for week 35 at \n", + "\n", + "2. Goodfellow, Bengio and Courville, Deep Learning, chapter 2 on linear algebra and sections 3.1-3.10 on elements of statistics\n", + "\n", + "3. Hastie, Tibshirani and Friedman, The elements of statistical learning, sections 3.1-3.4" + ] + }, + { + "cell_type": "markdown", + "id": "3dfade93", + "metadata": { + "editable": true + }, + "source": [ + "## Why Linear Regression (aka Ordinary Least Squares and family), repeat from last week\n", + "\n", + "We need first a reminder from last week about linear regression. \n", + "\n", + "Fitting a continuous function with linear parameterization in terms of the parameters $\\boldsymbol{\\beta}$.\n", + "* Method of choice for fitting a continuous function!\n", + "\n", + "* Gives an excellent introduction to central Machine Learning features with **understandable pedagogical** links to other methods like **Neural Networks**, **Support Vector Machines** etc\n", + "\n", + "* Analytical expression for the fitting parameters $\\boldsymbol{\\beta}$\n", + "\n", + "* Analytical expressions for statistical propertiers like mean values, variances, confidence intervals and more\n", + "\n", + "* Analytical relation with probabilistic interpretations \n", + "\n", + "* Easy to introduce basic concepts like bias-variance tradeoff, cross-validation, resampling and regularization techniques and many other ML topics\n", + "\n", + "* Easy to code! And links well with classification problems and logistic regression and neural networks\n", + "\n", + "* Allows for **easy** hands-on understanding of gradient descent methods\n", + "\n", + "* and many more features\n", + "\n", + "For more discussions of Ridge and Lasso regression, [Wessel van Wieringen's](https://arxiv.org/abs/1509.09169) article is highly recommended.\n", + "Similarly, [Mehta et al's article](https://arxiv.org/abs/1803.08823) is also recommended." + ] + }, + { + "cell_type": "markdown", + "id": "e7c3b1f5", + "metadata": { + "editable": true + }, + "source": [ + "## The equations for ordinary least squares\n", + "\n", + "Our data which we want to apply a machine learning method on, consist\n", + "of a set of inputs $\\boldsymbol{x}^T=[x_0,x_1,x_2,\\dots,x_{n-1}]$ and the\n", + "outputs we want to model $\\boldsymbol{y}^T=[y_0,y_1,y_2,\\dots,y_{n-1}]$.\n", + "We assume that the output data can be represented (for a regression case) by a continuous function $f$\n", + "through" + ] + }, + { + "cell_type": "markdown", + "id": "4b7ace0a", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "y_i=f(x_i)+\\epsilon_i,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "6fa41e5e", + "metadata": { + "editable": true + }, + "source": [ + "or in general" + ] + }, + { + "cell_type": "markdown", + "id": "86724624", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{y}=f(\\boldsymbol{x})+\\boldsymbol{\\epsilon},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "f4e16a64", + "metadata": { + "editable": true + }, + "source": [ + "where $\\boldsymbol{\\epsilon}$ represents some noise which is normally assumed to\n", + "be distributed via a normal probability distribution with zero mean\n", + "value and a variance $\\sigma^2$.\n", + "\n", + "In linear regression we approximate the unknown function with another\n", + "continuous function $\\tilde{\\boldsymbol{y}}(\\boldsymbol{x})$ which depends linearly on\n", + "some unknown parameters\n", + "$\\boldsymbol{\\beta}^T=[\\beta_0,\\beta_1,\\beta_2,\\dots,\\beta_{p-1}]$.\n", + "\n", + "Last week we introduced the so-called design matrix in order to define\n", + "the approximation $\\boldsymbol{\\tilde{y}}$ via the unknown quantity\n", + "$\\boldsymbol{\\beta}$ as" + ] + }, + { + "cell_type": "markdown", + "id": "00f70fc7", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{\\tilde{y}}= \\boldsymbol{X}\\boldsymbol{\\beta},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "859d4683", + "metadata": { + "editable": true + }, + "source": [ + "and in order to find the optimal parameters $\\beta_i$ we defined a function which\n", + "gives a measure of the spread between the values $y_i$ (which\n", + "represent the output values we want to reproduce) and the parametrized\n", + "values $\\tilde{y}_i$, namely the so-called cost/loss function." + ] + }, + { + "cell_type": "markdown", + "id": "ab473c08", + "metadata": { + "editable": true + }, + "source": [ + "## The cost/loss function\n", + "\n", + "We used the mean squared error to define the way we measure the quality of our model" + ] + }, + { + "cell_type": "markdown", + "id": "a3ccaf3a", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "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\\},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "238df8ba", + "metadata": { + "editable": true + }, + "source": [ + "or using the matrix $\\boldsymbol{X}$ and in a more compact matrix-vector notation as" + ] + }, + { + "cell_type": "markdown", + "id": "e114bb77", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "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\\}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "67833b96", + "metadata": { + "editable": true + }, + "source": [ + "This function represents one of many possible ways to define the so-called cost function.\n", + "\n", + "It is also common to define\n", + "the function $C$ as" + ] + }, + { + "cell_type": "markdown", + "id": "68d1debe", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "C(\\boldsymbol{\\beta})=\\frac{1}{2n}\\sum_{i=0}^{n-1}\\left(y_i-\\tilde{y}_i\\right)^2,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "bd4914a7", + "metadata": { + "editable": true + }, + "source": [ + "since when taking the first derivative with respect to the unknown parameters $\\beta$, the factor of $2$ cancels out." + ] + }, + { + "cell_type": "markdown", + "id": "9d6509bf", + "metadata": { + "editable": true + }, + "source": [ + "## Interpretations and optimizing our parameters\n", + "\n", + "The function" + ] + }, + { + "cell_type": "markdown", + "id": "fa97bb74", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "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\\},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "fdc65871", + "metadata": { + "editable": true + }, + "source": [ + "can be linked to the variance of the quantity $y_i$ if we interpret the latter as the mean value. \n", + "When linking (see the discussions next week) with the maximum likelihood approach below, we will indeed interpret $y_i$ as a mean value" + ] + }, + { + "cell_type": "markdown", + "id": "6fe43d59", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "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,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "7f0f5fc2", + "metadata": { + "editable": true + }, + "source": [ + "where $\\langle y_i \\rangle$ is the mean value. Keep in mind also that\n", + "till now we have treated $y_i$ as the exact value. Normally, the\n", + "response (dependent or outcome) variable $y_i$ is the outcome of a\n", + "numerical experiment or another type of experiment and could thus be treated itself as an\n", + "approximation to the true value. It is then always accompanied by an\n", + "error estimate, often limited to a statistical error estimate given by\n", + "the standard deviation discussed earlier. In the discussion here we\n", + "will treat $y_i$ as our exact value for the response variable.\n", + "\n", + "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" + ] + }, + { + "cell_type": "markdown", + "id": "8c7ce425", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "{\\displaystyle \\min_{\\boldsymbol{\\beta}\\in\n", + "{\\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\\}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "23cd06a6", + "metadata": { + "editable": true + }, + "source": [ + "In practical terms it means we will require" + ] + }, + { + "cell_type": "markdown", + "id": "d40244fa", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\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,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "003814bc", + "metadata": { + "editable": true + }, + "source": [ + "which results in" + ] + }, + { + "cell_type": "markdown", + "id": "765cdab4", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\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,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "c10530e6", + "metadata": { + "editable": true + }, + "source": [ + "or in a matrix-vector form as (multiplying away the factor $-2/n$, see derivation below)" + ] + }, + { + "cell_type": "markdown", + "id": "b1ce0925", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\frac{\\partial C(\\boldsymbol{\\beta})}{\\partial \\boldsymbol{\\beta}^T} = 0 = \\boldsymbol{X}^T\\left( \\boldsymbol{y}-\\boldsymbol{X}\\boldsymbol{\\beta}\\right).\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "18e850a5", + "metadata": { + "editable": true + }, + "source": [ + "## Interpretations and optimizing our parameters\n", + "We can rewrite, see the derivations below," + ] + }, + { + "cell_type": "markdown", + "id": "9fe90791", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\frac{\\partial C(\\boldsymbol{\\beta})}{\\partial \\boldsymbol{\\beta}^T} = 0 = \\boldsymbol{X}^T\\left( \\boldsymbol{y}-\\boldsymbol{X}\\boldsymbol{\\beta}\\right),\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "320e1aef", + "metadata": { + "editable": true + }, + "source": [ + "as" + ] + }, + { + "cell_type": "markdown", + "id": "b6ea67f8", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{X}^T\\boldsymbol{y} = \\boldsymbol{X}^T\\boldsymbol{X}\\boldsymbol{\\beta},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "f374c3b2", + "metadata": { + "editable": true + }, + "source": [ + "and if the matrix $\\boldsymbol{X}^T\\boldsymbol{X}$ is invertible we have the solution" + ] + }, + { + "cell_type": "markdown", + "id": "4a879ff3", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{\\beta} =\\left(\\boldsymbol{X}^T\\boldsymbol{X}\\right)^{-1}\\boldsymbol{X}^T\\boldsymbol{y}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "71ca39b0", + "metadata": { + "editable": true + }, + "source": [ + "We note also that since our design matrix is defined as $\\boldsymbol{X}\\in\n", + "{\\mathbb{R}}^{n\\times p}$, the product $\\boldsymbol{X}^T\\boldsymbol{X} \\in\n", + "{\\mathbb{R}}^{p\\times p}$. In the above case we have that $p \\ll n$,\n", + "in our case $p=5$ meaning that we end up with inverting a small\n", + "$5\\times 5$ matrix. This is a rather common situation, in many cases we end up with low-dimensional\n", + "matrices to invert. The methods discussed here and for many other\n", + "supervised learning algorithms like classification with logistic\n", + "regression or support vector machines, exhibit dimensionalities which\n", + "allow for the usage of direct linear algebra methods such as **LU** decomposition or **Singular Value Decomposition** (SVD) for finding the inverse of the matrix\n", + "$\\boldsymbol{X}^T\\boldsymbol{X}$.\n", + "\n", + "**Small question**: Do you think the example we have at hand here (the nuclear binding energies) can lead to problems in inverting the matrix $\\boldsymbol{X}^T\\boldsymbol{X}$? What kind of problems can we expect?" + ] + }, + { + "cell_type": "markdown", + "id": "0228f656", + "metadata": { + "editable": true + }, + "source": [ + "## Some useful matrix and vector expressions\n", + "\n", + "The following matrix and vector relation will be useful here and for\n", + "the rest of the course. Vectors are always written as boldfaced lower\n", + "case letters and matrices as upper case boldfaced letters. In the\n", + "following we will discuss how to calculate derivatives of various\n", + "matrices relevant for machine learning. We will often represent our\n", + "data in terms of matrices and vectors.\n", + "\n", + "Let us introduce first some conventions. We assume that $\\boldsymbol{y}$ is a\n", + "vector of length $m$, that is it has $m$ elements $y_0,y_1,\\dots,\n", + "y_{m-1}$. By convention we start labeling vectors with the zeroth\n", + "element, as are arrays in Python and C++/C, for example. Similarly, we\n", + "have a vector $\\boldsymbol{x}$ of length $n$, that is\n", + "$\\boldsymbol{x}^T=[x_0,x_1,\\dots, x_{n-1}]$.\n", + "\n", + "We assume also that $\\boldsymbol{y}$ is a function of $\\boldsymbol{x}$ through some\n", + "given function $f$" + ] + }, + { + "cell_type": "markdown", + "id": "1a6493a2", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{y}=f(\\boldsymbol{x}).\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "48e5ce45", + "metadata": { + "editable": true + }, + "source": [ + "## The Jacobian\n", + "\n", + "We define the partial derivatives of the various components of $\\boldsymbol{y}$ as functions of $x_i$ in terms of the so-called [Jacobian matrix](https://en.wikipedia.org/wiki/Jacobian_matrix_and_determinant)" + ] + }, + { + "cell_type": "markdown", + "id": "2025325b", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{J}=\\frac{\\partial \\boldsymbol{y}}{\\partial \\boldsymbol{x}}=\\begin{bmatrix} \\frac{\\partial y_0}{\\partial x_0} & \\frac{\\partial y_0}{\\partial x_1} & \\frac{\\partial y_0}{\\partial x_2} & \\dots & \\dots & \\frac{\\partial y_0}{\\partial x_{n-1}} \\\\ \\frac{\\partial y_0}{\\partial x_0} & \\frac{\\partial y_1}{\\partial x_1} & \\frac{\\partial y_1}{\\partial x_2} & \\dots & \\dots & \\frac{\\partial y_1}{\\partial x_{n-1}} \\\\\n", + "\\frac{\\partial y_2}{\\partial x_0} & \\frac{\\partial y_2}{\\partial x_1} & \\frac{\\partial y_2}{\\partial x_2} & \\dots & \\dots & \\frac{\\partial y_2}{\\partial x_{n-1}} \\\\\n", + "\\dots & \\dots & \\dots & \\dots & \\dots & \\dots \\\\\n", + "\\dots & \\dots & \\dots & \\dots & \\dots & \\dots \\\\\n", + "\\frac{\\partial y_{m-1}}{\\partial x_0} & \\frac{\\partial y_{m-1}}{\\partial x_1} & \\frac{\\partial y_{m-1}}{\\partial x_2} & \\dots & \\dots & \\frac{\\partial y_{m-1}}{\\partial x_{n-1}} \\end{bmatrix},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "c4c51c01", + "metadata": { + "editable": true + }, + "source": [ + "which is an $m\\times n$ matrix. If $\\boldsymbol{x}$ is a scalar, then the\n", + "Jacobian is only a single-column vector, or an $m\\times 1$ matrix. If\n", + "on the other hand $\\boldsymbol{y}$ is a scalar, the Jacobian becomes a\n", + "$1\\times n$ matrix.\n", + "\n", + "When this matrix is a square matrix $m=n$, its determinant is often referred to as the Jacobian\n", + "determinant. Both the matrix and (if $m=n$) the determinant are\n", + "often referred to simply as the Jacobian. The Jacobian matrix represents the differential of $\\boldsymbol{y}$ at every point where the\n", + "vector is differentiable." + ] + }, + { + "cell_type": "markdown", + "id": "5e0ba978", + "metadata": { + "editable": true + }, + "source": [ + "## Derivatives, example 1\n", + "\n", + "Let now $\\boldsymbol{y}=\\boldsymbol{A}\\boldsymbol{x}$, where $\\boldsymbol{A}$ is an $m\\times n$ matrix and the matrix does not depend on $\\boldsymbol{x}$. If we write out the vector $\\boldsymbol{y}$ compoment by component we have" + ] + }, + { + "cell_type": "markdown", + "id": "4fd652f8", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "y_i = \\sum_{j=0}^{n-1}a_{ij}x_j,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "694f5db3", + "metadata": { + "editable": true + }, + "source": [ + "with $\\forall i=0,1,2,\\dots,m-1$. The individual matrix elements of $\\boldsymbol{A}$ are given by the symbol $a_{ij}$.\n", + "It follows that the partial derivatives of $y_i$ with respect to $x_k$" + ] + }, + { + "cell_type": "markdown", + "id": "52a90b73", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\frac{\\partial y_i }{\\partial x_k}= a_{ik} \\forall i=0,1,2,\\dots,m-1.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "afab9d50", + "metadata": { + "editable": true + }, + "source": [ + "From this we have, using the definition of the Jacobian" + ] + }, + { + "cell_type": "markdown", + "id": "3dd5ebc2", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\frac{\\partial \\boldsymbol{y} }{\\partial \\boldsymbol{x}}= \\boldsymbol{A}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "d8571fd8", + "metadata": { + "editable": true + }, + "source": [ + "## Example 2\n", + "\n", + "We define a scalar (our cost/loss functions are in general also scalars,\n", + "just think of the mean squared error) as the result of some matrix vector\n", + "multiplications" + ] + }, + { + "cell_type": "markdown", + "id": "50f37b40", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\alpha = \\boldsymbol{y}^T\\boldsymbol{A}\\boldsymbol{x},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "b4e94db7", + "metadata": { + "editable": true + }, + "source": [ + "with $\\boldsymbol{y}$ a vector of length $m$, $\\boldsymbol{A}$ an $m\\times n$ matrix and $\\boldsymbol{x}$ a vector of length $n$. We assume also that $\\boldsymbol{A}$ does not depend on any of the two vectors.\n", + "In order to find the derivative of $\\alpha$ with respect to the two vectors, we define an intermediate vector $\\boldsymbol{z}$. We define first\n", + "$\\boldsymbol{z}^T=\\boldsymbol{y}^T\\boldsymbol{A}$, a vector of length $n$. We have then" + ] + }, + { + "cell_type": "markdown", + "id": "328ce3c0", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\alpha = \\boldsymbol{z}^T\\boldsymbol{x},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "3c549113", + "metadata": { + "editable": true + }, + "source": [ + "which means that (using our previous example) we have" + ] + }, + { + "cell_type": "markdown", + "id": "62a61819", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\frac{\\partial \\alpha}{\\partial \\boldsymbol{x}} = \\boldsymbol{z}^T=\\boldsymbol{y}^T\\boldsymbol{A}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "0d8917d2", + "metadata": { + "editable": true + }, + "source": [ + "Since $\\alpha$ is a scalar we have $\\alpha =\\alpha^T=\\boldsymbol{x}^T\\boldsymbol{A}^T\\boldsymbol{y}$. Defining now $\\boldsymbol{z}=\\boldsymbol{x}^T\\boldsymbol{A}^T$ we find that" + ] + }, + { + "cell_type": "markdown", + "id": "d27089b7", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\frac{\\partial \\alpha}{\\partial \\boldsymbol{y}} = \\boldsymbol{z}^T=\\boldsymbol{x}^T\\boldsymbol{A}^T.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "efbc5228", + "metadata": { + "editable": true + }, + "source": [ + "## Example 3\n", + "\n", + "We start with a new scalar but where now the vector $\\boldsymbol{y}$ is\n", + "replaced by a vector $\\boldsymbol{x}$ and the matrix $\\boldsymbol{A}$ is a square\n", + "matrix with dimension $n\\times n$." + ] + }, + { + "cell_type": "markdown", + "id": "1539dfd3", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\alpha = \\boldsymbol{x}^T\\boldsymbol{A}\\boldsymbol{x},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "56942822", + "metadata": { + "editable": true + }, + "source": [ + "with $\\boldsymbol{x}$ a vector of length $n$.\n", + "\n", + "We write out the specific sums involved in the calculation of $\\alpha$" + ] + }, + { + "cell_type": "markdown", + "id": "444a2229", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\alpha = \\sum_{i=0}^{n-1}\\sum_{j=0}^{n-1}x_i a_{ij}x_j,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "c19b8e9a", + "metadata": { + "editable": true + }, + "source": [ + "taking the derivative of $\\alpha$ with respect to a given component $x_k$ we get the two sums" + ] + }, + { + "cell_type": "markdown", + "id": "c3da7629", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\frac{\\partial \\alpha}{\\partial x_k} = \\sum_{i=0}^{n-1}a_{ik}x_i+\\sum_{j=0}^{n-1}a_{kj}x_j,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "bc0bb616", + "metadata": { + "editable": true + }, + "source": [ + "for $\\forall k =0,1,2,\\dots,n-1$. We identify these sums as" + ] + }, + { + "cell_type": "markdown", + "id": "81f469c7", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\frac{\\partial \\alpha}{\\partial \\boldsymbol{x}} = \\boldsymbol{x}^T\\left(\\boldsymbol{A}^T+\\boldsymbol{A}\\right).\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "e7dbc066", + "metadata": { + "editable": true + }, + "source": [ + "If the matrix $\\boldsymbol{A}$ is symmetric, that is $\\boldsymbol{A}=\\boldsymbol{A}^T$, we have" + ] + }, + { + "cell_type": "markdown", + "id": "e15843da", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\frac{\\partial \\alpha}{\\partial \\boldsymbol{x}} = 2\\boldsymbol{x}^T\\boldsymbol{A}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "31a95917", + "metadata": { + "editable": true + }, + "source": [ + "## Example 4\n", + "\n", + "We let the scalar $\\alpha$ be defined by" + ] + }, + { + "cell_type": "markdown", + "id": "a3c00979", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\alpha = \\boldsymbol{y}^T\\boldsymbol{x},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "03321be3", + "metadata": { + "editable": true + }, + "source": [ + "where both $\\boldsymbol{y}$ and $\\boldsymbol{x}$ have the same length $n$, or if we\n", + "wish to think of them as column vectors, they have dimensions $n\\times\n", + "1$. We assume that both $\\boldsymbol{y}$ and $\\boldsymbol{x}$ depend on a vector\n", + "$\\boldsymbol{z}$ of the same length. To calculate the derivative of $\\alpha$\n", + "with respect to a given component $z_k$ we need first to write out the\n", + "inner product that defines $\\alpha$ as" + ] + }, + { + "cell_type": "markdown", + "id": "59854eb8", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\alpha = \\sum_{i=0}^{n-1}y_ix_i,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "1f475d05", + "metadata": { + "editable": true + }, + "source": [ + "and the partial derivative" + ] + }, + { + "cell_type": "markdown", + "id": "256476a9", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\frac{\\partial \\alpha}{\\partial z_k} = \\sum_{i=0}^{n-1}\\left(x_i\\frac{\\partial y_i}{\\partial z_k}+y_i\\frac{\\partial x_i}{\\partial z_k}\\right),\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "f23c2136", + "metadata": { + "editable": true + }, + "source": [ + "for $\\forall k =0,1,2,\\dots,n-1$. We can rewrite the partial derivative in a more compact form as" + ] + }, + { + "cell_type": "markdown", + "id": "afeafdcb", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\frac{\\partial \\alpha}{\\partial \\boldsymbol{z}} = \\boldsymbol{x}^T\\frac{\\partial \\boldsymbol{y}}{\\partial \\boldsymbol{z}}+\\boldsymbol{y}^T\\frac{\\partial \\boldsymbol{x}}{\\partial \\boldsymbol{z}},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "4ed3eead", + "metadata": { + "editable": true + }, + "source": [ + "and if $\\boldsymbol{y}=\\boldsymbol{x}$ we have" + ] + }, + { + "cell_type": "markdown", + "id": "9674c619", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\frac{\\partial \\alpha}{\\partial \\boldsymbol{z}} = 2\\boldsymbol{x}^T\\frac{\\partial \\boldsymbol{x}}{\\partial \\boldsymbol{z}}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "82ae15ae", + "metadata": { + "editable": true + }, + "source": [ + "## The mean squared error and its derivative\n", + "\n", + "We defined earlier a possible cost function using the mean squared error" + ] + }, + { + "cell_type": "markdown", + "id": "688a7168", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "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\\},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "01f03acf", + "metadata": { + "editable": true + }, + "source": [ + "or using the design/feature matrix $\\boldsymbol{X}$ we have the more compact matrix-vector" + ] + }, + { + "cell_type": "markdown", + "id": "a30bd0f2", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "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\\}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "5593e084", + "metadata": { + "editable": true + }, + "source": [ + "We note that the design matrix $\\boldsymbol{X}$ does not depend on the unknown parameters defined by the vector $\\boldsymbol{\\beta}$.\n", + "We are now interested in minimizing the cost function with respect to the unknown parameters $\\boldsymbol{\\beta}$.\n", + "\n", + "The mean squared error is a scalar and if we use the results from the last example, we define a new vector" + ] + }, + { + "cell_type": "markdown", + "id": "0ecc87b7", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{w}=\\boldsymbol{y}-\\boldsymbol{X}\\boldsymbol{\\beta},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "d87cf1be", + "metadata": { + "editable": true + }, + "source": [ + "which depends on $\\boldsymbol{\\beta}$. We rewrite the cost function as" + ] + }, + { + "cell_type": "markdown", + "id": "c8ac2b85", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "C(\\boldsymbol{\\beta})=\\frac{1}{n}\\boldsymbol{w}^T\\boldsymbol{w},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "2a1896de", + "metadata": { + "editable": true + }, + "source": [ + "with partial derivative" + ] + }, + { + "cell_type": "markdown", + "id": "f07be920", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\frac{\\partial C(\\boldsymbol{\\beta})}{\\partial \\boldsymbol{\\beta}}=\\frac{2}{n}\\boldsymbol{w}^T\\frac{\\partial \\boldsymbol{w}}{\\partial \\boldsymbol{\\beta}},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "8351f7a8", + "metadata": { + "editable": true + }, + "source": [ + "and using that" + ] + }, + { + "cell_type": "markdown", + "id": "b321536f", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\frac{\\partial \\boldsymbol{w}}{\\partial \\boldsymbol{\\beta}}=-\\boldsymbol{X},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "7dea2f6e", + "metadata": { + "editable": true + }, + "source": [ + "where we used the result from example two above. Inserting the last expression we obtain" + ] + }, + { + "cell_type": "markdown", + "id": "fc8335b3", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\frac{\\partial C(\\boldsymbol{\\beta})}{\\partial \\boldsymbol{\\beta}}=-\\frac{2}{n}\\left(\\boldsymbol{y}-\\boldsymbol{X}\\boldsymbol{\\beta}\\right)^T\\boldsymbol{X},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "690c48cc", + "metadata": { + "editable": true + }, + "source": [ + "or as" + ] + }, + { + "cell_type": "markdown", + "id": "dbf4e99e", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\frac{\\partial C(\\boldsymbol{\\beta})}{\\partial \\boldsymbol{\\beta}^T}=-\\frac{2}{n}\\boldsymbol{X}^T\\left(\\boldsymbol{y}-\\boldsymbol{X}\\boldsymbol{\\beta}\\right).\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "20066c64", + "metadata": { + "editable": true + }, + "source": [ + "## Other useful relations\n", + "\n", + "We list here some other useful relations we may encounter (recall that vectors are defined by boldfaced low-key letters)" + ] + }, + { + "cell_type": "markdown", + "id": "512705d5", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\frac{\\partial (\\boldsymbol{b}^T\\boldsymbol{a})}{\\partial \\boldsymbol{a}} = \\boldsymbol{b},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "898589c9", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\frac{\\partial tr(\\boldsymbol{B}\\boldsymbol{A})}{\\partial \\boldsymbol{A}} = \\boldsymbol{B}^T,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "04fdb8da", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\frac{\\partial \\log{\\vert\\boldsymbol{A}\\vert}}{\\partial \\boldsymbol{A}} = (\\boldsymbol{A}^{-1})^T.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "fb0d6555", + "metadata": { + "editable": true + }, + "source": [ + "## Meet the Hessian Matrix\n", + "\n", + "A very important matrix we will meet again and again in machine\n", + "learning is the Hessian. It is given by the second derivative of the\n", + "cost function with respect to the parameters $\\boldsymbol{\\beta}$. Using the above\n", + "expression for derivatives of vectors and matrices, we find that the\n", + "second derivative of the mean squared error as cost function is," + ] + }, + { + "cell_type": "markdown", + "id": "61ca107d", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\frac{\\partial}{\\partial \\boldsymbol{\\beta}}\\frac{\\partial C(\\boldsymbol{\\beta})}{\\partial \\boldsymbol{\\beta}^T} =\\frac{\\partial}{\\partial \\boldsymbol{\\beta}}\\left[-\\frac{2}{n}\\boldsymbol{X}^T\\left( \\boldsymbol{y}-\\boldsymbol{X}\\boldsymbol{\\beta}\\right)\\right]=\\frac{2}{n}\\boldsymbol{X}^T\\boldsymbol{X}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "71be4e48", + "metadata": { + "editable": true + }, + "source": [ + "The Hessian matrix plays an important role and is defined here as" + ] + }, + { + "cell_type": "markdown", + "id": "9fc474c3", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{H}=\\boldsymbol{X}^T\\boldsymbol{X}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "23a27406", + "metadata": { + "editable": true + }, + "source": [ + "For ordinary least squares, it is inversely proportional (derivation\n", + "next week) with the variance of the optimal parameters\n", + "$\\hat{\\boldsymbol{\\beta}}$. Furthermore, we will see later this week that it is\n", + "(aside the factor $1/n$) equal to the covariance matrix. It plays also a very\n", + "important role in optmization algorithms and Principal Component\n", + "Analysis as a way to reduce the dimensionality of a machine learning/data analysis\n", + "problem.\n", + "\n", + "**Linear algebra question:** Can we use the Hessian matrix to say something about properties of the cost function (our optmization problem)? (hint: think about convex or concave problems and how to relate these to a matrix!)." + ] + }, + { + "cell_type": "markdown", + "id": "9aa37656", + "metadata": { + "editable": true + }, + "source": [ + "## Interpretations and optimizing our parameters\n", + "\n", + "The residuals $\\boldsymbol{\\epsilon}$ are in turn given by" + ] + }, + { + "cell_type": "markdown", + "id": "1458e79a", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{\\epsilon} = \\boldsymbol{y}-\\boldsymbol{\\tilde{y}} = \\boldsymbol{y}-\\boldsymbol{X}\\boldsymbol{\\beta},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "c3fcfcdf", + "metadata": { + "editable": true + }, + "source": [ + "and with" + ] + }, + { + "cell_type": "markdown", + "id": "9f169fad", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{X}^T\\left( \\boldsymbol{y}-\\boldsymbol{X}\\boldsymbol{\\beta}\\right)= 0,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "81e7723a", + "metadata": { + "editable": true + }, + "source": [ + "we have" + ] + }, + { + "cell_type": "markdown", + "id": "b2551cd1", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{X}^T\\boldsymbol{\\epsilon}=\\boldsymbol{X}^T\\left( \\boldsymbol{y}-\\boldsymbol{X}\\boldsymbol{\\beta}\\right)= 0,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "601003c8", + "metadata": { + "editable": true + }, + "source": [ + "meaning that the solution for $\\boldsymbol{\\beta}$ is the one which minimizes the residuals." + ] + }, + { + "cell_type": "markdown", + "id": "1f2fdfa6", + "metadata": { + "editable": true + }, + "source": [ + "## Example relevant for the exercises\n", + "\n", + "In order to understand the relation among the predictors $p$, the set of data $n$ and the target (outcome, output etc) $\\boldsymbol{y}$,\n", + "we condiser a simple polynomial fit.\n", + "We assume our data can represented by a fourth-order polynomial. For the $i$th component we have" + ] + }, + { + "cell_type": "markdown", + "id": "ea1518ad", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\tilde{y}_i = \\beta_0+\\beta_1x_i+\\beta_2x_i^2+\\beta_3x_i^3+\\beta_4x_i^4.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "758b843b", + "metadata": { + "editable": true + }, + "source": [ + "we have five predictors/features. The first is the intercept $\\beta_0$. The other terms are $\\beta_i$ with $i=1,2,3,4$. Furthermore we have $n$ entries for each predictor. It means that our design matrix is a \n", + "$p\\times n$ matrix $\\boldsymbol{X}$." + ] + }, + { + "cell_type": "markdown", + "id": "24715db8", + "metadata": { + "editable": true + }, + "source": [ + "## Own code for Ordinary Least Squares\n", + "\n", + "It is rather straightforward to implement the matrix inversion and obtain the parameters $\\boldsymbol{\\beta}$. After having defined the matrix $\\boldsymbol{X}$ and the outputs $\\boldsymbol{y}$ we have" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "id": "f8b57463", + "metadata": { + "collapsed": false, + "editable": true + }, + "outputs": [ + { + "ename": "NameError", + "evalue": "name 'np' is not defined", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)", + "Input \u001b[0;32mIn [1]\u001b[0m, in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[38;5;66;03m# matrix inversion to find beta\u001b[39;00m\n\u001b[0;32m----> 2\u001b[0m beta \u001b[38;5;241m=\u001b[39m (\u001b[43mnp\u001b[49m\u001b[38;5;241m.\u001b[39mlinalg\u001b[38;5;241m.\u001b[39minv(X\u001b[38;5;241m.\u001b[39mT \u001b[38;5;241m@\u001b[39m X) \u001b[38;5;241m@\u001b[39m X\u001b[38;5;241m.\u001b[39mT ) \u001b[38;5;241m@\u001b[39m y\n\u001b[1;32m 3\u001b[0m \u001b[38;5;66;03m# and then make the prediction\u001b[39;00m\n\u001b[1;32m 4\u001b[0m ytilde \u001b[38;5;241m=\u001b[39m X \u001b[38;5;241m@\u001b[39m beta\n", + "\u001b[0;31mNameError\u001b[0m: name 'np' is not defined" + ] + } + ], + "source": [ + "# matrix inversion to find beta\n", + "beta = (np.linalg.inv(X.T @ X) @ X.T ) @ y\n", + "# and then make the prediction\n", + "ytilde = X @ beta" + ] + }, + { + "cell_type": "markdown", + "id": "70c97572", + "metadata": { + "editable": true + }, + "source": [ + "Alternatively, you can use the least squares functionality in **Numpy** as" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "1aa95889", + "metadata": { + "collapsed": false, + "editable": true + }, + "outputs": [], + "source": [ + "fit = np.linalg.lstsq(X, Energies, rcond =None)[0]\n", + "ytildenp = np.dot(fit,X.T)" + ] + }, + { + "cell_type": "markdown", + "id": "e250b2e9", + "metadata": { + "editable": true + }, + "source": [ + "## Adding error analysis and training set up\n", + "\n", + "We can easily test our fit by computing the $R2$ score that we discussed in connection with the functionality of **Scikit-Learn** in the introductory slides.\n", + "Since we are not using **Scikit-Learn** here we can define our own $R2$ function as" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "id": "a86bd577", + "metadata": { + "collapsed": false, + "editable": true + }, + "outputs": [], + "source": [ + "def R2(y_data, y_model):\n", + " return 1 - np.sum((y_data - y_model) ** 2) / np.sum((y_data - np.mean(y_data)) ** 2)" + ] + }, + { + "cell_type": "markdown", + "id": "d6ccd7b8", + "metadata": { + "editable": true + }, + "source": [ + "and we would be using it as" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "id": "fb6f7c19", + "metadata": { + "collapsed": false, + "editable": true + }, + "outputs": [], + "source": [ + "print(R2(Energies,ytilde))" + ] + }, + { + "cell_type": "markdown", + "id": "eca18427", + "metadata": { + "editable": true + }, + "source": [ + "We can easily add our **MSE** score as" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "id": "0fd2b39c", + "metadata": { + "collapsed": false, + "editable": true + }, + "outputs": [], + "source": [ + "def MSE(y_data,y_model):\n", + " n = np.size(y_model)\n", + " return np.sum((y_data-y_model)**2)/n\n", + "\n", + "print(MSE(Energies,ytilde))" + ] + }, + { + "cell_type": "markdown", + "id": "db3fe7d9", + "metadata": { + "editable": true + }, + "source": [ + "and finally the relative error as" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "id": "9f59c14e", + "metadata": { + "collapsed": false, + "editable": true + }, + "outputs": [], + "source": [ + "def RelativeError(y_data,y_model):\n", + " return abs((y_data-y_model)/y_data)\n", + "print(RelativeError(Energies, ytilde))" + ] + }, + { + "cell_type": "markdown", + "id": "2fdd5915", + "metadata": { + "editable": true + }, + "source": [ + "## Splitting our Data in Training and Test data\n", + "\n", + "It is normal in essentially all Machine Learning studies to split the\n", + "data in a training set and a test set (sometimes also an additional\n", + "validation set). **Scikit-Learn** has an own function for this. There\n", + "is no explicit recipe for how much data should be included as training\n", + "data and say test data. An accepted rule of thumb is to use\n", + "approximately $2/3$ to $4/5$ of the data as training data. We will\n", + "postpone a discussion of this splitting to the end of these notes and\n", + "our discussion of the so-called **bias-variance** tradeoff. Here we\n", + "limit ourselves to repeat the above equation of state fitting example\n", + "but now splitting the data into a training set and a test set." + ] + }, + { + "cell_type": "markdown", + "id": "9863e063", + "metadata": { + "editable": true + }, + "source": [ + "## The complete code with a simple data set" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "id": "85fc6a78", + "metadata": { + "collapsed": false, + "editable": true + }, + "outputs": [], + "source": [ + "%matplotlib inline\n", + "\n", + "import os\n", + "import numpy as np\n", + "import pandas as pd\n", + "import matplotlib.pyplot as plt\n", + "from sklearn.model_selection import train_test_split\n", + "\n", + "\n", + "def R2(y_data, y_model):\n", + " return 1 - np.sum((y_data - y_model) ** 2) / np.sum((y_data - np.mean(y_data)) ** 2)\n", + "def MSE(y_data,y_model):\n", + " n = np.size(y_model)\n", + " return np.sum((y_data-y_model)**2)/n\n", + "\n", + "x = np.random.rand(100)\n", + "y = 2.0+5*x*x+0.1*np.random.randn(100)\n", + "\n", + "\n", + "# The design matrix now as function of a fourth-order polynomial\n", + "X = np.zeros((len(x),5))\n", + "X[:,0] = 1.0\n", + "X[:,1] = x\n", + "X[:,2] = x**2\n", + "X[:,3] = x**3\n", + "X[:,4] = x**4\n", + "# We split the data in test and training data\n", + "X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2)\n", + "# matrix inversion to find beta\n", + "beta = np.linalg.inv(X_train.T @ X_train) @ X_train.T @ y_train\n", + "print(beta)\n", + "# and then make the prediction\n", + "ytilde = X_train @ beta\n", + "print(\"Training R2\")\n", + "print(R2(y_train,ytilde))\n", + "print(\"Training MSE\")\n", + "print(MSE(y_train,ytilde))\n", + "ypredict = X_test @ beta\n", + "print(\"Test R2\")\n", + "print(R2(y_test,ypredict))\n", + "print(\"Test MSE\")\n", + "print(MSE(y_test,ypredict))" + ] + }, + { + "cell_type": "markdown", + "id": "6671297c", + "metadata": { + "editable": true + }, + "source": [ + "## Making your own test-train splitting" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "id": "810f32f7", + "metadata": { + "collapsed": false, + "editable": true + }, + "outputs": [], + "source": [ + "# equivalently in numpy\n", + "def train_test_split_numpy(inputs, labels, train_size, test_size):\n", + " n_inputs = len(inputs)\n", + " inputs_shuffled = inputs.copy()\n", + " labels_shuffled = labels.copy()\n", + "\n", + " np.random.shuffle(inputs_shuffled)\n", + " np.random.shuffle(labels_shuffled)\n", + "\n", + " train_end = int(n_inputs*train_size)\n", + " X_train, X_test = inputs_shuffled[:train_end], inputs_shuffled[train_end:]\n", + " Y_train, Y_test = labels_shuffled[:train_end], labels_shuffled[train_end:]\n", + "\n", + " return X_train, X_test, Y_train, Y_test" + ] + }, + { + "cell_type": "markdown", + "id": "1ca5e45d", + "metadata": { + "editable": true + }, + "source": [ + "But since **scikit-learn** has its own function for doing this and since\n", + "it interfaces easily with **tensorflow** and other libraries, we\n", + "normally recommend using the latter functionality." + ] + }, + { + "cell_type": "markdown", + "id": "b6530670", + "metadata": { + "editable": true + }, + "source": [ + "## Reducing the number of degrees of freedom, overarching view\n", + "\n", + "Many Machine Learning problems involve thousands or even millions of\n", + "features for each training instance. Not only does this make training\n", + "extremely slow, it can also make it much harder to find a good\n", + "solution, as we will see. This problem is often referred to as the\n", + "curse of dimensionality. Fortunately, in real-world problems, it is\n", + "often possible to reduce the number of features considerably, turning\n", + "an intractable problem into a tractable one.\n", + "\n", + "Later we will discuss some of the most popular dimensionality reduction\n", + "techniques: the principal component analysis (PCA), Kernel PCA, and\n", + "Locally Linear Embedding (LLE). \n", + "\n", + "Principal component analysis and its various variants deal with the\n", + "problem of fitting a low-dimensional [affine\n", + "subspace](https://en.wikipedia.org/wiki/Affine_space) to a set of of\n", + "data points in a high-dimensional space. With its family of methods it\n", + "is one of the most used tools in data modeling, compression and\n", + "visualization." + ] + }, + { + "cell_type": "markdown", + "id": "4be4158c", + "metadata": { + "editable": true + }, + "source": [ + "## Preprocessing our data\n", + "\n", + "Before we proceed however, we will discuss how to preprocess our\n", + "data. Till now and in connection with our previous examples we have\n", + "not met so many cases where we are too sensitive to the scaling of our\n", + "data. Normally the data may need a rescaling and/or may be sensitive\n", + "to extreme values. Scaling the data renders our inputs much more\n", + "suitable for the algorithms we want to employ.\n", + "\n", + "For data sets gathered for real world applications, it is rather normal that\n", + "different features have very different units and\n", + "numerical scales. For example, a data set detailing health habits may include\n", + "features such as **age** in the range $0-80$, and **caloric intake** of order $2000$.\n", + "Many machine learning methods sensitive to the scales of the features and may perform poorly if they\n", + "are very different scales. Therefore, it is typical to scale\n", + "the features in a way to avoid such outlier values." + ] + }, + { + "cell_type": "markdown", + "id": "aa6f9ff6", + "metadata": { + "editable": true + }, + "source": [ + "## Functionality in Scikit-Learn\n", + "\n", + "**Scikit-Learn** has several functions which allow us to rescale the\n", + "data, normally resulting in much better results in terms of various\n", + "accuracy scores. The **StandardScaler** function in **Scikit-Learn**\n", + "ensures that for each feature/predictor we study the mean value is\n", + "zero and the variance is one (every column in the design/feature\n", + "matrix). This scaling has the drawback that it does not ensure that\n", + "we have a particular maximum or minimum in our data set. Another\n", + "function included in **Scikit-Learn** is the **MinMaxScaler** which\n", + "ensures that all features are exactly between $0$ and $1$. The" + ] + }, + { + "cell_type": "markdown", + "id": "856dee18", + "metadata": { + "editable": true + }, + "source": [ + "## More preprocessing\n", + "\n", + "The **Normalizer** scales each data\n", + "point such that the feature vector has a euclidean length of one. In other words, it\n", + "projects a data point on the circle (or sphere in the case of higher dimensions) with a\n", + "radius of 1. This means every data point is scaled by a different number (by the\n", + "inverse of it’s length).\n", + "This normalization is often used when only the direction (or angle) of the data matters,\n", + "not the length of the feature vector.\n", + "\n", + "The **RobustScaler** works similarly to the StandardScaler in that it\n", + "ensures statistical properties for each feature that guarantee that\n", + "they are on the same scale. However, the RobustScaler uses the median\n", + "and quartiles, instead of mean and variance. This makes the\n", + "RobustScaler ignore data points that are very different from the rest\n", + "(like measurement errors). These odd data points are also called\n", + "outliers, and might often lead to trouble for other scaling\n", + "techniques." + ] + }, + { + "cell_type": "markdown", + "id": "3497598c", + "metadata": { + "editable": true + }, + "source": [ + "## Frequently used scaling functions\n", + "\n", + "Many features are often scaled using standardization to improve performance. In **Scikit-Learn** this is given by the **StandardScaler** function as discussed above. It is easy however to write your own. \n", + "Mathematically, this involves subtracting the mean and divide by the standard deviation over the data set, for each feature:" + ] + }, + { + "cell_type": "markdown", + "id": "fe24fd3f", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "x_j^{(i)} \\rightarrow \\frac{x_j^{(i)} - \\overline{x}_j}{\\sigma(x_j)},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "55bccc6e", + "metadata": { + "editable": true + }, + "source": [ + "where $\\overline{x}_j$ and $\\sigma(x_j)$ are the mean and standard deviation, respectively, of the feature $x_j$.\n", + "This ensures that each feature has zero mean and unit standard deviation. For data sets where we do not have the standard deviation or don't wish to calculate it, it is then common to simply set it to one." + ] + }, + { + "cell_type": "markdown", + "id": "e01c4d09", + "metadata": { + "editable": true + }, + "source": [ + "## Example of own Standard scaling\n", + "\n", + "Let us consider the following vanilla example where we use both\n", + "**Scikit-Learn** and write our own function as well. We produce a\n", + "simple test design matrix with random numbers. Each column could then\n", + "represent a specific feature whose mean value is subracted." + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "id": "6098d5d9", + "metadata": { + "collapsed": false, + "editable": true + }, + "outputs": [], + "source": [ + "import sklearn.linear_model as skl\n", + "from sklearn.metrics import mean_squared_error\n", + "from sklearn.model_selection import train_test_split\n", + "from sklearn.preprocessing import MinMaxScaler, StandardScaler, Normalizer\n", + "import numpy as np\n", + "import pandas as pd\n", + "from IPython.display import display\n", + "np.random.seed(100)\n", + "# setting up a 10 x 5 matrix\n", + "rows = 10\n", + "cols = 5\n", + "X = np.random.randn(rows,cols)\n", + "XPandas = pd.DataFrame(X)\n", + "display(XPandas)\n", + "print(XPandas.mean())\n", + "print(XPandas.std())\n", + "XPandas = (XPandas -XPandas.mean())\n", + "display(XPandas)\n", + "# This option does not include the standard deviation\n", + "scaler = StandardScaler(with_std=False)\n", + "scaler.fit(X)\n", + "Xscaled = scaler.transform(X)\n", + "display(XPandas-Xscaled)" + ] + }, + { + "cell_type": "markdown", + "id": "653340bf", + "metadata": { + "editable": true + }, + "source": [ + "Small exercise: perform the standard scaling by including the standard deviation and compare with what Scikit-Learn gives." + ] + }, + { + "cell_type": "markdown", + "id": "673c8917", + "metadata": { + "editable": true + }, + "source": [ + "## Min-Max Scaling\n", + "\n", + "Another commonly used scaling method is min-max scaling. This is very\n", + "useful for when we want the features to lie in a certain interval. To\n", + "scale the feature $x_j$ to the interval $[a, b]$, we can apply the\n", + "transformation" + ] + }, + { + "cell_type": "markdown", + "id": "4f69865b", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "x_j^{(i)} \\rightarrow (b-a)\\frac{x_j^{(i)} - \\min(x_j)}{\\max(x_j) - \\min(x_j)} - a\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "f39433a0", + "metadata": { + "editable": true + }, + "source": [ + "where $\\min(x_j)$ and $\\max(x_j)$ return the minimum and maximum value of $x_j$ over the data set, respectively." + ] + }, + { + "cell_type": "markdown", + "id": "f2f5cb76", + "metadata": { + "editable": true + }, + "source": [ + "## Testing the Means Squared Error as function of Complexity\n", + "\n", + "One of \n", + "the aims is to reproduce Figure 2.11 of [Hastie et al](https://github.com/CompPhysics/MLErasmus/blob/master/doc/Textbooks/elementsstat.pdf).\n", + "\n", + "Our data is defined by $x\\in [-3,3]$ with a total of for example $100$ data points." + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "id": "12dbcdcb", + "metadata": { + "collapsed": false, + "editable": true + }, + "outputs": [], + "source": [ + "np.random.seed()\n", + "n = 100\n", + "maxdegree = 14\n", + "# Make data set.\n", + "x = np.linspace(-3, 3, n).reshape(-1, 1)\n", + "y = np.exp(-x**2) + 1.5 * np.exp(-(x-2)**2)+ np.random.normal(0, 0.1, x.shape)" + ] + }, + { + "cell_type": "markdown", + "id": "38cb3698", + "metadata": { + "editable": true + }, + "source": [ + "where $y$ is the function we want to fit with a given polynomial.\n", + "\n", + "Write a first code which sets up a design matrix $X$ defined by a fourth-order polynomial. Scale your data and split it in training and test data." + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "id": "a0cd549b", + "metadata": { + "collapsed": false, + "editable": true + }, + "outputs": [], + "source": [ + "import matplotlib.pyplot as plt\n", + "import numpy as np\n", + "from sklearn.linear_model import LinearRegression\n", + "from sklearn.preprocessing import PolynomialFeatures\n", + "from sklearn.model_selection import train_test_split\n", + "from sklearn.pipeline import make_pipeline\n", + "\n", + "\n", + "np.random.seed(2018)\n", + "n = 50\n", + "maxdegree = 5\n", + "# Make data set.\n", + "x = np.linspace(-3, 3, n).reshape(-1, 1)\n", + "y = np.exp(-x**2) + 1.5 * np.exp(-(x-2)**2)+ np.random.normal(0, 0.1, x.shape)\n", + "TestError = np.zeros(maxdegree)\n", + "TrainError = np.zeros(maxdegree)\n", + "polydegree = np.zeros(maxdegree)\n", + "x_train, x_test, y_train, y_test = train_test_split(x, y, test_size=0.2)\n", + "scaler = StandardScaler()\n", + "scaler.fit(x_train)\n", + "x_train_scaled = scaler.transform(x_train)\n", + "x_test_scaled = scaler.transform(x_test)\n", + "\n", + "for degree in range(maxdegree):\n", + " model = make_pipeline(PolynomialFeatures(degree=degree), LinearRegression(fit_intercept=False))\n", + " clf = model.fit(x_train_scaled,y_train)\n", + " y_fit = clf.predict(x_train_scaled)\n", + " y_pred = clf.predict(x_test_scaled) \n", + " polydegree[degree] = degree\n", + " TestError[degree] = np.mean( np.mean((y_test - y_pred)**2) )\n", + " TrainError[degree] = np.mean( np.mean((y_train - y_fit)**2) )\n", + "\n", + "plt.plot(polydegree, TestError, label='Test Error')\n", + "plt.plot(polydegree, TrainError, label='Train Error')\n", + "plt.legend()\n", + "plt.show()" + ] + }, + { + "cell_type": "markdown", + "id": "b4d2ab87", + "metadata": { + "editable": true + }, + "source": [ + "## More preprocessing examples, two-dimensional example, the Franke function" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "id": "9f5d7996", + "metadata": { + "collapsed": false, + "editable": true + }, + "outputs": [], + "source": [ + "# Common imports\n", + "import os\n", + "import numpy as np\n", + "import pandas as pd\n", + "import matplotlib.pyplot as plt\n", + "import sklearn.linear_model as skl\n", + "from sklearn.metrics import mean_squared_error\n", + "from sklearn.model_selection import train_test_split\n", + "from sklearn.preprocessing import MinMaxScaler, StandardScaler, Normalizer\n", + "\n", + "# Where to save the figures and data files\n", + "PROJECT_ROOT_DIR = \"Results\"\n", + "FIGURE_ID = \"Results/FigureFiles\"\n", + "DATA_ID = \"DataFiles/\"\n", + "\n", + "if not os.path.exists(PROJECT_ROOT_DIR):\n", + " os.mkdir(PROJECT_ROOT_DIR)\n", + "\n", + "if not os.path.exists(FIGURE_ID):\n", + " os.makedirs(FIGURE_ID)\n", + "\n", + "if not os.path.exists(DATA_ID):\n", + " os.makedirs(DATA_ID)\n", + "\n", + "def image_path(fig_id):\n", + " return os.path.join(FIGURE_ID, fig_id)\n", + "\n", + "def data_path(dat_id):\n", + " return os.path.join(DATA_ID, dat_id)\n", + "\n", + "def save_fig(fig_id):\n", + " plt.savefig(image_path(fig_id) + \".png\", format='png')\n", + "\n", + "\n", + "def FrankeFunction(x,y):\n", + "\tterm1 = 0.75*np.exp(-(0.25*(9*x-2)**2) - 0.25*((9*y-2)**2))\n", + "\tterm2 = 0.75*np.exp(-((9*x+1)**2)/49.0 - 0.1*(9*y+1))\n", + "\tterm3 = 0.5*np.exp(-(9*x-7)**2/4.0 - 0.25*((9*y-3)**2))\n", + "\tterm4 = -0.2*np.exp(-(9*x-4)**2 - (9*y-7)**2)\n", + "\treturn term1 + term2 + term3 + term4\n", + "\n", + "\n", + "def create_X(x, y, n ):\n", + "\tif len(x.shape) > 1:\n", + "\t\tx = np.ravel(x)\n", + "\t\ty = np.ravel(y)\n", + "\n", + "\tN = len(x)\n", + "\tl = int((n+1)*(n+2)/2)\t\t# Number of elements in beta\n", + "\tX = np.ones((N,l))\n", + "\n", + "\tfor i in range(1,n+1):\n", + "\t\tq = int((i)*(i+1)/2)\n", + "\t\tfor k in range(i+1):\n", + "\t\t\tX[:,q+k] = (x**(i-k))*(y**k)\n", + "\n", + "\treturn X\n", + "\n", + "\n", + "# Making meshgrid of datapoints and compute Franke's function\n", + "n = 5\n", + "N = 1000\n", + "x = np.sort(np.random.uniform(0, 1, N))\n", + "y = np.sort(np.random.uniform(0, 1, N))\n", + "z = FrankeFunction(x, y)\n", + "X = create_X(x, y, n=n) \n", + "# split in training and test data\n", + "X_train, X_test, y_train, y_test = train_test_split(X,z,test_size=0.2)\n", + "\n", + "\n", + "clf = skl.LinearRegression().fit(X_train, y_train)\n", + "\n", + "# The mean squared error and R2 score\n", + "print(\"MSE before scaling: {:.2f}\".format(mean_squared_error(clf.predict(X_test), y_test)))\n", + "print(\"R2 score before scaling {:.2f}\".format(clf.score(X_test,y_test)))\n", + "\n", + "scaler = StandardScaler()\n", + "scaler.fit(X_train)\n", + "X_train_scaled = scaler.transform(X_train)\n", + "X_test_scaled = scaler.transform(X_test)\n", + "\n", + "print(\"Feature min values before scaling:\\n {}\".format(X_train.min(axis=0)))\n", + "print(\"Feature max values before scaling:\\n {}\".format(X_train.max(axis=0)))\n", + "\n", + "print(\"Feature min values after scaling:\\n {}\".format(X_train_scaled.min(axis=0)))\n", + "print(\"Feature max values after scaling:\\n {}\".format(X_train_scaled.max(axis=0)))\n", + "\n", + "clf = skl.LinearRegression().fit(X_train_scaled, y_train)\n", + "\n", + "\n", + "print(\"MSE after scaling: {:.2f}\".format(mean_squared_error(clf.predict(X_test_scaled), y_test)))\n", + "print(\"R2 score for scaled data: {:.2f}\".format(clf.score(X_test_scaled,y_test)))" + ] + }, + { + "cell_type": "markdown", + "id": "5ea41ab9", + "metadata": { + "editable": true + }, + "source": [ + "## To think about, first part\n", + "\n", + "When you are comparing your own code with for example **Scikit-Learn**'s\n", + "library, there are some technicalities to keep in mind. The examples\n", + "here demonstrate some of these aspects with potential pitfalls.\n", + "\n", + "The discussion here focuses on the role of the intercept, how we can\n", + "set up the design matrix, what scaling we should use and other topics\n", + "which tend confuse us.\n", + "\n", + "The intercept can be interpreted as the expected value of our\n", + "target/output variables when all other predictors are set to zero.\n", + "Thus, if we cannot assume that the expected outputs/targets are zero\n", + "when all predictors are zero (the columns in the design matrix), it\n", + "may be a bad idea to implement a model which penalizes the intercept.\n", + "Furthermore, in for example Ridge and Lasso regression (to be discussed in moe detail next week), the default solutions\n", + "from the library **Scikit-Learn** (when not shrinking $\\beta_0$) for the unknown parameters\n", + "$\\boldsymbol{\\beta}$, are derived under the assumption that both $\\boldsymbol{y}$ and\n", + "$\\boldsymbol{X}$ are zero centered, that is we subtract the mean values." + ] + }, + { + "cell_type": "markdown", + "id": "ce0afdb4", + "metadata": { + "editable": true + }, + "source": [ + "## More thinking\n", + "\n", + "If our predictors represent different scales, then it is important to\n", + "standardize the design matrix $\\boldsymbol{X}$ by subtracting the mean of each\n", + "column from the corresponding column and dividing the column with its\n", + "standard deviation. Most machine learning libraries do this as a default. This means that if you compare your code with the results from a given library,\n", + "the results may differ. \n", + "\n", + "The\n", + "[Standadscaler](https://scikit-learn.org/stable/modules/generated/sklearn.preprocessing.StandardScaler.html)\n", + "function in **Scikit-Learn** does this for us. For the data sets we\n", + "have been studying in our various examples, the data are in many cases\n", + "already scaled and there is no need to scale them. You as a user of different machine learning algorithms, should always perform a\n", + "survey of your data, with a critical assessment of them in case you need to scale the data.\n", + "\n", + "If you need to scale the data, not doing so will give an *unfair*\n", + "penalization of the parameters since their magnitude depends on the\n", + "scale of their corresponding predictor.\n", + "\n", + "Suppose as an example that you \n", + "you have an input variable given by the heights of different persons.\n", + "Human height might be measured in inches or meters or\n", + "kilometers. If measured in kilometers, a standard linear regression\n", + "model with this predictor would probably give a much bigger\n", + "coefficient term, than if measured in millimeters.\n", + "This can clearly lead to problems in evaluating the cost/loss functions." + ] + }, + { + "cell_type": "markdown", + "id": "ad92f42b", + "metadata": { + "editable": true + }, + "source": [ + "## Still thinking\n", + "\n", + "Keep in mind that when you transform your data set before training a model, the same transformation needs to be done\n", + "on your eventual new data set before making a prediction. If we translate this into a Python code, it would could be implemented as follows" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "id": "fae66265", + "metadata": { + "collapsed": false, + "editable": true + }, + "outputs": [], + "source": [ + "#Model training, we compute the mean value of y and X\n", + "y_train_mean = np.mean(y_train)\n", + "X_train_mean = np.mean(X_train,axis=0)\n", + "X_train = X_train - X_train_mean\n", + "y_train = y_train - y_train_mean\n", + "\n", + "# The we fit our model with the training data\n", + "trained_model = some_model.fit(X_train,y_train)\n", + "\n", + "\n", + "#Model prediction, we need also to transform our data set used for the prediction.\n", + "X_test = X_test - X_train_mean #Use mean from training data\n", + "y_pred = trained_model(X_test)\n", + "y_pred = y_pred + y_train_mean" + ] + }, + { + "cell_type": "markdown", + "id": "1bf672d8", + "metadata": { + "editable": true + }, + "source": [ + "## What does centering (subtracting the mean values) mean mathematically?\n", + "\n", + "Let us try to understand what this may imply mathematically when we\n", + "subtract the mean values, also known as *zero centering*. For\n", + "simplicity, we will focus on ordinary regression, as done in the above example.\n", + "\n", + "The cost/loss function for regression is" + ] + }, + { + "cell_type": "markdown", + "id": "30834557", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "C(\\beta_0, \\beta_1, ... , \\beta_{p-1}) = \\frac{1}{n}\\sum_{i=0}^{n} \\left(y_i - \\beta_0 - \\sum_{j=1}^{p-1} X_{ij}\\beta_j\\right)^2,.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "5c05a427", + "metadata": { + "editable": true + }, + "source": [ + "Recall also that we use the squared value since this leads to an increase of the penalty for higher differences between predicted and output/target values.\n", + "\n", + "What we have done is to single out the $\\beta_0$ term in the definition of the mean squared error (MSE).\n", + "The design matrix\n", + "$X$ does in this case not contain any intercept column.\n", + "When we take the derivative with respect to $\\beta_0$, we want the derivative to obey" + ] + }, + { + "cell_type": "markdown", + "id": "902391ce", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\frac{\\partial C}{\\partial \\beta_j} = 0,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "a68a6228", + "metadata": { + "editable": true + }, + "source": [ + "for all $j$. For $\\beta_0$ we have" + ] + }, + { + "cell_type": "markdown", + "id": "212cf295", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\frac{\\partial C}{\\partial \\beta_0} = -\\frac{2}{n}\\sum_{i=0}^{n-1} \\left(y_i - \\beta_0 - \\sum_{j=1}^{p-1} X_{ij} \\beta_j\\right).\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "e7db36e1", + "metadata": { + "editable": true + }, + "source": [ + "Multiplying away the constant $2/n$, we obtain" + ] + }, + { + "cell_type": "markdown", + "id": "5d7f590c", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\sum_{i=0}^{n-1} \\beta_0 = \\sum_{i=0}^{n-1}y_i - \\sum_{i=0}^{n-1} \\sum_{j=1}^{p-1} X_{ij} \\beta_j.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "bbf7c89a", + "metadata": { + "editable": true + }, + "source": [ + "## Further Manipulations\n", + "\n", + "Let us special first to the case where we have only two parameters $\\beta_0$ and $\\beta_1$.\n", + "Our result for $\\beta_0$ simplifies then to" + ] + }, + { + "cell_type": "markdown", + "id": "05692612", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "n\\beta_0 = \\sum_{i=0}^{n-1}y_i - \\sum_{i=0}^{n-1} X_{i1} \\beta_1.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "3dc53330", + "metadata": { + "editable": true + }, + "source": [ + "We obtain then" + ] + }, + { + "cell_type": "markdown", + "id": "562d655d", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\beta_0 = \\frac{1}{n}\\sum_{i=0}^{n-1}y_i - \\beta_1\\frac{1}{n}\\sum_{i=0}^{n-1} X_{i1}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "528c869d", + "metadata": { + "editable": true + }, + "source": [ + "If we define" + ] + }, + { + "cell_type": "markdown", + "id": "82a20d9e", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\mu_1=\\frac{1}{n}\\sum_{i=0}^{n-1} (X_{i1},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "5e37316e", + "metadata": { + "editable": true + }, + "source": [ + "and if we define the mean value of the outputs as" + ] + }, + { + "cell_type": "markdown", + "id": "90c44e36", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\mu_y=\\frac{1}{n}\\sum_{i=0}^{n-1}y_i,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "be72a7d3", + "metadata": { + "editable": true + }, + "source": [ + "we have" + ] + }, + { + "cell_type": "markdown", + "id": "0a435bf5", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\beta_0 = \\mu_y - \\beta_1\\mu_{1}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "a67864cb", + "metadata": { + "editable": true + }, + "source": [ + "In the general case, that is we have more parameters than $\\beta_0$ and $\\beta_1$, we have" + ] + }, + { + "cell_type": "markdown", + "id": "9d8602b7", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\beta_0 = \\frac{1}{n}\\sum_{i=0}^{n-1}y_i - \\frac{1}{n}\\sum_{i=0}^{n-1}\\sum_{j=1}^{p-1} X_{ij}\\beta_j.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "32caef0d", + "metadata": { + "editable": true + }, + "source": [ + "Replacing $y_i$ with $y_i - y_i - \\overline{\\boldsymbol{y}}$ and centering also our design matrix results in a cost function (in vector-matrix disguise)" + ] + }, + { + "cell_type": "markdown", + "id": "f24465a9", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "C(\\boldsymbol{\\beta}) = (\\boldsymbol{\\tilde{y}} - \\tilde{X}\\boldsymbol{\\beta})^T(\\boldsymbol{\\tilde{y}} - \\tilde{X}\\boldsymbol{\\beta}).\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "f64212da", + "metadata": { + "editable": true + }, + "source": [ + "## Wrapping it up\n", + "\n", + "If we minimize with respect to $\\boldsymbol{\\beta}$ we have then" + ] + }, + { + "cell_type": "markdown", + "id": "8d0bf5ae", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\hat{\\boldsymbol{\\beta}} = (\\tilde{X}^T\\tilde{X})^{-1}\\tilde{X}^T\\boldsymbol{\\tilde{y}},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "e8d36ff8", + "metadata": { + "editable": true + }, + "source": [ + "where $\\boldsymbol{\\tilde{y}} = \\boldsymbol{y} - \\overline{\\boldsymbol{y}}$\n", + "and $\\tilde{X}_{ij} = X_{ij} - \\frac{1}{n}\\sum_{k=0}^{n-1}X_{kj}$.\n", + "\n", + "For Ridge regression we need to add $\\lambda \\boldsymbol{\\beta}^T\\boldsymbol{\\beta}$ to the cost function and get then" + ] + }, + { + "cell_type": "markdown", + "id": "aea58aac", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\hat{\\boldsymbol{\\beta}} = (\\tilde{X}^T\\tilde{X} + \\lambda I)^{-1}\\tilde{X}^T\\boldsymbol{\\tilde{y}}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "bc4b6f91", + "metadata": { + "editable": true + }, + "source": [ + "What does this mean? And why do we insist on all this? Let us look at some examples." + ] + }, + { + "cell_type": "markdown", + "id": "349b03e2", + "metadata": { + "editable": true + }, + "source": [ + "## Linear Regression code, Intercept handling first\n", + "\n", + "This code shows a simple first-order fit to a data set using the above transformed data, where we consider the role of the intercept first, by either excluding it or including it (*code example thanks to Øyvind Sigmundson Schøyen*). Here our scaling of the data is done by subtracting the mean values only.\n", + "Note also that we do not split the data into training and test." + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "id": "5cfc62db", + "metadata": { + "collapsed": false, + "editable": true + }, + "outputs": [], + "source": [ + "import numpy as np\n", + "import matplotlib.pyplot as plt\n", + "\n", + "from sklearn.linear_model import LinearRegression\n", + "\n", + "\n", + "np.random.seed(2021)\n", + "\n", + "def MSE(y_data,y_model):\n", + " n = np.size(y_model)\n", + " return np.sum((y_data-y_model)**2)/n\n", + "\n", + "\n", + "def fit_beta(X, y):\n", + " return np.linalg.pinv(X.T @ X) @ X.T @ y\n", + "\n", + "\n", + "true_beta = [2, 0.5, 3.7]\n", + "\n", + "x = np.linspace(0, 1, 11)\n", + "y = np.sum(\n", + " np.asarray([x ** p * b for p, b in enumerate(true_beta)]), axis=0\n", + ") + 0.1 * np.random.normal(size=len(x))\n", + "\n", + "degree = 3\n", + "X = np.zeros((len(x), degree))\n", + "\n", + "# Include the intercept in the design matrix\n", + "for p in range(degree):\n", + " X[:, p] = x ** p\n", + "\n", + "beta = fit_beta(X, y)\n", + "\n", + "# Intercept is included in the design matrix\n", + "skl = LinearRegression(fit_intercept=False).fit(X, y)\n", + "\n", + "print(f\"True beta: {true_beta}\")\n", + "print(f\"Fitted beta: {beta}\")\n", + "print(f\"Sklearn fitted beta: {skl.coef_}\")\n", + "ypredictOwn = X @ beta\n", + "ypredictSKL = skl.predict(X)\n", + "print(f\"MSE with intercept column\")\n", + "print(MSE(y,ypredictOwn))\n", + "print(f\"MSE with intercept column from SKL\")\n", + "print(MSE(y,ypredictSKL))\n", + "\n", + "\n", + "plt.figure()\n", + "plt.scatter(x, y, label=\"Data\")\n", + "plt.plot(x, X @ beta, label=\"Fit\")\n", + "plt.plot(x, skl.predict(X), label=\"Sklearn (fit_intercept=False)\")\n", + "\n", + "\n", + "# Do not include the intercept in the design matrix\n", + "X = np.zeros((len(x), degree - 1))\n", + "\n", + "for p in range(degree - 1):\n", + " X[:, p] = x ** (p + 1)\n", + "\n", + "# Intercept is not included in the design matrix\n", + "skl = LinearRegression(fit_intercept=True).fit(X, y)\n", + "\n", + "# Use centered values for X and y when computing coefficients\n", + "y_offset = np.average(y, axis=0)\n", + "X_offset = np.average(X, axis=0)\n", + "\n", + "beta = fit_beta(X - X_offset, y - y_offset)\n", + "intercept = np.mean(y_offset - X_offset @ beta)\n", + "\n", + "print(f\"Manual intercept: {intercept}\")\n", + "print(f\"Fitted beta (wiothout intercept): {beta}\")\n", + "print(f\"Sklearn intercept: {skl.intercept_}\")\n", + "print(f\"Sklearn fitted beta (without intercept): {skl.coef_}\")\n", + "ypredictOwn = X @ beta\n", + "ypredictSKL = skl.predict(X)\n", + "print(f\"MSE with Manual intercept\")\n", + "print(MSE(y,ypredictOwn+intercept))\n", + "print(f\"MSE with Sklearn intercept\")\n", + "print(MSE(y,ypredictSKL))\n", + "\n", + "plt.plot(x, X @ beta + intercept, \"--\", label=\"Fit (manual intercept)\")\n", + "plt.plot(x, skl.predict(X), \"--\", label=\"Sklearn (fit_intercept=True)\")\n", + "plt.grid()\n", + "plt.legend()\n", + "\n", + "plt.show()" + ] + }, + { + "cell_type": "markdown", + "id": "64c5fa5b", + "metadata": { + "editable": true + }, + "source": [ + "The intercept is the value of our output/target variable\n", + "when all our features are zero and our function crosses the $y$-axis (for a one-dimensional case). \n", + "\n", + "Printing the MSE, we see first that both methods give the same MSE, as\n", + "they should. However, when we move to for example Ridge regression (discussed next week),\n", + "the way we treat the intercept may give a larger or smaller MSE,\n", + "meaning that the MSE can be penalized by the value of the\n", + "intercept. Not including the intercept in the fit, means that the\n", + "regularization term does not include $\\beta_0$. For different values\n", + "of $\\lambda$, this may lead to differing MSE values. \n", + "\n", + "To remind the reader, the regularization term, with the intercept in Ridge regression is given by" + ] + }, + { + "cell_type": "markdown", + "id": "67496f35", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\lambda \\vert\\vert \\boldsymbol{\\beta} \\vert\\vert_2^2 = \\lambda \\sum_{j=0}^{p-1}\\beta_j^2,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "ceae31e0", + "metadata": { + "editable": true + }, + "source": [ + "but when we take out the intercept, this equation becomes" + ] + }, + { + "cell_type": "markdown", + "id": "743c68c8", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\lambda \\vert\\vert \\boldsymbol{\\beta} \\vert\\vert_2^2 = \\lambda \\sum_{j=1}^{p-1}\\beta_j^2.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "4af68378", + "metadata": { + "editable": true + }, + "source": [ + "For Lasso regression we have" + ] + }, + { + "cell_type": "markdown", + "id": "8228af90", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\lambda \\vert\\vert \\boldsymbol{\\beta} \\vert\\vert_1 = \\lambda \\sum_{j=1}^{p-1}\\vert\\beta_j\\vert.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "0a4285bc", + "metadata": { + "editable": true + }, + "source": [ + "It means that, when scaling the design matrix and the outputs/targets,\n", + "by subtracting the mean values, we have an optimization problem which\n", + "is not penalized by the intercept. The MSE value can then be smaller\n", + "since it focuses only on the remaining quantities. If we however bring\n", + "back the intercept, we will get an MSE which then contains the\n", + "intercept. This becomes more important when we discuss Ridge and Lasso\n", + "regression next week." + ] + }, + { + "cell_type": "markdown", + "id": "406af60a", + "metadata": { + "editable": true + }, + "source": [ + "## The Boston housing data example\n", + "\n", + "The Boston housing \n", + "data set was originally a part of UCI Machine Learning Repository\n", + "and has been removed now. The data set is now included in **Scikit-Learn**'s \n", + "library. There are 506 samples and 13 feature (predictor) variables\n", + "in this data set. The objective is to predict the value of prices of\n", + "the house using the features (predictors) listed here.\n", + "\n", + "The features/predictors are\n", + "1. CRIM: Per capita crime rate by town\n", + "\n", + "2. ZN: Proportion of residential land zoned for lots over 25000 square feet\n", + "\n", + "3. INDUS: Proportion of non-retail business acres per town\n", + "\n", + "4. CHAS: Charles River dummy variable (= 1 if tract bounds river; 0 otherwise)\n", + "\n", + "5. NOX: Nitric oxide concentration (parts per 10 million)\n", + "\n", + "6. RM: Average number of rooms per dwelling\n", + "\n", + "7. AGE: Proportion of owner-occupied units built prior to 1940\n", + "\n", + "8. DIS: Weighted distances to five Boston employment centers\n", + "\n", + "9. RAD: Index of accessibility to radial highways\n", + "\n", + "10. TAX: Full-value property tax rate per USD10000\n", + "\n", + "11. B: $1000(Bk - 0.63)^2$, where $Bk$ is the proportion of [people of African American descent] by town\n", + "\n", + "12. LSTAT: Percentage of lower status of the population\n", + "\n", + "13. MEDV: Median value of owner-occupied homes in USD 1000s" + ] + }, + { + "cell_type": "markdown", + "id": "0f05d1e1", + "metadata": { + "editable": true + }, + "source": [ + "## Housing data, the code\n", + "We start by importing the libraries" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "id": "70f8a406", + "metadata": { + "collapsed": false, + "editable": true + }, + "outputs": [], + "source": [ + "import numpy as np\n", + "import matplotlib.pyplot as plt \n", + "\n", + "import pandas as pd \n", + "import seaborn as sns" + ] + }, + { + "cell_type": "markdown", + "id": "10a6162c", + "metadata": { + "editable": true + }, + "source": [ + "and load the Boston Housing DataSet from **Scikit-Learn**" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "id": "be236243", + "metadata": { + "collapsed": false, + "editable": true + }, + "outputs": [], + "source": [ + "from sklearn.datasets import load_boston\n", + "\n", + "boston_dataset = load_boston()\n", + "\n", + "# boston_dataset is a dictionary\n", + "# let's check what it contains\n", + "boston_dataset.keys()" + ] + }, + { + "cell_type": "markdown", + "id": "88a7376f", + "metadata": { + "editable": true + }, + "source": [ + "Then we invoke Pandas" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "id": "ec268779", + "metadata": { + "collapsed": false, + "editable": true + }, + "outputs": [], + "source": [ + "boston = pd.DataFrame(boston_dataset.data, columns=boston_dataset.feature_names)\n", + "boston.head()\n", + "boston['MEDV'] = boston_dataset.target" + ] + }, + { + "cell_type": "markdown", + "id": "b45f3733", + "metadata": { + "editable": true + }, + "source": [ + "and preprocess the data" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "id": "8b9423c6", + "metadata": { + "collapsed": false, + "editable": true + }, + "outputs": [], + "source": [ + "# check for missing values in all the columns\n", + "boston.isnull().sum()" + ] + }, + { + "cell_type": "markdown", + "id": "1061cb1f", + "metadata": { + "editable": true + }, + "source": [ + "We can then visualize the data" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "id": "00d79fad", + "metadata": { + "collapsed": false, + "editable": true + }, + "outputs": [], + "source": [ + "# set the size of the figure\n", + "sns.set(rc={'figure.figsize':(11.7,8.27)})\n", + "\n", + "# plot a histogram showing the distribution of the target values\n", + "sns.distplot(boston['MEDV'], bins=30)\n", + "plt.show()" + ] + }, + { + "cell_type": "markdown", + "id": "18871b23", + "metadata": { + "editable": true + }, + "source": [ + "It is now useful to look at the correlation matrix" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "id": "abfd55f9", + "metadata": { + "collapsed": false, + "editable": true + }, + "outputs": [], + "source": [ + "# compute the pair wise correlation for all columns \n", + "correlation_matrix = boston.corr().round(2)\n", + "# use the heatmap function from seaborn to plot the correlation matrix\n", + "# annot = True to print the values inside the square\n", + "sns.heatmap(data=correlation_matrix, annot=True)" + ] + }, + { + "cell_type": "markdown", + "id": "231f35c5", + "metadata": { + "editable": true + }, + "source": [ + "From the above coorelation plot we can see that **MEDV** is strongly correlated to **LSTAT** and **RM**. We see also that **RAD** and **TAX** are stronly correlated, but we don't include this in our features together to avoid multi-colinearity" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "id": "5bb68d00", + "metadata": { + "collapsed": false, + "editable": true + }, + "outputs": [], + "source": [ + "plt.figure(figsize=(20, 5))\n", + "\n", + "features = ['LSTAT', 'RM']\n", + "target = boston['MEDV']\n", + "\n", + "for i, col in enumerate(features):\n", + " plt.subplot(1, len(features) , i+1)\n", + " x = boston[col]\n", + " y = target\n", + " plt.scatter(x, y, marker='o')\n", + " plt.title(col)\n", + " plt.xlabel(col)\n", + " plt.ylabel('MEDV')" + ] + }, + { + "cell_type": "markdown", + "id": "9c2f9f6b", + "metadata": { + "editable": true + }, + "source": [ + "Now we start training our model" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "id": "df3cc855", + "metadata": { + "collapsed": false, + "editable": true + }, + "outputs": [], + "source": [ + "X = pd.DataFrame(np.c_[boston['LSTAT'], boston['RM']], columns = ['LSTAT','RM'])\n", + "Y = boston['MEDV']" + ] + }, + { + "cell_type": "markdown", + "id": "da67457b", + "metadata": { + "editable": true + }, + "source": [ + "We split the data into training and test sets" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "id": "f9784866", + "metadata": { + "collapsed": false, + "editable": true + }, + "outputs": [], + "source": [ + "from sklearn.model_selection import train_test_split\n", + "\n", + "# splits the training and test data set in 80% : 20%\n", + "# assign random_state to any value.This ensures consistency.\n", + "X_train, X_test, Y_train, Y_test = train_test_split(X, Y, test_size = 0.2, random_state=5)\n", + "print(X_train.shape)\n", + "print(X_test.shape)\n", + "print(Y_train.shape)\n", + "print(Y_test.shape)" + ] + }, + { + "cell_type": "markdown", + "id": "3429e67f", + "metadata": { + "editable": true + }, + "source": [ + "Then we use the linear regression functionality from **Scikit-Learn**" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "id": "9ec7ba47", + "metadata": { + "collapsed": false, + "editable": true + }, + "outputs": [], + "source": [ + "from sklearn.linear_model import LinearRegression\n", + "from sklearn.metrics import mean_squared_error, r2_score\n", + "\n", + "lin_model = LinearRegression()\n", + "lin_model.fit(X_train, Y_train)\n", + "\n", + "# model evaluation for training set\n", + "\n", + "y_train_predict = lin_model.predict(X_train)\n", + "rmse = (np.sqrt(mean_squared_error(Y_train, y_train_predict)))\n", + "r2 = r2_score(Y_train, y_train_predict)\n", + "\n", + "print(\"The model performance for training set\")\n", + "print(\"--------------------------------------\")\n", + "print('RMSE is {}'.format(rmse))\n", + "print('R2 score is {}'.format(r2))\n", + "print(\"\\n\")\n", + "\n", + "# model evaluation for testing set\n", + "\n", + "y_test_predict = lin_model.predict(X_test)\n", + "# root mean square error of the model\n", + "rmse = (np.sqrt(mean_squared_error(Y_test, y_test_predict)))\n", + "\n", + "# r-squared score of the model\n", + "r2 = r2_score(Y_test, y_test_predict)\n", + "\n", + "print(\"The model performance for testing set\")\n", + "print(\"--------------------------------------\")\n", + "print('RMSE is {}'.format(rmse))\n", + "print('R2 score is {}'.format(r2))" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "id": "0c0be681", + "metadata": { + "collapsed": false, + "editable": true + }, + "outputs": [], + "source": [ + "# plotting the y_test vs y_pred\n", + "# ideally should have been a straight line\n", + "plt.scatter(Y_test, y_test_predict)\n", + "plt.show()" + ] + }, + { + "cell_type": "markdown", + "id": "ed12f12d", + "metadata": { + "editable": true + }, + "source": [ + "## Material for lecture Thursday, August 31" + ] + }, + { + "cell_type": "markdown", + "id": "50c91ade", + "metadata": { + "editable": true + }, + "source": [ + "## Mathematical Interpretation of Ordinary Least Squares\n", + "\n", + "What is presented here is a mathematical analysis of various regression algorithms (ordinary least squares, Ridge and Lasso Regression). The analysis is based on an important algorithm in linear algebra, the so-called Singular Value Decomposition (SVD). \n", + "\n", + "We have shown that in ordinary least squares the optimal parameters $\\beta$ are given by" + ] + }, + { + "cell_type": "markdown", + "id": "682a501b", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\hat{\\boldsymbol{\\beta}} = \\left(\\boldsymbol{X}^T\\boldsymbol{X}\\right)^{-1}\\boldsymbol{X}^T\\boldsymbol{y}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "057bbc5d", + "metadata": { + "editable": true + }, + "source": [ + "The **hat** over $\\boldsymbol{\\beta}$ means we have the optimal parameters after minimization of the cost function.\n", + "\n", + "This means that our best model is defined as" + ] + }, + { + "cell_type": "markdown", + "id": "cddb899f", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\tilde{\\boldsymbol{y}}=\\boldsymbol{X}\\hat{\\boldsymbol{\\beta}} = \\boldsymbol{X}\\left(\\boldsymbol{X}^T\\boldsymbol{X}\\right)^{-1}\\boldsymbol{X}^T\\boldsymbol{y}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "ab325ebc", + "metadata": { + "editable": true + }, + "source": [ + "We now define a matrix" + ] + }, + { + "cell_type": "markdown", + "id": "095ebc5b", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{A}=\\boldsymbol{X}\\left(\\boldsymbol{X}^T\\boldsymbol{X}\\right)^{-1}\\boldsymbol{X}^T.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "08e642f6", + "metadata": { + "editable": true + }, + "source": [ + "We can rewrite" + ] + }, + { + "cell_type": "markdown", + "id": "da5c1625", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\tilde{\\boldsymbol{y}}=\\boldsymbol{X}\\hat{\\boldsymbol{\\beta}} = \\boldsymbol{A}\\boldsymbol{y}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "2bf04890", + "metadata": { + "editable": true + }, + "source": [ + "The matrix $\\boldsymbol{A}$ has the important property that $\\boldsymbol{A}^2=\\boldsymbol{A}$. This is the definition of a projection matrix.\n", + "We can then interpret our optimal model $\\tilde{\\boldsymbol{y}}$ as being represented by an orthogonal projection of $\\boldsymbol{y}$ onto a space defined by the column vectors of $\\boldsymbol{X}$. In our case here the matrix $\\boldsymbol{A}$ is a square matrix. If it is a general rectangular matrix we have an oblique projection matrix." + ] + }, + { + "cell_type": "markdown", + "id": "5ba172cc", + "metadata": { + "editable": true + }, + "source": [ + "## Residual Error\n", + "\n", + "We have defined the residual error as" + ] + }, + { + "cell_type": "markdown", + "id": "7d1f0b59", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{\\epsilon}=\\boldsymbol{y}-\\tilde{\\boldsymbol{y}}=\\left[\\boldsymbol{I}-\\boldsymbol{X}\\left(\\boldsymbol{X}^T\\boldsymbol{X}\\right)^{-1}\\boldsymbol{X}^T\\right]\\boldsymbol{y}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "467e185d", + "metadata": { + "editable": true + }, + "source": [ + "The residual errors are then the projections of $\\boldsymbol{y}$ onto the orthogonal component of the space defined by the column vectors of $\\boldsymbol{X}$." + ] + }, + { + "cell_type": "markdown", + "id": "74822363", + "metadata": { + "editable": true + }, + "source": [ + "## Simple case\n", + "\n", + "If the matrix $\\boldsymbol{X}$ is an orthogonal (or unitary in case of complex values) matrix, we have" + ] + }, + { + "cell_type": "markdown", + "id": "5414a1d2", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{X}^T\\boldsymbol{X}=\\boldsymbol{X}\\boldsymbol{X}^T = \\boldsymbol{I}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "08ce1402", + "metadata": { + "editable": true + }, + "source": [ + "In this case the matrix $\\boldsymbol{A}$ becomes" + ] + }, + { + "cell_type": "markdown", + "id": "7bbb949f", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{A}=\\boldsymbol{X}\\left(\\boldsymbol{X}^T\\boldsymbol{X}\\right)^{-1}\\boldsymbol{X}^T)=\\boldsymbol{I},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "4007519d", + "metadata": { + "editable": true + }, + "source": [ + "and we have the obvious case" + ] + }, + { + "cell_type": "markdown", + "id": "45061e33", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{\\epsilon}=\\boldsymbol{y}-\\tilde{\\boldsymbol{y}}=0.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "f5afee48", + "metadata": { + "editable": true + }, + "source": [ + "This serves also as a useful test of our codes." + ] + }, + { + "cell_type": "markdown", + "id": "6a3d6440", + "metadata": { + "editable": true + }, + "source": [ + "## The singular value decomposition\n", + "\n", + "The examples we have looked at so far are cases where we normally can\n", + "invert the matrix $\\boldsymbol{X}^T\\boldsymbol{X}$. Using a polynomial expansion where we fit of various functions leads to\n", + "row vectors of the design matrix which are essentially orthogonal due\n", + "to the polynomial character of our model. Obtaining the inverse of the\n", + "design matrix is then often done via a so-called LU, QR or Cholesky\n", + "decomposition.\n", + "\n", + "As we will also see in the first project, \n", + "this may\n", + "however not the be case in general and a standard matrix inversion\n", + "algorithm based on say LU, QR or Cholesky decomposition may lead to singularities. We will see examples of this below.\n", + "\n", + "There is however a way to circumvent this problem and also\n", + "gain some insights about the ordinary least squares approach, and\n", + "later shrinkage methods like Ridge and Lasso regressions.\n", + "\n", + "This is given by the **Singular Value Decomposition** (SVD) algorithm,\n", + "perhaps the most powerful linear algebra algorithm. The SVD provides\n", + "a numerically stable matrix decomposition that is used in a large\n", + "swath oc applications and the decomposition is always stable\n", + "numerically.\n", + "\n", + "In machine learning it plays a central role in dealing with for\n", + "example design matrices that may be near singular or singular.\n", + "Furthermore, as we will see here, the singular values can be related\n", + "to the covariance matrix (and thereby the correlation matrix) and in\n", + "turn the variance of a given quantity. It plays also an important role\n", + "in the principal component analysis where high-dimensional data can be\n", + "reduced to the statistically relevant features." + ] + }, + { + "cell_type": "markdown", + "id": "ef8c39b7", + "metadata": { + "editable": true + }, + "source": [ + "## Linear Regression Problems\n", + "\n", + "One of the typical problems we encounter with linear regression, in particular \n", + "when the matrix $\\boldsymbol{X}$ (our so-called design matrix) is high-dimensional, \n", + "are problems with near singular or singular matrices. The column vectors of $\\boldsymbol{X}$ \n", + "may be linearly dependent, normally referred to as super-collinearity. \n", + "This means that the matrix may be rank deficient and it is basically impossible to \n", + "to model the data using linear regression. As an example, consider the matrix" + ] + }, + { + "cell_type": "markdown", + "id": "6edd77ca", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\begin{align*}\n", + "\\mathbf{X} & = \\left[\n", + "\\begin{array}{rrr}\n", + "1 & -1 & 2\n", + "\\\\\n", + "1 & 0 & 1\n", + "\\\\\n", + "1 & 2 & -1\n", + "\\\\\n", + "1 & 1 & 0\n", + "\\end{array} \\right]\n", + "\\end{align*}\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "cba40ade", + "metadata": { + "editable": true + }, + "source": [ + "The columns of $\\boldsymbol{X}$ are linearly dependent. We see this easily since the \n", + "the first column is the row-wise sum of the other two columns. The rank (more correct,\n", + "the column rank) of a matrix is the dimension of the space spanned by the\n", + "column vectors. Hence, the rank of $\\mathbf{X}$ is equal to the number\n", + "of linearly independent columns. In this particular case the matrix has rank 2.\n", + "\n", + "Super-collinearity of an $(n \\times p)$-dimensional design matrix $\\mathbf{X}$ implies\n", + "that the inverse of the matrix $\\boldsymbol{X}^T\\boldsymbol{X}$ (the matrix we need to invert to solve the linear regression equations) is non-invertible. If we have a square matrix that does not have an inverse, we say this matrix singular. The example here demonstrates this" + ] + }, + { + "cell_type": "markdown", + "id": "20f096a2", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\begin{align*}\n", + "\\boldsymbol{X} & = \\left[\n", + "\\begin{array}{rr}\n", + "1 & -1\n", + "\\\\\n", + "1 & -1\n", + "\\end{array} \\right].\n", + "\\end{align*}\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "49f6f27c", + "metadata": { + "editable": true + }, + "source": [ + "We see easily that $\\mbox{det}(\\boldsymbol{X}) = x_{11} x_{22} - x_{12} x_{21} = 1 \\times (-1) - 1 \\times (-1) = 0$. Hence, $\\mathbf{X}$ is singular and its inverse is undefined.\n", + "This is equivalent to saying that the matrix $\\boldsymbol{X}$ has at least an eigenvalue which is zero." + ] + }, + { + "cell_type": "markdown", + "id": "577f3338", + "metadata": { + "editable": true + }, + "source": [ + "## Fixing the singularity\n", + "\n", + "If our design matrix $\\boldsymbol{X}$ which enters the linear regression problem" + ] + }, + { + "cell_type": "markdown", + "id": "f456df81", + "metadata": { + "editable": true + }, + "source": [ + "\n", + "
    \n", + "\n", + "$$\n", + "\\begin{equation}\n", + "\\boldsymbol{\\beta} = (\\boldsymbol{X}^{T} \\boldsymbol{X})^{-1} \\boldsymbol{X}^{T} \\boldsymbol{y},\n", + "\\label{_auto1} \\tag{1}\n", + "\\end{equation}\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "ed7db14f", + "metadata": { + "editable": true + }, + "source": [ + "has linearly dependent column vectors, we will not be able to compute the inverse\n", + "of $\\boldsymbol{X}^T\\boldsymbol{X}$ and we cannot find the parameters (estimators) $\\beta_i$. \n", + "The estimators are only well-defined if $(\\boldsymbol{X}^{T}\\boldsymbol{X})^{-1}$ exits. \n", + "This is more likely to happen when the matrix $\\boldsymbol{X}$ is high-dimensional. In this case it is likely to encounter a situation where \n", + "the regression parameters $\\beta_i$ cannot be estimated.\n", + "\n", + "A cheap *ad hoc* approach is simply to add a small diagonal component to the matrix to invert, that is we change" + ] + }, + { + "cell_type": "markdown", + "id": "a876de90", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{X}^{T} \\boldsymbol{X} \\rightarrow \\boldsymbol{X}^{T} \\boldsymbol{X}+\\lambda \\boldsymbol{I},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "3b2eee8d", + "metadata": { + "editable": true + }, + "source": [ + "where $\\boldsymbol{I}$ is the identity matrix. When we discuss **Ridge** regression this is actually what we end up evaluating. The parameter $\\lambda$ is called a hyperparameter. More about this later." + ] + }, + { + "cell_type": "markdown", + "id": "910d3f09", + "metadata": { + "editable": true + }, + "source": [ + "## Basic math of the SVD\n", + "\n", + "From standard linear algebra we know that a square matrix $\\boldsymbol{X}$ can be diagonalized if and only it is \n", + "a so-called [normal matrix](https://en.wikipedia.org/wiki/Normal_matrix), that is if $\\boldsymbol{X}\\in {\\mathbb{R}}^{n\\times n}$\n", + "we have $\\boldsymbol{X}\\boldsymbol{X}^T=\\boldsymbol{X}^T\\boldsymbol{X}$ or if $\\boldsymbol{X}\\in {\\mathbb{C}}^{n\\times n}$ we have $\\boldsymbol{X}\\boldsymbol{X}^{\\dagger}=\\boldsymbol{X}^{\\dagger}\\boldsymbol{X}$.\n", + "The matrix has then a set of eigenpairs" + ] + }, + { + "cell_type": "markdown", + "id": "94bd4c00", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "(\\lambda_1,\\boldsymbol{u}_1),\\dots, (\\lambda_n,\\boldsymbol{u}_n),\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "56d91a09", + "metadata": { + "editable": true + }, + "source": [ + "and the eigenvalues are given by the diagonal matrix" + ] + }, + { + "cell_type": "markdown", + "id": "8e59a435", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{\\Sigma}=\\mathrm{Diag}(\\lambda_1, \\dots,\\lambda_n).\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "9c2e6b9f", + "metadata": { + "editable": true + }, + "source": [ + "The matrix $\\boldsymbol{X}$ can be written in terms of an orthogonal/unitary transformation $\\boldsymbol{U}$" + ] + }, + { + "cell_type": "markdown", + "id": "e7188a39", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{X} = \\boldsymbol{U}\\boldsymbol{\\Sigma}\\boldsymbol{V}^T,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "daac715a", + "metadata": { + "editable": true + }, + "source": [ + "with $\\boldsymbol{U}\\boldsymbol{U}^T=\\boldsymbol{I}$ or $\\boldsymbol{U}\\boldsymbol{U}^{\\dagger}=\\boldsymbol{I}$.\n", + "\n", + "Not all square matrices are diagonalizable. A matrix like the one discussed above" + ] + }, + { + "cell_type": "markdown", + "id": "66322f83", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{X} = \\begin{bmatrix} \n", + "1& -1 \\\\\n", + "1& -1\\\\\n", + "\\end{bmatrix}\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "a03be784", + "metadata": { + "editable": true + }, + "source": [ + "is not diagonalizable, it is a so-called [defective matrix](https://en.wikipedia.org/wiki/Defective_matrix). It is easy to see that the condition\n", + "$\\boldsymbol{X}\\boldsymbol{X}^T=\\boldsymbol{X}^T\\boldsymbol{X}$ is not fulfilled." + ] + }, + { + "cell_type": "markdown", + "id": "ff3964a4", + "metadata": { + "editable": true + }, + "source": [ + "## The SVD, a Fantastic Algorithm\n", + "\n", + "However, and this is the strength of the SVD algorithm, any general\n", + "matrix $\\boldsymbol{X}$ can be decomposed in terms of a diagonal matrix and\n", + "two orthogonal/unitary matrices. The [Singular Value Decompostion\n", + "(SVD) theorem](https://en.wikipedia.org/wiki/Singular_value_decomposition)\n", + "states that a general $m\\times n$ matrix $\\boldsymbol{X}$ can be written in\n", + "terms of a diagonal matrix $\\boldsymbol{\\Sigma}$ of dimensionality $m\\times n$\n", + "and two orthognal matrices $\\boldsymbol{U}$ and $\\boldsymbol{V}$, where the first has\n", + "dimensionality $m \\times m$ and the last dimensionality $n\\times n$.\n", + "We have then" + ] + }, + { + "cell_type": "markdown", + "id": "04d411cc", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{X} = \\boldsymbol{U}\\boldsymbol{\\Sigma}\\boldsymbol{V}^T\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "bf2ae91a", + "metadata": { + "editable": true + }, + "source": [ + "As an example, the above defective matrix can be decomposed as" + ] + }, + { + "cell_type": "markdown", + "id": "843d113e", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{X} = \\frac{1}{\\sqrt{2}}\\begin{bmatrix} 1& 1 \\\\ 1& -1\\\\ \\end{bmatrix} \\begin{bmatrix} 2& 0 \\\\ 0& 0\\\\ \\end{bmatrix} \\frac{1}{\\sqrt{2}}\\begin{bmatrix} 1& -1 \\\\ 1& 1\\\\ \\end{bmatrix}=\\boldsymbol{U}\\boldsymbol{\\Sigma}\\boldsymbol{V}^T,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "f59af5f8", + "metadata": { + "editable": true + }, + "source": [ + "with eigenvalues $\\sigma_1=2$ and $\\sigma_2=0$. \n", + "The SVD exits always! \n", + "\n", + "The SVD\n", + "decomposition (singular values) gives eigenvalues \n", + "$\\sigma_i\\geq\\sigma_{i+1}$ for all $i$ and for dimensions larger than $i=p$, the\n", + "eigenvalues (singular values) are zero.\n", + "\n", + "In the general case, where our design matrix $\\boldsymbol{X}$ has dimension\n", + "$n\\times p$, the matrix is thus decomposed into an $n\\times n$\n", + "orthogonal matrix $\\boldsymbol{U}$, a $p\\times p$ orthogonal matrix $\\boldsymbol{V}$\n", + "and a diagonal matrix $\\boldsymbol{\\Sigma}$ with $r=\\mathrm{min}(n,p)$\n", + "singular values $\\sigma_i\\geq 0$ on the main diagonal and zeros filling\n", + "the rest of the matrix. There are at most $p$ singular values\n", + "assuming that $n > p$. In our regression examples for the nuclear\n", + "masses and the equation of state this is indeed the case, while for\n", + "the Ising model we have $p > n$. These are often cases that lead to\n", + "near singular or singular matrices.\n", + "\n", + "The columns of $\\boldsymbol{U}$ are called the left singular vectors while the columns of $\\boldsymbol{V}$ are the right singular vectors." + ] + }, + { + "cell_type": "markdown", + "id": "22f1ed07", + "metadata": { + "editable": true + }, + "source": [ + "## Economy-size SVD\n", + "\n", + "If we assume that $n > p$, then our matrix $\\boldsymbol{U}$ has dimension $n\n", + "\\times n$. The last $n-p$ columns of $\\boldsymbol{U}$ become however\n", + "irrelevant in our calculations since they are multiplied with the\n", + "zeros in $\\boldsymbol{\\Sigma}$.\n", + "\n", + "The economy-size decomposition removes extra rows or columns of zeros\n", + "from the diagonal matrix of singular values, $\\boldsymbol{\\Sigma}$, along with the columns\n", + "in either $\\boldsymbol{U}$ or $\\boldsymbol{V}$ that multiply those zeros in the expression. \n", + "Removing these zeros and columns can improve execution time\n", + "and reduce storage requirements without compromising the accuracy of\n", + "the decomposition.\n", + "\n", + "If $n > p$, we keep only the first $p$ columns of $\\boldsymbol{U}$ and $\\boldsymbol{\\Sigma}$ has dimension $p\\times p$. \n", + "If $p > n$, then only the first $n$ columns of $\\boldsymbol{V}$ are computed and $\\boldsymbol{\\Sigma}$ has dimension $n\\times n$.\n", + "The $n=p$ case is obvious, we retain the full SVD. \n", + "In general the economy-size SVD leads to less FLOPS and still conserving the desired accuracy." + ] + }, + { + "cell_type": "markdown", + "id": "69efb08d", + "metadata": { + "editable": true + }, + "source": [ + "## Codes for the SVD" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "id": "640d3bdf", + "metadata": { + "collapsed": false, + "editable": true + }, + "outputs": [], + "source": [ + "import numpy as np\n", + "# SVD inversion\n", + "def SVD(A):\n", + " ''' Takes as input a numpy matrix A and returns inv(A) based on singular value decomposition (SVD).\n", + " SVD is numerically more stable than the inversion algorithms provided by\n", + " numpy and scipy.linalg at the cost of being slower.\n", + " '''\n", + " U, S, VT = np.linalg.svd(A,full_matrices=True)\n", + " print('test U')\n", + " print( (np.transpose(U) @ U - U @np.transpose(U)))\n", + " print('test VT')\n", + " print( (np.transpose(VT) @ VT - VT @np.transpose(VT)))\n", + " print(U)\n", + " print(S)\n", + " print(VT)\n", + "\n", + " D = np.zeros((len(U),len(VT)))\n", + " for i in range(0,len(VT)):\n", + " D[i,i]=S[i]\n", + " return U @ D @ VT\n", + "\n", + "\n", + "X = np.array([ [1.0,-1.0], [1.0,-1.0]])\n", + "#X = np.array([[1, 2], [3, 4], [5, 6]])\n", + "\n", + "print(X)\n", + "C = SVD(X)\n", + "# Print the difference between the original matrix and the SVD one\n", + "print(C-X)" + ] + }, + { + "cell_type": "markdown", + "id": "98d61790", + "metadata": { + "editable": true + }, + "source": [ + "The matrix $\\boldsymbol{X}$ has columns that are linearly dependent. The first\n", + "column is the row-wise sum of the other two columns. The rank of a\n", + "matrix (the column rank) is the dimension of space spanned by the\n", + "column vectors. The rank of the matrix is the number of linearly\n", + "independent columns, in this case just $2$. We see this from the\n", + "singular values when running the above code. Running the standard\n", + "inversion algorithm for matrix inversion with $\\boldsymbol{X}^T\\boldsymbol{X}$ results\n", + "in the program terminating due to a singular matrix." + ] + }, + { + "cell_type": "markdown", + "id": "95b1ffa6", + "metadata": { + "editable": true + }, + "source": [ + "## Note about SVD Calculations\n", + "\n", + "The $U$, $S$, and $V$ matrices returned from the **svd()** function\n", + "cannot be multiplied directly.\n", + "\n", + "As you can see from the code, the $S$ vector must be converted into a\n", + "diagonal matrix. This may cause a problem as the size of the matrices\n", + "do not fit the rules of matrix multiplication, where the number of\n", + "columns in a matrix must match the number of rows in the subsequent\n", + "matrix.\n", + "\n", + "If you wish to include the zero singular values, you will need to\n", + "resize the matrices and set up a diagonal matrix as done in the above\n", + "example" + ] + }, + { + "cell_type": "markdown", + "id": "4605f137", + "metadata": { + "editable": true + }, + "source": [ + "## Mathematics of the SVD and implications\n", + "\n", + "Let us take a closer look at the mathematics of the SVD and the various implications for machine learning studies.\n", + "\n", + "Our starting point is our design matrix $\\boldsymbol{X}$ of dimension $n\\times p$" + ] + }, + { + "cell_type": "markdown", + "id": "3125bc92", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{X}=\\begin{bmatrix}\n", + "x_{0,0} & x_{0,1} & x_{0,2}& \\dots & \\dots x_{0,p-1}\\\\\n", + "x_{1,0} & x_{1,1} & x_{1,2}& \\dots & \\dots x_{1,p-1}\\\\\n", + "x_{2,0} & x_{2,1} & x_{2,2}& \\dots & \\dots x_{2,p-1}\\\\\n", + "\\dots & \\dots & \\dots & \\dots \\dots & \\dots \\\\\n", + "x_{n-2,0} & x_{n-2,1} & x_{n-2,2}& \\dots & \\dots x_{n-2,p-1}\\\\\n", + "x_{n-1,0} & x_{n-1,1} & x_{n-1,2}& \\dots & \\dots x_{n-1,p-1}\\\\\n", + "\\end{bmatrix}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "32cf3a9e", + "metadata": { + "editable": true + }, + "source": [ + "We can SVD decompose our matrix as" + ] + }, + { + "cell_type": "markdown", + "id": "573acb2d", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{X}=\\boldsymbol{U}\\boldsymbol{\\Sigma}\\boldsymbol{V}^T,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "22320566", + "metadata": { + "editable": true + }, + "source": [ + "where $\\boldsymbol{U}$ is an orthogonal matrix of dimension $n\\times n$, meaning that $\\boldsymbol{U}\\boldsymbol{U}^T=\\boldsymbol{U}^T\\boldsymbol{U}=\\boldsymbol{I}_n$. Here $\\boldsymbol{I}_n$ is the unit matrix of dimension $n \\times n$.\n", + "\n", + "Similarly, $\\boldsymbol{V}$ is an orthogonal matrix of dimension $p\\times p$, meaning that $\\boldsymbol{V}\\boldsymbol{V}^T=\\boldsymbol{V}^T\\boldsymbol{V}=\\boldsymbol{I}_p$. Here $\\boldsymbol{I}_n$ is the unit matrix of dimension $p \\times p$.\n", + "\n", + "Finally $\\boldsymbol{\\Sigma}$ contains the singular values $\\sigma_i$. This matrix has dimension $n\\times p$ and the singular values $\\sigma_i$ are all positive. The non-zero values are ordered in descending order, that is" + ] + }, + { + "cell_type": "markdown", + "id": "af0ee993", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\sigma_0 > \\sigma_1 > \\sigma_2 > \\dots > \\sigma_{p-1} > 0.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "0213ed87", + "metadata": { + "editable": true + }, + "source": [ + "All values beyond $p-1$ are all zero." + ] + }, + { + "cell_type": "markdown", + "id": "06266ee6", + "metadata": { + "editable": true + }, + "source": [ + "## Example Matrix\n", + "\n", + "As an example, consider the following $3\\times 2$ example for the matrix $\\boldsymbol{\\Sigma}$" + ] + }, + { + "cell_type": "markdown", + "id": "23e27fdf", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{\\Sigma}=\n", + "\\begin{bmatrix}\n", + "2& 0 \\\\\n", + "0 & 1 \\\\\n", + "0 & 0 \\\\\n", + "\\end{bmatrix}\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "2539e582", + "metadata": { + "editable": true + }, + "source": [ + "The singular values are $\\sigma_0=2$ and $\\sigma_1=1$. It is common to rewrite the matrix $\\boldsymbol{\\Sigma}$ as" + ] + }, + { + "cell_type": "markdown", + "id": "bef2cf95", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{\\Sigma}=\n", + "\\begin{bmatrix}\n", + "\\boldsymbol{\\tilde{\\Sigma}}\\\\\n", + "\\boldsymbol{0}\\\\\n", + "\\end{bmatrix},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "fe385753", + "metadata": { + "editable": true + }, + "source": [ + "where" + ] + }, + { + "cell_type": "markdown", + "id": "cc270435", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{\\tilde{\\Sigma}}=\n", + "\\begin{bmatrix}\n", + "2& 0 \\\\\n", + "0 & 1 \\\\\n", + "\\end{bmatrix},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "31932192", + "metadata": { + "editable": true + }, + "source": [ + "contains only the singular values. Note also (and we will use this below) that" + ] + }, + { + "cell_type": "markdown", + "id": "a972a944", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{\\Sigma}^T\\boldsymbol{\\Sigma}=\n", + "\\begin{bmatrix}\n", + "4& 0 \\\\\n", + "0 & 1 \\\\\n", + "\\end{bmatrix},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "d6ef62ee", + "metadata": { + "editable": true + }, + "source": [ + "which is a $2\\times 2 $ matrix while" + ] + }, + { + "cell_type": "markdown", + "id": "61e10478", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{\\Sigma}\\boldsymbol{\\Sigma}^T=\n", + "\\begin{bmatrix}\n", + "4& 0 & 0\\\\\n", + "0 & 1 & 0\\\\\n", + "0 & 0 & 0\\\\\n", + "\\end{bmatrix},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "9e8580da", + "metadata": { + "editable": true + }, + "source": [ + "is a $3\\times 3 $ matrix. The last row and column of this last matrix\n", + "contain only zeros. This will have important consequences for our SVD\n", + "decomposition of the design matrix." + ] + }, + { + "cell_type": "markdown", + "id": "0ac00991", + "metadata": { + "editable": true + }, + "source": [ + "## Setting up the Matrix to be inverted\n", + "\n", + "The matrix that may cause problems for us is $\\boldsymbol{X}^T\\boldsymbol{X}$. Using the SVD we can rewrite this matrix as" + ] + }, + { + "cell_type": "markdown", + "id": "05f8073b", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{X}^T\\boldsymbol{X}=\\boldsymbol{V}\\boldsymbol{\\Sigma}^T\\boldsymbol{U}^T\\boldsymbol{U}\\boldsymbol{\\Sigma}\\boldsymbol{V}^T,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "622a8443", + "metadata": { + "editable": true + }, + "source": [ + "and using the orthogonality of the matrix $\\boldsymbol{U}$ we have" + ] + }, + { + "cell_type": "markdown", + "id": "580e143c", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{X}^T\\boldsymbol{X}=\\boldsymbol{V}\\boldsymbol{\\Sigma}^T\\boldsymbol{\\Sigma}\\boldsymbol{V}^T.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "30b75cea", + "metadata": { + "editable": true + }, + "source": [ + "We define $\\boldsymbol{\\Sigma}^T\\boldsymbol{\\Sigma}=\\tilde{\\boldsymbol{\\Sigma}}^2$ which is a diagonal matrix containing only the singular values squared. It has dimensionality $p \\times p$.\n", + "\n", + "We can now insert the result for the matrix $\\boldsymbol{X}^T\\boldsymbol{X}$ into our equation for ordinary least squares where" + ] + }, + { + "cell_type": "markdown", + "id": "cdc103a7", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\tilde{y}_{\\mathrm{OLS}}=\\boldsymbol{X}\\left(\\boldsymbol{X}^T\\boldsymbol{X}\\right)^{-1}\\boldsymbol{X}^T\\boldsymbol{y},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "ea01abf6", + "metadata": { + "editable": true + }, + "source": [ + "and using our SVD decomposition of $\\boldsymbol{X}$ we have" + ] + }, + { + "cell_type": "markdown", + "id": "e4b60d5d", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\tilde{y}_{\\mathrm{OLS}}=\\boldsymbol{U}\\boldsymbol{\\Sigma}\\boldsymbol{V}^T\\left(\\boldsymbol{V}\\tilde{\\boldsymbol{\\Sigma}}^{2}(\\boldsymbol{V}^T\\right)^{-1}\\boldsymbol{V}\\boldsymbol{\\Sigma}^T\\boldsymbol{U}^T\\boldsymbol{y},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "deb0bbd3", + "metadata": { + "editable": true + }, + "source": [ + "which gives us, using the orthogonality of the matrices $\\boldsymbol{U}$ and $\\boldsymbol{V}$," + ] + }, + { + "cell_type": "markdown", + "id": "f1f15de8", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\tilde{y}_{\\mathrm{OLS}}=\\boldsymbol{U}\\boldsymbol{U}^T\\boldsymbol{y}=\\sum_{i=0}^{p-1}\\boldsymbol{u}_i\\boldsymbol{u}^T_i\\boldsymbol{y},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "7c54c407", + "metadata": { + "editable": true + }, + "source": [ + "It means that the ordinary least square model (with the optimal\n", + "parameters) $\\boldsymbol{\\tilde{y}}$, corresponds to an orthogonal\n", + "transformation of the output (or target) vector $\\boldsymbol{y}$ by the\n", + "vectors of the matrix $\\boldsymbol{U}$. Note that the summation ends at $p-1$,\n", + "that is $\\boldsymbol{\\tilde{y}}\\ne \\boldsymbol{y}$." + ] + }, + { + "cell_type": "markdown", + "id": "31e31b03", + "metadata": { + "editable": true + }, + "source": [ + "## Further properties (important for our analyses later)\n", + "\n", + "Let us study again $\\boldsymbol{X}^T\\boldsymbol{X}$ in terms of our SVD," + ] + }, + { + "cell_type": "markdown", + "id": "7d1cef4f", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{X}^T\\boldsymbol{X}=\\boldsymbol{V}\\boldsymbol{\\Sigma}^T\\boldsymbol{U}^T\\boldsymbol{U}\\boldsymbol{\\Sigma}\\boldsymbol{V}^T=\\boldsymbol{V}\\boldsymbol{\\Sigma}^T\\boldsymbol{\\Sigma}\\boldsymbol{V}^T.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "aa8cedef", + "metadata": { + "editable": true + }, + "source": [ + "If we now multiply from the right with $\\boldsymbol{V}$ (using the orthogonality of $\\boldsymbol{V}$) we get" + ] + }, + { + "cell_type": "markdown", + "id": "022623a1", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\left(\\boldsymbol{X}^T\\boldsymbol{X}\\right)\\boldsymbol{V}=\\boldsymbol{V}\\boldsymbol{\\Sigma}^T\\boldsymbol{\\Sigma}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "c9885020", + "metadata": { + "editable": true + }, + "source": [ + "This means the vectors $\\boldsymbol{v}_i$ of the orthogonal matrix $\\boldsymbol{V}$ are the eigenvectors of the matrix $\\boldsymbol{X}^T\\boldsymbol{X}$\n", + "with eigenvalues given by the singular values squared, that is" + ] + }, + { + "cell_type": "markdown", + "id": "f378f76e", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\left(\\boldsymbol{X}^T\\boldsymbol{X}\\right)\\boldsymbol{v}_i=\\boldsymbol{v}_i\\sigma_i^2.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "4add7e8a", + "metadata": { + "editable": true + }, + "source": [ + "Similarly, if we use the SVD decomposition for the matrix $\\boldsymbol{X}\\boldsymbol{X}^T$, we have" + ] + }, + { + "cell_type": "markdown", + "id": "51ea1a29", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{X}\\boldsymbol{X}^T=\\boldsymbol{U}\\boldsymbol{\\Sigma}\\boldsymbol{V}^T\\boldsymbol{V}\\boldsymbol{\\Sigma}^T\\boldsymbol{U}^T=\\boldsymbol{U}\\boldsymbol{\\Sigma}\\boldsymbol{\\Sigma}^T\\boldsymbol{U}^T.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "54a250b6", + "metadata": { + "editable": true + }, + "source": [ + "If we now multiply from the right with $\\boldsymbol{U}$ (using the orthogonality of $\\boldsymbol{U}$) we get" + ] + }, + { + "cell_type": "markdown", + "id": "ebaf68f5", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\left(\\boldsymbol{X}\\boldsymbol{X}^T\\right)\\boldsymbol{U}=\\boldsymbol{U}\\boldsymbol{\\Sigma}\\boldsymbol{\\Sigma}^T.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "5ff687e8", + "metadata": { + "editable": true + }, + "source": [ + "This means the vectors $\\boldsymbol{u}_i$ of the orthogonal matrix $\\boldsymbol{U}$ are the eigenvectors of the matrix $\\boldsymbol{X}\\boldsymbol{X}^T$\n", + "with eigenvalues given by the singular values squared, that is" + ] + }, + { + "cell_type": "markdown", + "id": "ea61a360", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\left(\\boldsymbol{X}\\boldsymbol{X}^T\\right)\\boldsymbol{u}_i=\\boldsymbol{u}_i\\sigma_i^2.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "bc168f34", + "metadata": { + "editable": true + }, + "source": [ + "**Important note**: we have defined our design matrix $\\boldsymbol{X}$ to be an\n", + "$n\\times p$ matrix. In most supervised learning cases we have that $n\n", + "\\ge p$, and quite often we have $n >> p$. For linear algebra based methods like ordinary least squares or Ridge regression, this leads to a matrix $\\boldsymbol{X}^T\\boldsymbol{X}$ which is small and thereby easier to handle from a computational point of view (in terms of number of floating point operations).\n", + "\n", + "In our lectures, the number of columns will\n", + "always refer to the number of features in our data set, while the\n", + "number of rows represents the number of data inputs. Note that in\n", + "other texts you may find the opposite notation. This has consequences\n", + "for the definition of for example the covariance matrix and its relation to the SVD." + ] + }, + { + "cell_type": "markdown", + "id": "39d89895", + "metadata": { + "editable": true + }, + "source": [ + "## Meet the Covariance Matrix\n", + "\n", + "Before we move on to a discussion of Ridge and Lasso regression, we want to show an important example of the above.\n", + "\n", + "We have already noted that the matrix $\\boldsymbol{X}^T\\boldsymbol{X}$ in ordinary\n", + "least squares is proportional to the second derivative of the cost\n", + "function, that is we have" + ] + }, + { + "cell_type": "markdown", + "id": "c229143d", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\frac{\\partial^2 C(\\boldsymbol{\\beta})}{\\partial \\boldsymbol{\\beta}^T\\partial \\boldsymbol{\\beta}} =\\frac{2}{n}\\boldsymbol{X}^T\\boldsymbol{X}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "0a569456", + "metadata": { + "editable": true + }, + "source": [ + "This quantity defines was what is called the Hessian matrix (the second derivative of a function we want to optimize).\n", + "\n", + "The Hessian matrix plays an important role and is defined in this course as" + ] + }, + { + "cell_type": "markdown", + "id": "0c0b9212", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{H}=\\boldsymbol{X}^T\\boldsymbol{X}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "b05a1b83", + "metadata": { + "editable": true + }, + "source": [ + "The Hessian matrix for ordinary least squares is also proportional to\n", + "the covariance matrix. This means also that we can use the SVD to find\n", + "the eigenvalues of the covariance matrix and the Hessian matrix in\n", + "terms of the singular values. Let us develop these arguments, as they will play an important role in our machine learning studies." + ] + }, + { + "cell_type": "markdown", + "id": "d64818ce", + "metadata": { + "editable": true + }, + "source": [ + "## Introducing the Covariance and Correlation functions\n", + "\n", + "Before we discuss the link between for example Ridge regression and the singular value decomposition, we need to remind ourselves about\n", + "the definition of the covariance and the correlation function. These are quantities that play a central role in machine learning methods.\n", + "\n", + "Suppose we have defined two vectors\n", + "$\\hat{x}$ and $\\hat{y}$ with $n$ elements each. The covariance matrix $\\boldsymbol{C}$ is defined as" + ] + }, + { + "cell_type": "markdown", + "id": "32df0f89", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{C}[\\boldsymbol{x},\\boldsymbol{y}] = \\begin{bmatrix} \\mathrm{cov}[\\boldsymbol{x},\\boldsymbol{x}] & \\mathrm{cov}[\\boldsymbol{x},\\boldsymbol{y}] \\\\\n", + " \\mathrm{cov}[\\boldsymbol{y},\\boldsymbol{x}] & \\mathrm{cov}[\\boldsymbol{y},\\boldsymbol{y}] \\\\\n", + " \\end{bmatrix},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "a9d9108b", + "metadata": { + "editable": true + }, + "source": [ + "where for example" + ] + }, + { + "cell_type": "markdown", + "id": "c6d76715", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\mathrm{cov}[\\boldsymbol{x},\\boldsymbol{y}] =\\frac{1}{n} \\sum_{i=0}^{n-1}(x_i- \\overline{x})(y_i- \\overline{y}).\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "5cc35821", + "metadata": { + "editable": true + }, + "source": [ + "With this definition and recalling that the variance is defined as" + ] + }, + { + "cell_type": "markdown", + "id": "27c8eac0", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\mathrm{var}[\\boldsymbol{x}]=\\frac{1}{n} \\sum_{i=0}^{n-1}(x_i- \\overline{x})^2,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "49361e47", + "metadata": { + "editable": true + }, + "source": [ + "we can rewrite the covariance matrix as" + ] + }, + { + "cell_type": "markdown", + "id": "5eb15920", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{C}[\\boldsymbol{x},\\boldsymbol{y}] = \\begin{bmatrix} \\mathrm{var}[\\boldsymbol{x}] & \\mathrm{cov}[\\boldsymbol{x},\\boldsymbol{y}] \\\\\n", + " \\mathrm{cov}[\\boldsymbol{x},\\boldsymbol{y}] & \\mathrm{var}[\\boldsymbol{y}] \\\\\n", + " \\end{bmatrix}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "2160cb07", + "metadata": { + "editable": true + }, + "source": [ + "**Note:** we have used $1/n$ in the above definitions of the *sample* variance and covariance. We assume then that we can calculate the exact mean value. \n", + "What you will find in essentially all statistics texts are equations\n", + "with a factor $1/(n-1)$. This is called [Bessel's correction](https://mathworld.wolfram.com/BesselsCorrection.html). This\n", + "method corrects the bias in the estimation of the population variance\n", + "and covariance. It also partially corrects the bias in the estimation\n", + "of the population standard deviation. If you use a library like\n", + "**Scikit-Learn** or **nunmpy's** function calculate the covariance, this\n", + "quantity will be computed with a factor $1/(n-1)$." + ] + }, + { + "cell_type": "markdown", + "id": "a5deaa8e", + "metadata": { + "editable": true + }, + "source": [ + "## Covariance and Correlation Matrix\n", + "\n", + "The covariance takes values between zero and infinity and may thus\n", + "lead to problems with loss of numerical precision for particularly\n", + "large values. It is common to scale the covariance matrix by\n", + "introducing instead the correlation matrix defined via the so-called\n", + "correlation function" + ] + }, + { + "cell_type": "markdown", + "id": "f6868141", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\mathrm{corr}[\\boldsymbol{x},\\boldsymbol{y}]=\\frac{\\mathrm{cov}[\\boldsymbol{x},\\boldsymbol{y}]}{\\sqrt{\\mathrm{var}[\\boldsymbol{x}] \\mathrm{var}[\\boldsymbol{y}]}}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "9c17b156", + "metadata": { + "editable": true + }, + "source": [ + "The correlation function is then given by values $\\mathrm{corr}[\\boldsymbol{x},\\boldsymbol{y}]\n", + "\\in [-1,1]$. This avoids eventual problems with too large values. We\n", + "can then define the correlation matrix for the two vectors $\\boldsymbol{x}$\n", + "and $\\boldsymbol{y}$ as" + ] + }, + { + "cell_type": "markdown", + "id": "1b9e8b7e", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{K}[\\boldsymbol{x},\\boldsymbol{y}] = \\begin{bmatrix} 1 & \\mathrm{corr}[\\boldsymbol{x},\\boldsymbol{y}] \\\\\n", + " \\mathrm{corr}[\\boldsymbol{y},\\boldsymbol{x}] & 1 \\\\\n", + " \\end{bmatrix},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "c00ac20a", + "metadata": { + "editable": true + }, + "source": [ + "In the above example this is the function we constructed using **pandas**." + ] + }, + { + "cell_type": "markdown", + "id": "91729a44", + "metadata": { + "editable": true + }, + "source": [ + "## Correlation Function and Design/Feature Matrix\n", + "\n", + "In our derivation of the various regression algorithms like **Ordinary Least Squares** or **Ridge regression**\n", + "we defined the design/feature matrix $\\boldsymbol{X}$ as" + ] + }, + { + "cell_type": "markdown", + "id": "62403241", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{X}=\\begin{bmatrix}\n", + "x_{0,0} & x_{0,1} & x_{0,2}& \\dots & \\dots x_{0,p-1}\\\\\n", + "x_{1,0} & x_{1,1} & x_{1,2}& \\dots & \\dots x_{1,p-1}\\\\\n", + "x_{2,0} & x_{2,1} & x_{2,2}& \\dots & \\dots x_{2,p-1}\\\\\n", + "\\dots & \\dots & \\dots & \\dots \\dots & \\dots \\\\\n", + "x_{n-2,0} & x_{n-2,1} & x_{n-2,2}& \\dots & \\dots x_{n-2,p-1}\\\\\n", + "x_{n-1,0} & x_{n-1,1} & x_{n-1,2}& \\dots & \\dots x_{n-1,p-1}\\\\\n", + "\\end{bmatrix},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "6d0de657", + "metadata": { + "editable": true + }, + "source": [ + "with $\\boldsymbol{X}\\in {\\mathbb{R}}^{n\\times p}$, with the predictors/features $p$ refering to the column numbers and the\n", + "entries $n$ being the row elements.\n", + "We can rewrite the design/feature matrix in terms of its column vectors as" + ] + }, + { + "cell_type": "markdown", + "id": "108adf6b", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{X}=\\begin{bmatrix} \\boldsymbol{x}_0 & \\boldsymbol{x}_1 & \\boldsymbol{x}_2 & \\dots & \\dots & \\boldsymbol{x}_{p-1}\\end{bmatrix},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "1b2ba4f7", + "metadata": { + "editable": true + }, + "source": [ + "with a given vector" + ] + }, + { + "cell_type": "markdown", + "id": "1711d54c", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{x}_i^T = \\begin{bmatrix}x_{0,i} & x_{1,i} & x_{2,i}& \\dots & \\dots x_{n-1,i}\\end{bmatrix}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "f88b0c88", + "metadata": { + "editable": true + }, + "source": [ + "With these definitions, we can now rewrite our $2\\times 2$\n", + "correlation/covariance matrix in terms of a moe general design/feature\n", + "matrix $\\boldsymbol{X}\\in {\\mathbb{R}}^{n\\times p}$. This leads to a $p\\times p$\n", + "covariance matrix for the vectors $\\boldsymbol{x}_i$ with $i=0,1,\\dots,p-1$" + ] + }, + { + "cell_type": "markdown", + "id": "d1835d40", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{C}[\\boldsymbol{x}] = \\begin{bmatrix}\n", + "\\mathrm{var}[\\boldsymbol{x}_0] & \\mathrm{cov}[\\boldsymbol{x}_0,\\boldsymbol{x}_1] & \\mathrm{cov}[\\boldsymbol{x}_0,\\boldsymbol{x}_2] & \\dots & \\dots & \\mathrm{cov}[\\boldsymbol{x}_0,\\boldsymbol{x}_{p-1}]\\\\\n", + "\\mathrm{cov}[\\boldsymbol{x}_1,\\boldsymbol{x}_0] & \\mathrm{var}[\\boldsymbol{x}_1] & \\mathrm{cov}[\\boldsymbol{x}_1,\\boldsymbol{x}_2] & \\dots & \\dots & \\mathrm{cov}[\\boldsymbol{x}_1,\\boldsymbol{x}_{p-1}]\\\\\n", + "\\mathrm{cov}[\\boldsymbol{x}_2,\\boldsymbol{x}_0] & \\mathrm{cov}[\\boldsymbol{x}_2,\\boldsymbol{x}_1] & \\mathrm{var}[\\boldsymbol{x}_2] & \\dots & \\dots & \\mathrm{cov}[\\boldsymbol{x}_2,\\boldsymbol{x}_{p-1}]\\\\\n", + "\\dots & \\dots & \\dots & \\dots & \\dots & \\dots \\\\\n", + "\\dots & \\dots & \\dots & \\dots & \\dots & \\dots \\\\\n", + "\\mathrm{cov}[\\boldsymbol{x}_{p-1},\\boldsymbol{x}_0] & \\mathrm{cov}[\\boldsymbol{x}_{p-1},\\boldsymbol{x}_1] & \\mathrm{cov}[\\boldsymbol{x}_{p-1},\\boldsymbol{x}_{2}] & \\dots & \\dots & \\mathrm{var}[\\boldsymbol{x}_{p-1}]\\\\\n", + "\\end{bmatrix},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "7d0f1648", + "metadata": { + "editable": true + }, + "source": [ + "and the correlation matrix" + ] + }, + { + "cell_type": "markdown", + "id": "d16ea5cf", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{K}[\\boldsymbol{x}] = \\begin{bmatrix}\n", + "1 & \\mathrm{corr}[\\boldsymbol{x}_0,\\boldsymbol{x}_1] & \\mathrm{corr}[\\boldsymbol{x}_0,\\boldsymbol{x}_2] & \\dots & \\dots & \\mathrm{corr}[\\boldsymbol{x}_0,\\boldsymbol{x}_{p-1}]\\\\\n", + "\\mathrm{corr}[\\boldsymbol{x}_1,\\boldsymbol{x}_0] & 1 & \\mathrm{corr}[\\boldsymbol{x}_1,\\boldsymbol{x}_2] & \\dots & \\dots & \\mathrm{corr}[\\boldsymbol{x}_1,\\boldsymbol{x}_{p-1}]\\\\\n", + "\\mathrm{corr}[\\boldsymbol{x}_2,\\boldsymbol{x}_0] & \\mathrm{corr}[\\boldsymbol{x}_2,\\boldsymbol{x}_1] & 1 & \\dots & \\dots & \\mathrm{corr}[\\boldsymbol{x}_2,\\boldsymbol{x}_{p-1}]\\\\\n", + "\\dots & \\dots & \\dots & \\dots & \\dots & \\dots \\\\\n", + "\\dots & \\dots & \\dots & \\dots & \\dots & \\dots \\\\\n", + "\\mathrm{corr}[\\boldsymbol{x}_{p-1},\\boldsymbol{x}_0] & \\mathrm{corr}[\\boldsymbol{x}_{p-1},\\boldsymbol{x}_1] & \\mathrm{corr}[\\boldsymbol{x}_{p-1},\\boldsymbol{x}_{2}] & \\dots & \\dots & 1\\\\\n", + "\\end{bmatrix},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "634130de", + "metadata": { + "editable": true + }, + "source": [ + "## Covariance Matrix Examples\n", + "\n", + "The Numpy function **np.cov** calculates the covariance elements using\n", + "the factor $1/(n-1)$ instead of $1/n$ since it assumes we do not have\n", + "the exact mean values. The following simple function uses the\n", + "**np.vstack** function which takes each vector of dimension $1\\times n$\n", + "and produces a $2\\times n$ matrix $\\boldsymbol{W}$\n", + "\n", + "Note that this assumes you have the features as the rows, and the inputs as columns, that is" + ] + }, + { + "cell_type": "markdown", + "id": "cecf6c09", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{W} = \\begin{bmatrix} x_0 & x_1 & x_2 & \\dots & x_{n-2} & x_{n-1} \\\\\n", + " y_0 & y_1 & y_2 & \\dots & y_{n-2} & y_{n-1} \\\\\n", + " \\end{bmatrix},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "1703b000", + "metadata": { + "editable": true + }, + "source": [ + "which in turn is converted into into the $2\\times 2$ covariance matrix\n", + "$\\boldsymbol{C}$ via the Numpy function **np.cov()**. We note that we can also calculate\n", + "the mean value of each set of samples $\\boldsymbol{x}$ etc using the Numpy\n", + "function **np.mean(x)**. We can also extract the eigenvalues of the\n", + "covariance matrix through the **np.linalg.eig()** function." + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "id": "5da5890f", + "metadata": { + "collapsed": false, + "editable": true + }, + "outputs": [], + "source": [ + "# Importing various packages\n", + "import numpy as np\n", + "n = 100\n", + "x = np.random.normal(size=n)\n", + "print(np.mean(x))\n", + "y = 4+3*x+np.random.normal(size=n)\n", + "print(np.mean(y))\n", + "W = np.vstack((x, y))\n", + "C = np.cov(W)\n", + "print(C)" + ] + }, + { + "cell_type": "markdown", + "id": "6b10b22a", + "metadata": { + "editable": true + }, + "source": [ + "## Correlation Matrix\n", + "\n", + "The previous example can be converted into the correlation matrix by\n", + "simply scaling the matrix elements with the variances. We should also\n", + "subtract the mean values for each column. This leads to the following\n", + "code which sets up the correlations matrix for the previous example in\n", + "a more brute force way. Here we scale the mean values for each column of the design matrix, calculate the relevant mean values and variances and then finally set up the $2\\times 2$ correlation matrix (since we have only two vectors)." + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "id": "da699527", + "metadata": { + "collapsed": false, + "editable": true + }, + "outputs": [], + "source": [ + "import numpy as np\n", + "n = 100\n", + "# define two vectors \n", + "x = np.random.random(size=n)\n", + "y = 4+3*x+np.random.normal(size=n)\n", + "#scaling the x and y vectors \n", + "x = x - np.mean(x)\n", + "y = y - np.mean(y)\n", + "variance_x = np.sum(x@x)/n\n", + "variance_y = np.sum(y@y)/n\n", + "print(variance_x)\n", + "print(variance_y)\n", + "cov_xy = np.sum(x@y)/n\n", + "cov_xx = np.sum(x@x)/n\n", + "cov_yy = np.sum(y@y)/n\n", + "C = np.zeros((2,2))\n", + "C[0,0]= cov_xx/variance_x\n", + "C[1,1]= cov_yy/variance_y\n", + "C[0,1]= cov_xy/np.sqrt(variance_y*variance_x)\n", + "C[1,0]= C[0,1]\n", + "print(C)" + ] + }, + { + "cell_type": "markdown", + "id": "a40fb51e", + "metadata": { + "editable": true + }, + "source": [ + "We see that the matrix elements along the diagonal are one as they\n", + "should be and that the matrix is symmetric. Furthermore, diagonalizing\n", + "this matrix we easily see that it is a positive definite matrix.\n", + "\n", + "The above procedure with **numpy** can be made more compact if we use **pandas**." + ] + }, + { + "cell_type": "markdown", + "id": "413db31e", + "metadata": { + "editable": true + }, + "source": [ + "## Correlation Matrix with Pandas\n", + "\n", + "We whow here how we can set up the correlation matrix using **pandas**, as done in this simple code" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "id": "53927e5d", + "metadata": { + "collapsed": false, + "editable": true + }, + "outputs": [], + "source": [ + "import numpy as np\n", + "import pandas as pd\n", + "n = 10\n", + "x = np.random.normal(size=n)\n", + "x = x - np.mean(x)\n", + "y = 4+3*x+np.random.normal(size=n)\n", + "y = y - np.mean(y)\n", + "# Note that we transpose the matrix in order to stay with our ordering n x p\n", + "X = (np.vstack((x, y))).T\n", + "print(X)\n", + "Xpd = pd.DataFrame(X)\n", + "print(Xpd)\n", + "correlation_matrix = Xpd.corr()\n", + "print(correlation_matrix)" + ] + }, + { + "cell_type": "markdown", + "id": "74fc3107", + "metadata": { + "editable": true + }, + "source": [ + "We expand this model to the Franke function discussed above." + ] + }, + { + "cell_type": "markdown", + "id": "030881ab", + "metadata": { + "editable": true + }, + "source": [ + "## Correlation Matrix with Pandas and the Franke function" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "id": "c107aa55", + "metadata": { + "collapsed": false, + "editable": true + }, + "outputs": [], + "source": [ + "# Common imports\n", + "import numpy as np\n", + "import pandas as pd\n", + "\n", + "\n", + "def FrankeFunction(x,y):\n", + "\tterm1 = 0.75*np.exp(-(0.25*(9*x-2)**2) - 0.25*((9*y-2)**2))\n", + "\tterm2 = 0.75*np.exp(-((9*x+1)**2)/49.0 - 0.1*(9*y+1))\n", + "\tterm3 = 0.5*np.exp(-(9*x-7)**2/4.0 - 0.25*((9*y-3)**2))\n", + "\tterm4 = -0.2*np.exp(-(9*x-4)**2 - (9*y-7)**2)\n", + "\treturn term1 + term2 + term3 + term4\n", + "\n", + "\n", + "def create_X(x, y, n ):\n", + "\tif len(x.shape) > 1:\n", + "\t\tx = np.ravel(x)\n", + "\t\ty = np.ravel(y)\n", + "\n", + "\tN = len(x)\n", + "\tl = int((n+1)*(n+2)/2)\t\t# Number of elements in beta\n", + "\tX = np.ones((N,l))\n", + "\n", + "\tfor i in range(1,n+1):\n", + "\t\tq = int((i)*(i+1)/2)\n", + "\t\tfor k in range(i+1):\n", + "\t\t\tX[:,q+k] = (x**(i-k))*(y**k)\n", + "\n", + "\treturn X\n", + "\n", + "\n", + "# Making meshgrid of datapoints and compute Franke's function\n", + "n = 4\n", + "N = 100\n", + "x = np.sort(np.random.uniform(0, 1, N))\n", + "y = np.sort(np.random.uniform(0, 1, N))\n", + "z = FrankeFunction(x, y)\n", + "X = create_X(x, y, n=n) \n", + "\n", + "Xpd = pd.DataFrame(X)\n", + "# subtract the mean values and set up the covariance matrix\n", + "Xpd = Xpd - Xpd.mean()\n", + "covariance_matrix = Xpd.cov()\n", + "print(covariance_matrix)" + ] + }, + { + "cell_type": "markdown", + "id": "3f47378e", + "metadata": { + "editable": true + }, + "source": [ + "We note here that the covariance is zero for the first rows and\n", + "columns since all matrix elements in the design matrix were set to one\n", + "(we are fitting the function in terms of a polynomial of degree $n$).\n", + "\n", + "This means that the variance for these elements will be zero and will\n", + "cause problems when we set up the correlation matrix. We can simply\n", + "drop these elements and construct a correlation\n", + "matrix without these elements." + ] + }, + { + "cell_type": "markdown", + "id": "dba29ab3", + "metadata": { + "editable": true + }, + "source": [ + "## Rewriting the Covariance and/or Correlation Matrix\n", + "\n", + "We can rewrite the covariance matrix in a more compact form in terms of the design/feature matrix $\\boldsymbol{X}$ as" + ] + }, + { + "cell_type": "markdown", + "id": "0eb702bd", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{C}[\\boldsymbol{x}] = \\frac{1}{n}\\boldsymbol{X}^T\\boldsymbol{X}= \\mathbb{E}[\\boldsymbol{X}^T\\boldsymbol{X}].\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "1d355153", + "metadata": { + "editable": true + }, + "source": [ + "To see this let us simply look at a design matrix $\\boldsymbol{X}\\in {\\mathbb{R}}^{2\\times 2}$" + ] + }, + { + "cell_type": "markdown", + "id": "a2316749", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{X}=\\begin{bmatrix}\n", + "x_{00} & x_{01}\\\\\n", + "x_{10} & x_{11}\\\\\n", + "\\end{bmatrix}=\\begin{bmatrix}\n", + "\\boldsymbol{x}_{0} & \\boldsymbol{x}_{1}\\\\\n", + "\\end{bmatrix}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "8f6a654b", + "metadata": { + "editable": true + }, + "source": [ + "If we then compute the expectation value (note the $1/n$ factor instead of $1/(n-1)$)" + ] + }, + { + "cell_type": "markdown", + "id": "72291085", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\mathbb{E}[\\boldsymbol{X}^T\\boldsymbol{X}] = \\frac{1}{n}\\boldsymbol{X}^T\\boldsymbol{X}=\\frac{1}{n}\\begin{bmatrix}\n", + "x_{00}^2+x_{10}^2 & x_{00}x_{01}+x_{10}x_{11}\\\\\n", + "x_{01}x_{00}+x_{11}x_{10} & x_{01}^2+x_{11}^2\\\\\n", + "\\end{bmatrix},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "2b28a5fe", + "metadata": { + "editable": true + }, + "source": [ + "which is just" + ] + }, + { + "cell_type": "markdown", + "id": "49efe427", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{C}[\\boldsymbol{x}_0,\\boldsymbol{x}_1] = \\boldsymbol{C}[\\boldsymbol{x}]=\\begin{bmatrix} \\mathrm{var}[\\boldsymbol{x}_0] & \\mathrm{cov}[\\boldsymbol{x}_0,\\boldsymbol{x}_1] \\\\\n", + " \\mathrm{cov}[\\boldsymbol{x}_1,\\boldsymbol{x}_0] & \\mathrm{var}[\\boldsymbol{x}_1] \\\\\n", + " \\end{bmatrix},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "7edcb842", + "metadata": { + "editable": true + }, + "source": [ + "where we wrote $$\\boldsymbol{C}[\\boldsymbol{x}_0,\\boldsymbol{x}_1] = \\boldsymbol{C}[\\boldsymbol{x}]$$ to indicate that this is the covariance of the vectors $\\boldsymbol{x}$ of the design/feature matrix $\\boldsymbol{X}$.\n", + "\n", + "It is easy to generalize this to a matrix $\\boldsymbol{X}\\in {\\mathbb{R}}^{n\\times p}$." + ] + }, + { + "cell_type": "markdown", + "id": "50ec44da", + "metadata": { + "editable": true + }, + "source": [ + "## Linking with the SVD\n", + "\n", + "We saw earlier that" + ] + }, + { + "cell_type": "markdown", + "id": "f4010e4a", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{X}^T\\boldsymbol{X}=\\boldsymbol{V}\\boldsymbol{\\Sigma}^T\\boldsymbol{U}^T\\boldsymbol{U}\\boldsymbol{\\Sigma}\\boldsymbol{V}^T=\\boldsymbol{V}\\boldsymbol{\\Sigma}^T\\boldsymbol{\\Sigma}\\boldsymbol{V}^T.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "c0e95eb2", + "metadata": { + "editable": true + }, + "source": [ + "Since the matrices here have dimension $p\\times p$, with $p$ corresponding to the singular values, we defined earlier the matrix" + ] + }, + { + "cell_type": "markdown", + "id": "46abefce", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{\\Sigma}^T\\boldsymbol{\\Sigma} = \\begin{bmatrix} \\tilde{\\boldsymbol{\\Sigma}} & \\boldsymbol{0}\\\\ \\end{bmatrix}\\begin{bmatrix} \\tilde{\\boldsymbol{\\Sigma}} \\\\ \\boldsymbol{0}\\\\ \\end{bmatrix},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "30544899", + "metadata": { + "editable": true + }, + "source": [ + "where the tilde-matrix $\\tilde{\\boldsymbol{\\Sigma}}$ is a matrix of dimension $p\\times p$ containing only the singular values $\\sigma_i$, that is" + ] + }, + { + "cell_type": "markdown", + "id": "feaeedbe", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\tilde{\\boldsymbol{\\Sigma}}=\\begin{bmatrix} \\sigma_0 & 0 & 0 & \\dots & 0 & 0 \\\\\n", + " 0 & \\sigma_1 & 0 & \\dots & 0 & 0 \\\\\n", + "\t\t\t\t 0 & 0 & \\sigma_2 & \\dots & 0 & 0 \\\\\n", + "\t\t\t\t 0 & 0 & 0 & \\dots & \\sigma_{p-2} & 0 \\\\\n", + "\t\t\t\t 0 & 0 & 0 & \\dots & 0 & \\sigma_{p-1} \\\\\n", + "\\end{bmatrix},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "3a2c0f0e", + "metadata": { + "editable": true + }, + "source": [ + "meaning we can write" + ] + }, + { + "cell_type": "markdown", + "id": "dc33d7ee", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{X}^T\\boldsymbol{X}=\\boldsymbol{V}\\tilde{\\boldsymbol{\\Sigma}}^2\\boldsymbol{V}^T.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "0ffb1c46", + "metadata": { + "editable": true + }, + "source": [ + "Multiplying from the right with $\\boldsymbol{V}$ (using the orthogonality of $\\boldsymbol{V}$) we get" + ] + }, + { + "cell_type": "markdown", + "id": "6cf92025", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\left(\\boldsymbol{X}^T\\boldsymbol{X}\\right)\\boldsymbol{V}=\\boldsymbol{V}\\tilde{\\boldsymbol{\\Sigma}}^2.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "c21c0c0a", + "metadata": { + "editable": true + }, + "source": [ + "## What does it mean?\n", + "\n", + "This means the vectors $\\boldsymbol{v}_i$ of the orthogonal matrix $\\boldsymbol{V}$\n", + "are the eigenvectors of the matrix $\\boldsymbol{X}^T\\boldsymbol{X}$ with eigenvalues\n", + "given by the singular values squared, that is" + ] + }, + { + "cell_type": "markdown", + "id": "48dbf778", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\left(\\boldsymbol{X}^T\\boldsymbol{X}\\right)\\boldsymbol{v}_i=\\boldsymbol{v}_i\\sigma_i^2.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "3f8f57cc", + "metadata": { + "editable": true + }, + "source": [ + "In other words, each non-zero singular value of $\\boldsymbol{X}$ is a positive\n", + "square root of an eigenvalue of $\\boldsymbol{X}^T\\boldsymbol{X}$. It means also that\n", + "the columns of $\\boldsymbol{V}$ are the eigenvectors of\n", + "$\\boldsymbol{X}^T\\boldsymbol{X}$. Since we have ordered the singular values of\n", + "$\\boldsymbol{X}$ in a descending order, it means that the column vectors\n", + "$\\boldsymbol{v}_i$ are hierarchically ordered by how much correlation they\n", + "encode from the columns of $\\boldsymbol{X}$. \n", + "\n", + "Note that these are also the eigenvectors and eigenvalues of the\n", + "Hessian matrix.\n", + "\n", + "If we now recall the definition of the covariance matrix (not using\n", + "Bessel's correction) we have" + ] + }, + { + "cell_type": "markdown", + "id": "199ea962", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{C}[\\boldsymbol{X}]=\\frac{1}{n}\\boldsymbol{X}^T\\boldsymbol{X},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "f5433e15", + "metadata": { + "editable": true + }, + "source": [ + "meaning that every squared non-singular value of $\\boldsymbol{X}$ divided by $n$ (\n", + "the number of samples) are the eigenvalues of the covariance\n", + "matrix. Every singular value of $\\boldsymbol{X}$ is thus a positive square\n", + "root of an eigenvalue of $\\boldsymbol{X}^T\\boldsymbol{X}$. If the matrix $\\boldsymbol{X}$ is\n", + "self-adjoint, the singular values of $\\boldsymbol{X}$ are equal to the\n", + "absolute value of the eigenvalues of $\\boldsymbol{X}$." + ] + }, + { + "cell_type": "markdown", + "id": "ce1511d3", + "metadata": { + "editable": true + }, + "source": [ + "## And finally $\\boldsymbol{X}\\boldsymbol{X}^T$\n", + "\n", + "For $\\boldsymbol{X}\\boldsymbol{X}^T$ we found" + ] + }, + { + "cell_type": "markdown", + "id": "31981527", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{X}\\boldsymbol{X}^T=\\boldsymbol{U}\\boldsymbol{\\Sigma}\\boldsymbol{V}^T\\boldsymbol{V}\\boldsymbol{\\Sigma}^T\\boldsymbol{U}^T=\\boldsymbol{U}\\boldsymbol{\\Sigma}^T\\boldsymbol{\\Sigma}\\boldsymbol{U}^T.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "ccb547be", + "metadata": { + "editable": true + }, + "source": [ + "Since the matrices here have dimension $n\\times n$, we have" + ] + }, + { + "cell_type": "markdown", + "id": "c9a6f756", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{\\Sigma}\\boldsymbol{\\Sigma}^T = \\begin{bmatrix} \\tilde{\\boldsymbol{\\Sigma}} \\\\ \\boldsymbol{0}\\\\ \\end{bmatrix}\\begin{bmatrix} \\tilde{\\boldsymbol{\\Sigma}} \\boldsymbol{0}\\\\ \\end{bmatrix}=\\begin{bmatrix} \\tilde{\\boldsymbol{\\Sigma}} & \\boldsymbol{0} \\\\ \\boldsymbol{0} & \\boldsymbol{0}\\\\ \\end{bmatrix},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "272b8d77", + "metadata": { + "editable": true + }, + "source": [ + "leading to" + ] + }, + { + "cell_type": "markdown", + "id": "4596a399", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{X}\\boldsymbol{X}^T=\\boldsymbol{U}\\begin{bmatrix} \\tilde{\\boldsymbol{\\Sigma}} & \\boldsymbol{0} \\\\ \\boldsymbol{0} & \\boldsymbol{0}\\\\ \\end{bmatrix}\\boldsymbol{U}^T.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "e15dedbf", + "metadata": { + "editable": true + }, + "source": [ + "Multiplying with $\\boldsymbol{U}$ from the right gives us the eigenvalue problem" + ] + }, + { + "cell_type": "markdown", + "id": "fe9dab27", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "(\\boldsymbol{X}\\boldsymbol{X}^T)\\boldsymbol{U}=\\boldsymbol{U}\\begin{bmatrix} \\tilde{\\boldsymbol{\\Sigma}} & \\boldsymbol{0} \\\\ \\boldsymbol{0} & \\boldsymbol{0}\\\\ \\end{bmatrix}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "894497fb", + "metadata": { + "editable": true + }, + "source": [ + "It means that the eigenvalues of $\\boldsymbol{X}\\boldsymbol{X}^T$ are again given by\n", + "the non-zero singular values plus now a series of zeros. The column\n", + "vectors of $\\boldsymbol{U}$ are the eigenvectors of $\\boldsymbol{X}\\boldsymbol{X}^T$ and\n", + "measure how much correlations are contained in the rows of $\\boldsymbol{X}$.\n", + "\n", + "Since we will mainly be interested in the correlations among the features\n", + "of our data (the columns of $\\boldsymbol{X}$, the quantity of interest for us are the non-zero singular\n", + "values and the column vectors of $\\boldsymbol{V}$." + ] + }, + { + "cell_type": "markdown", + "id": "843092e6", + "metadata": { + "editable": true + }, + "source": [ + "## Ridge and LASSO Regression\n", + "\n", + "Let us remind ourselves about the expression for the standard Mean Squared Error (MSE) which we used to define our cost function and the equations for the ordinary least squares (OLS) method, that is \n", + "our optimization problem is" + ] + }, + { + "cell_type": "markdown", + "id": "4af49ad4", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "{\\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\\}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "ed536a1b", + "metadata": { + "editable": true + }, + "source": [ + "or we can state it as" + ] + }, + { + "cell_type": "markdown", + "id": "9e199dbf", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "{\\displaystyle \\min_{\\boldsymbol{\\beta}\\in\n", + "{\\mathbb{R}}^{p}}}\\frac{1}{n}\\sum_{i=0}^{n-1}\\left(y_i-\\tilde{y}_i\\right)^2=\\frac{1}{n}\\vert\\vert \\boldsymbol{y}-\\boldsymbol{X}\\boldsymbol{\\beta}\\vert\\vert_2^2,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "29d15cda", + "metadata": { + "editable": true + }, + "source": [ + "where we have used the definition of a norm-2 vector, that is" + ] + }, + { + "cell_type": "markdown", + "id": "a9b91956", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\vert\\vert \\boldsymbol{x}\\vert\\vert_2 = \\sqrt{\\sum_i x_i^2}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "f21d533a", + "metadata": { + "editable": true + }, + "source": [ + "By minimizing the above equation with respect to the parameters\n", + "$\\boldsymbol{\\beta}$ we could then obtain an analytical expression for the\n", + "parameters $\\boldsymbol{\\beta}$. We can add a regularization parameter $\\lambda$ by\n", + "defining a new cost function to be optimized, that is" + ] + }, + { + "cell_type": "markdown", + "id": "4f218703", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "{\\displaystyle \\min_{\\boldsymbol{\\beta}\\in\n", + "{\\mathbb{R}}^{p}}}\\frac{1}{n}\\vert\\vert \\boldsymbol{y}-\\boldsymbol{X}\\boldsymbol{\\beta}\\vert\\vert_2^2+\\lambda\\vert\\vert \\boldsymbol{\\beta}\\vert\\vert_2^2\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "6bc40dcd", + "metadata": { + "editable": true + }, + "source": [ + "which leads to the Ridge regression minimization problem where we\n", + "require that $\\vert\\vert \\boldsymbol{\\beta}\\vert\\vert_2^2\\le t$, where $t$ is\n", + "a finite number larger than zero. By defining" + ] + }, + { + "cell_type": "markdown", + "id": "fb27a2e6", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "C(\\boldsymbol{X},\\boldsymbol{\\beta})=\\frac{1}{n}\\vert\\vert \\boldsymbol{y}-\\boldsymbol{X}\\boldsymbol{\\beta}\\vert\\vert_2^2+\\lambda\\vert\\vert \\boldsymbol{\\beta}\\vert\\vert_1,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "d285f7c7", + "metadata": { + "editable": true + }, + "source": [ + "we have a new optimization equation" + ] + }, + { + "cell_type": "markdown", + "id": "57eb55da", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "{\\displaystyle \\min_{\\boldsymbol{\\beta}\\in\n", + "{\\mathbb{R}}^{p}}}\\frac{1}{n}\\vert\\vert \\boldsymbol{y}-\\boldsymbol{X}\\boldsymbol{\\beta}\\vert\\vert_2^2+\\lambda\\vert\\vert \\boldsymbol{\\beta}\\vert\\vert_1\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "94f2f142", + "metadata": { + "editable": true + }, + "source": [ + "which leads to Lasso regression. Lasso stands for least absolute shrinkage and selection operator. \n", + "\n", + "Here we have defined the norm-1 as" + ] + }, + { + "cell_type": "markdown", + "id": "602c806b", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\vert\\vert \\boldsymbol{x}\\vert\\vert_1 = \\sum_i \\vert x_i\\vert.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "c01a7be8", + "metadata": { + "editable": true + }, + "source": [ + "## Deriving the Ridge Regression Equations\n", + "\n", + "Using the matrix-vector expression for Ridge regression and dropping the parameter $1/n$ in front of the standard means squared error equation, we have" + ] + }, + { + "cell_type": "markdown", + "id": "6bbd89f5", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "C(\\boldsymbol{X},\\boldsymbol{\\beta})=\\left\\{(\\boldsymbol{y}-\\boldsymbol{X}\\boldsymbol{\\beta})^T(\\boldsymbol{y}-\\boldsymbol{X}\\boldsymbol{\\beta})\\right\\}+\\lambda\\boldsymbol{\\beta}^T\\boldsymbol{\\beta},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "d5507c15", + "metadata": { + "editable": true + }, + "source": [ + "and \n", + "taking the derivatives with respect to $\\boldsymbol{\\beta}$ we obtain then\n", + "a slightly modified matrix inversion problem which for finite values\n", + "of $\\lambda$ does not suffer from singularity problems. We obtain\n", + "the optimal parameters" + ] + }, + { + "cell_type": "markdown", + "id": "d5eb5c88", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\hat{\\boldsymbol{\\beta}}_{\\mathrm{Ridge}} = \\left(\\boldsymbol{X}^T\\boldsymbol{X}+\\lambda\\boldsymbol{I}\\right)^{-1}\\boldsymbol{X}^T\\boldsymbol{y},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "d59c7c4d", + "metadata": { + "editable": true + }, + "source": [ + "with $\\boldsymbol{I}$ being a $p\\times p$ identity matrix with the constraint that" + ] + }, + { + "cell_type": "markdown", + "id": "81d0dd7f", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\sum_{i=0}^{p-1} \\beta_i^2 \\leq t,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "6807c376", + "metadata": { + "editable": true + }, + "source": [ + "with $t$ a finite positive number. \n", + "\n", + "If we keep the $1/n$ factor, the equation for the optimal $\\beta$ changes to" + ] + }, + { + "cell_type": "markdown", + "id": "89c94248", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\hat{\\boldsymbol{\\beta}}_{\\mathrm{Ridge}} = \\left(\\boldsymbol{X}^T\\boldsymbol{X}+n\\lambda\\boldsymbol{I}\\right)^{-1}\\boldsymbol{X}^T\\boldsymbol{y}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "24f4e74f", + "metadata": { + "editable": true + }, + "source": [ + "In many textbooks the $1/n$ term is often omitted. Note that a library like **Scikit-Learn** does not include the $1/n$ factor in the setup of the cost function.\n", + "\n", + "When we compare this with the ordinary least squares result we have" + ] + }, + { + "cell_type": "markdown", + "id": "eac49311", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\hat{\\boldsymbol{\\beta}}_{\\mathrm{OLS}} = \\left(\\boldsymbol{X}^T\\boldsymbol{X}\\right)^{-1}\\boldsymbol{X}^T\\boldsymbol{y},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "8ad4bc0d", + "metadata": { + "editable": true + }, + "source": [ + "which can lead to singular matrices. However, with the SVD, we can always compute the inverse of the matrix $\\boldsymbol{X}^T\\boldsymbol{X}$.\n", + "\n", + "We see that Ridge regression is nothing but the standard OLS with a\n", + "modified diagonal term added to $\\boldsymbol{X}^T\\boldsymbol{X}$. The consequences, in\n", + "particular for our discussion of the bias-variance tradeoff are rather\n", + "interesting. We will see that for specific values of $\\lambda$, we may\n", + "even reduce the variance of the optimal parameters $\\boldsymbol{\\beta}$. These topics and other related ones, will be discussed after the more linear algebra oriented analysis here.\n", + "\n", + "Using our insights about the SVD of the design matrix $\\boldsymbol{X}$ \n", + "We have already analyzed the OLS solutions in terms of the eigenvectors (the columns) of the right singular value matrix $\\boldsymbol{U}$ as" + ] + }, + { + "cell_type": "markdown", + "id": "af4dd7e2", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\tilde{\\boldsymbol{y}}_{\\mathrm{OLS}}=\\boldsymbol{X}\\boldsymbol{\\beta} =\\boldsymbol{U}\\boldsymbol{U}^T\\boldsymbol{y}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "92b983c6", + "metadata": { + "editable": true + }, + "source": [ + "For Ridge regression this becomes" + ] + }, + { + "cell_type": "markdown", + "id": "f9d22662", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\tilde{\\boldsymbol{y}}_{\\mathrm{Ridge}}=\\boldsymbol{X}\\boldsymbol{\\beta}_{\\mathrm{Ridge}} = \\boldsymbol{U\\Sigma V^T}\\left(\\boldsymbol{V}\\boldsymbol{\\Sigma}^2\\boldsymbol{V}^T+\\lambda\\boldsymbol{I} \\right)^{-1}(\\boldsymbol{U\\Sigma V^T})^T\\boldsymbol{y}=\\sum_{j=0}^{p-1}\\boldsymbol{u}_j\\boldsymbol{u}_j^T\\frac{\\sigma_j^2}{\\sigma_j^2+\\lambda}\\boldsymbol{y},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "0097f163", + "metadata": { + "editable": true + }, + "source": [ + "with the vectors $\\boldsymbol{u}_j$ being the columns of $\\boldsymbol{U}$ from the SVD of the matrix $\\boldsymbol{X}$." + ] + }, + { + "cell_type": "markdown", + "id": "073824a0", + "metadata": { + "editable": true + }, + "source": [ + "## Interpreting the Ridge results\n", + "\n", + "Since $\\lambda \\geq 0$, it means that compared to OLS, we have" + ] + }, + { + "cell_type": "markdown", + "id": "399bdc1b", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\frac{\\sigma_j^2}{\\sigma_j^2+\\lambda} \\leq 1.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "d9d9fa7a", + "metadata": { + "editable": true + }, + "source": [ + "Ridge regression finds the coordinates of $\\boldsymbol{y}$ with respect to the\n", + "orthonormal basis $\\boldsymbol{U}$, it then shrinks the coordinates by\n", + "$\\frac{\\sigma_j^2}{\\sigma_j^2+\\lambda}$. Recall that the SVD has\n", + "eigenvalues ordered in a descending way, that is $\\sigma_i \\geq\n", + "\\sigma_{i+1}$.\n", + "\n", + "For small eigenvalues $\\sigma_i$ it means that their contributions become less important, a fact which can be used to reduce the number of degrees of freedom. More about this when we have covered the material on a statistical interpretation of various linear regression methods." + ] + }, + { + "cell_type": "markdown", + "id": "40b2c49b", + "metadata": { + "editable": true + }, + "source": [ + "## More interpretations\n", + "\n", + "For the sake of simplicity, let us assume that the design matrix is orthonormal, that is" + ] + }, + { + "cell_type": "markdown", + "id": "6e949d98", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{X}^T\\boldsymbol{X}=(\\boldsymbol{X}^T\\boldsymbol{X})^{-1} =\\boldsymbol{I}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "5a004c53", + "metadata": { + "editable": true + }, + "source": [ + "In this case the standard OLS results in" + ] + }, + { + "cell_type": "markdown", + "id": "64e1d6bb", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{\\beta}^{\\mathrm{OLS}} = \\boldsymbol{X}^T\\boldsymbol{y}=\\sum_{i=0}^{n-1}\\boldsymbol{u}_i\\boldsymbol{u}_i^T\\boldsymbol{y},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "5cec9b54", + "metadata": { + "editable": true + }, + "source": [ + "and" + ] + }, + { + "cell_type": "markdown", + "id": "71516f90", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{\\beta}^{\\mathrm{Ridge}} = \\left(\\boldsymbol{I}+\\lambda\\boldsymbol{I}\\right)^{-1}\\boldsymbol{X}^T\\boldsymbol{y}=\\left(1+\\lambda\\right)^{-1}\\boldsymbol{\\beta}^{\\mathrm{OLS}},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "50e288e9", + "metadata": { + "editable": true + }, + "source": [ + "that is the Ridge estimator scales the OLS estimator by the inverse of a factor $1+\\lambda$, and\n", + "the Ridge estimator converges to zero when the hyperparameter goes to\n", + "infinity.\n", + "\n", + "We will come back to more interpreations after we have gone through some of the statistical analysis part. \n", + "\n", + "For more discussions of Ridge and Lasso regression, [Wessel van Wieringen's](https://arxiv.org/abs/1509.09169) article is highly recommended.\n", + "Similarly, [Mehta et al's article](https://arxiv.org/abs/1803.08823) is also recommended." + ] + }, + { + "cell_type": "markdown", + "id": "6c82431c", + "metadata": { + "editable": true + }, + "source": [ + "## Deriving the Lasso Regression Equations\n", + "\n", + "Using the matrix-vector expression for Lasso regression and dropping the parameter $1/n$ in front of the standard means squared error equation, we have the following **cost** function" + ] + }, + { + "cell_type": "markdown", + "id": "5ebc1428", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "C(\\boldsymbol{X},\\boldsymbol{\\beta})=\\left\\{(\\boldsymbol{y}-\\boldsymbol{X}\\boldsymbol{\\beta})^T(\\boldsymbol{y}-\\boldsymbol{X}\\boldsymbol{\\beta})\\right\\}+\\lambda\\vert\\vert\\boldsymbol{\\beta}\\vert\\vert_1,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "8f198345", + "metadata": { + "editable": true + }, + "source": [ + "Taking the derivative with respect to $\\boldsymbol{\\beta}$ and recalling that the derivative of the absolute value is (we drop the boldfaced vector symbol for simplicty)" + ] + }, + { + "cell_type": "markdown", + "id": "443b3080", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\frac{d \\vert \\beta\\vert}{d \\boldsymbol{\\beta}}=\\mathrm{sgn}(\\boldsymbol{\\beta})=\\left\\{\\begin{array}{cc} 1 & \\beta > 0 \\\\-1 & \\beta < 0, \\end{array}\\right.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "e11ec4ea", + "metadata": { + "editable": true + }, + "source": [ + "we have that the derivative of the cost function is" + ] + }, + { + "cell_type": "markdown", + "id": "1d640caa", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\frac{\\partial C(\\boldsymbol{X},\\boldsymbol{\\beta})}{\\partial \\boldsymbol{\\beta}}=-2\\boldsymbol{X}^T(\\boldsymbol{y}-\\boldsymbol{X}\\boldsymbol{\\beta})+\\lambda sgn(\\boldsymbol{\\beta})=0,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "e023f076", + "metadata": { + "editable": true + }, + "source": [ + "and reordering we have" + ] + }, + { + "cell_type": "markdown", + "id": "a4204b50", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{X}^T\\boldsymbol{X}\\boldsymbol{\\beta}+\\lambda sgn(\\boldsymbol{\\beta})=2\\boldsymbol{X}^T\\boldsymbol{y}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "7c9cc257", + "metadata": { + "editable": true + }, + "source": [ + "This equation does not lead to a nice analytical equation as in either Ridge regression or ordinary least squares. This equation can however be solved by using standard convex optimization algorithms using for example the Python package [CVXOPT](https://cvxopt.org/). We will discuss this later." + ] + } + ], + "metadata": { + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.10" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} \ No newline at end of file diff --git a/doc/LectureNotes/_build/jupyter_execute/week35.py b/doc/LectureNotes/_build/jupyter_execute/week35.py new file mode 100644 index 000000000..c28b80fa7 --- /dev/null +++ b/doc/LectureNotes/_build/jupyter_execute/week35.py @@ -0,0 +1,2619 @@ +#!/usr/bin/env python +# coding: utf-8 + +# +# + +# # Week 35: From Ordinary Linear Regression to Ridge and Lasso Regression +# **Morten Hjorth-Jensen**, Department of Physics, University of Oslo and Department of Physics and Astronomy and National Superconducting Cyclotron Laboratory, Michigan State University +# +# Date: **August 28-September 1** + +# ## Plans for week 35 +# +# The main topics are: +# +# 1. Brief repetition from last week +# +# 2. Derivation of the equations for ordinary least squares +# +# 3. Discussion on how to prepare data and examples of applications of linear regression +# +# 4. Material for the lecture on Thursday: Mathematical interpretations of linear regression +# +# 5. Thursday: Ridge and Lasso regression and Singular Value Decomposition + +# ### Reading recommendations: +# +# 1. See lecture notes for week 35 at +# +# 2. Goodfellow, Bengio and Courville, Deep Learning, chapter 2 on linear algebra and sections 3.1-3.10 on elements of statistics +# +# 3. Hastie, Tibshirani and Friedman, The elements of statistical learning, sections 3.1-3.4 + +# ## Why Linear Regression (aka Ordinary Least Squares and family), repeat from last week +# +# We need first a reminder from last week about linear regression. +# +# Fitting a continuous function with linear parameterization in terms of the parameters $\boldsymbol{\beta}$. +# * 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 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 +# +# * Easy to code! And links well with classification problems and logistic regression and neural networks +# +# * Allows for **easy** hands-on understanding of gradient descent methods +# +# * and many more features +# +# For more discussions of Ridge and Lasso regression, [Wessel van Wieringen's](https://arxiv.org/abs/1509.09169) article is highly recommended. +# Similarly, [Mehta et al's article](https://arxiv.org/abs/1803.08823) is also recommended. + +# ## The equations for ordinary least squares +# +# Our data which we want to apply a machine learning method on, consist +# of a set of inputs $\boldsymbol{x}^T=[x_0,x_1,x_2,\dots,x_{n-1}]$ and the +# outputs we want to model $\boldsymbol{y}^T=[y_0,y_1,y_2,\dots,y_{n-1}]$. +# We assume that the output data can be represented (for a regression case) by a continuous function $f$ +# through + +# $$ +# y_i=f(x_i)+\epsilon_i, +# $$ + +# or in general + +# $$ +# \boldsymbol{y}=f(\boldsymbol{x})+\boldsymbol{\epsilon}, +# $$ + +# where $\boldsymbol{\epsilon}$ represents some noise which is normally assumed to +# be distributed via a normal probability distribution with zero mean +# value and a variance $\sigma^2$. +# +# In linear regression we approximate the unknown function with another +# continuous function $\tilde{\boldsymbol{y}}(\boldsymbol{x})$ which depends linearly on +# some unknown parameters +# $\boldsymbol{\beta}^T=[\beta_0,\beta_1,\beta_2,\dots,\beta_{p-1}]$. +# +# Last week we introduced the so-called design matrix in order to define +# the approximation $\boldsymbol{\tilde{y}}$ via the unknown quantity +# $\boldsymbol{\beta}$ as + +# $$ +# \boldsymbol{\tilde{y}}= \boldsymbol{X}\boldsymbol{\beta}, +# $$ + +# and in order to find the optimal parameters $\beta_i$ we defined a function which +# gives a measure of the spread between the values $y_i$ (which +# represent the output values we want to reproduce) and the parametrized +# values $\tilde{y}_i$, namely the so-called cost/loss function. + +# ## The cost/loss function +# +# We used the mean squared error to define the way we measure the quality of our model + +# $$ +# 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\}, +# $$ + +# 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\}. +# $$ + +# This function represents one of many possible ways to define the so-called cost function. +# +# It is also common to define +# the function $C$ as + +# $$ +# C(\boldsymbol{\beta})=\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. + +# ## Interpretations and optimizing our parameters +# +# 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\}, +# $$ + +# can be linked to the variance of the quantity $y_i$ if we interpret the latter as the mean value. +# When linking (see the discussions next week) 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, +# $$ + +# where $\langle y_i \rangle$ is the mean value. Keep in mind also that +# till now we have treated $y_i$ as the exact value. Normally, the +# response (dependent or outcome) variable $y_i$ is the outcome of a +# numerical experiment or another type of experiment and could thus be treated itself as an +# approximation to the true value. It is then always accompanied by an +# error estimate, often limited to a statistical error estimate given by +# 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 + +# $$ +# {\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\}. +# $$ + +# 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, +# $$ + +# 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, +# $$ + +# or in a matrix-vector form as (multiplying away the factor $-2/n$, see derivation below) + +# $$ +# \frac{\partial C(\boldsymbol{\beta})}{\partial \boldsymbol{\beta}^T} = 0 = \boldsymbol{X}^T\left( \boldsymbol{y}-\boldsymbol{X}\boldsymbol{\beta}\right). +# $$ + +# ## Interpretations and optimizing our parameters +# We can rewrite, see the derivations below, + +# $$ +# \frac{\partial C(\boldsymbol{\beta})}{\partial \boldsymbol{\beta}^T} = 0 = \boldsymbol{X}^T\left( \boldsymbol{y}-\boldsymbol{X}\boldsymbol{\beta}\right), +# $$ + +# as + +# $$ +# \boldsymbol{X}^T\boldsymbol{y} = \boldsymbol{X}^T\boldsymbol{X}\boldsymbol{\beta}, +# $$ + +# 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}. +# $$ + +# We note also that since our design matrix is defined as $\boldsymbol{X}\in +# {\mathbb{R}}^{n\times p}$, the product $\boldsymbol{X}^T\boldsymbol{X} \in +# {\mathbb{R}}^{p\times p}$. In the above case we have that $p \ll n$, +# in our case $p=5$ meaning that we end up with inverting a small +# $5\times 5$ matrix. This is a rather common situation, in many cases we end up with low-dimensional +# matrices to invert. The methods discussed here and for many other +# supervised learning algorithms like classification with logistic +# regression or support vector machines, exhibit dimensionalities which +# allow for the usage of direct linear algebra methods such as **LU** decomposition or **Singular Value Decomposition** (SVD) for finding the inverse of the matrix +# $\boldsymbol{X}^T\boldsymbol{X}$. +# +# **Small question**: Do you think the example we have at hand here (the nuclear binding energies) can lead to problems in inverting the matrix $\boldsymbol{X}^T\boldsymbol{X}$? What kind of problems can we expect? + +# ## Some useful matrix and vector expressions +# +# The following matrix and vector relation will be useful here and for +# the rest of the course. Vectors are always written as boldfaced lower +# case letters and matrices as upper case boldfaced letters. In the +# following we will discuss how to calculate derivatives of various +# matrices relevant for machine learning. We will often represent our +# data in terms of matrices and vectors. +# +# Let us introduce first some conventions. We assume that $\boldsymbol{y}$ is a +# vector of length $m$, that is it has $m$ elements $y_0,y_1,\dots, +# y_{m-1}$. By convention we start labeling vectors with the zeroth +# element, as are arrays in Python and C++/C, for example. Similarly, we +# have a vector $\boldsymbol{x}$ of length $n$, that is +# $\boldsymbol{x}^T=[x_0,x_1,\dots, x_{n-1}]$. +# +# We assume also that $\boldsymbol{y}$ is a function of $\boldsymbol{x}$ through some +# given function $f$ + +# $$ +# \boldsymbol{y}=f(\boldsymbol{x}). +# $$ + +# ## The Jacobian +# +# We define the partial derivatives of the various components of $\boldsymbol{y}$ as functions of $x_i$ in terms of the so-called [Jacobian matrix](https://en.wikipedia.org/wiki/Jacobian_matrix_and_determinant) + +# $$ +# \boldsymbol{J}=\frac{\partial \boldsymbol{y}}{\partial \boldsymbol{x}}=\begin{bmatrix} \frac{\partial y_0}{\partial x_0} & \frac{\partial y_0}{\partial x_1} & \frac{\partial y_0}{\partial x_2} & \dots & \dots & \frac{\partial y_0}{\partial x_{n-1}} \\ \frac{\partial y_0}{\partial x_0} & \frac{\partial y_1}{\partial x_1} & \frac{\partial y_1}{\partial x_2} & \dots & \dots & \frac{\partial y_1}{\partial x_{n-1}} \\ +# \frac{\partial y_2}{\partial x_0} & \frac{\partial y_2}{\partial x_1} & \frac{\partial y_2}{\partial x_2} & \dots & \dots & \frac{\partial y_2}{\partial x_{n-1}} \\ +# \dots & \dots & \dots & \dots & \dots & \dots \\ +# \dots & \dots & \dots & \dots & \dots & \dots \\ +# \frac{\partial y_{m-1}}{\partial x_0} & \frac{\partial y_{m-1}}{\partial x_1} & \frac{\partial y_{m-1}}{\partial x_2} & \dots & \dots & \frac{\partial y_{m-1}}{\partial x_{n-1}} \end{bmatrix}, +# $$ + +# which is an $m\times n$ matrix. If $\boldsymbol{x}$ is a scalar, then the +# Jacobian is only a single-column vector, or an $m\times 1$ matrix. If +# on the other hand $\boldsymbol{y}$ is a scalar, the Jacobian becomes a +# $1\times n$ matrix. +# +# When this matrix is a square matrix $m=n$, its determinant is often referred to as the Jacobian +# determinant. Both the matrix and (if $m=n$) the determinant are +# often referred to simply as the Jacobian. The Jacobian matrix represents the differential of $\boldsymbol{y}$ at every point where the +# vector is differentiable. + +# ## Derivatives, example 1 +# +# Let now $\boldsymbol{y}=\boldsymbol{A}\boldsymbol{x}$, where $\boldsymbol{A}$ is an $m\times n$ matrix and the matrix does not depend on $\boldsymbol{x}$. If we write out the vector $\boldsymbol{y}$ compoment by component we have + +# $$ +# y_i = \sum_{j=0}^{n-1}a_{ij}x_j, +# $$ + +# with $\forall i=0,1,2,\dots,m-1$. The individual matrix elements of $\boldsymbol{A}$ are given by the symbol $a_{ij}$. +# It follows that the partial derivatives of $y_i$ with respect to $x_k$ + +# $$ +# \frac{\partial y_i }{\partial x_k}= a_{ik} \forall i=0,1,2,\dots,m-1. +# $$ + +# From this we have, using the definition of the Jacobian + +# $$ +# \frac{\partial \boldsymbol{y} }{\partial \boldsymbol{x}}= \boldsymbol{A}. +# $$ + +# ## Example 2 +# +# We define a scalar (our cost/loss functions are in general also scalars, +# just think of the mean squared error) as the result of some matrix vector +# multiplications + +# $$ +# \alpha = \boldsymbol{y}^T\boldsymbol{A}\boldsymbol{x}, +# $$ + +# with $\boldsymbol{y}$ a vector of length $m$, $\boldsymbol{A}$ an $m\times n$ matrix and $\boldsymbol{x}$ a vector of length $n$. We assume also that $\boldsymbol{A}$ does not depend on any of the two vectors. +# In order to find the derivative of $\alpha$ with respect to the two vectors, we define an intermediate vector $\boldsymbol{z}$. We define first +# $\boldsymbol{z}^T=\boldsymbol{y}^T\boldsymbol{A}$, a vector of length $n$. We have then + +# $$ +# \alpha = \boldsymbol{z}^T\boldsymbol{x}, +# $$ + +# which means that (using our previous example) we have + +# $$ +# \frac{\partial \alpha}{\partial \boldsymbol{x}} = \boldsymbol{z}^T=\boldsymbol{y}^T\boldsymbol{A}. +# $$ + +# Since $\alpha$ is a scalar we have $\alpha =\alpha^T=\boldsymbol{x}^T\boldsymbol{A}^T\boldsymbol{y}$. Defining now $\boldsymbol{z}=\boldsymbol{x}^T\boldsymbol{A}^T$ we find that + +# $$ +# \frac{\partial \alpha}{\partial \boldsymbol{y}} = \boldsymbol{z}^T=\boldsymbol{x}^T\boldsymbol{A}^T. +# $$ + +# ## Example 3 +# +# We start with a new scalar but where now the vector $\boldsymbol{y}$ is +# replaced by a vector $\boldsymbol{x}$ and the matrix $\boldsymbol{A}$ is a square +# matrix with dimension $n\times n$. + +# $$ +# \alpha = \boldsymbol{x}^T\boldsymbol{A}\boldsymbol{x}, +# $$ + +# with $\boldsymbol{x}$ a vector of length $n$. +# +# We write out the specific sums involved in the calculation of $\alpha$ + +# $$ +# \alpha = \sum_{i=0}^{n-1}\sum_{j=0}^{n-1}x_i a_{ij}x_j, +# $$ + +# taking the derivative of $\alpha$ with respect to a given component $x_k$ we get the two sums + +# $$ +# \frac{\partial \alpha}{\partial x_k} = \sum_{i=0}^{n-1}a_{ik}x_i+\sum_{j=0}^{n-1}a_{kj}x_j, +# $$ + +# for $\forall k =0,1,2,\dots,n-1$. We identify these sums as + +# $$ +# \frac{\partial \alpha}{\partial \boldsymbol{x}} = \boldsymbol{x}^T\left(\boldsymbol{A}^T+\boldsymbol{A}\right). +# $$ + +# If the matrix $\boldsymbol{A}$ is symmetric, that is $\boldsymbol{A}=\boldsymbol{A}^T$, we have + +# $$ +# \frac{\partial \alpha}{\partial \boldsymbol{x}} = 2\boldsymbol{x}^T\boldsymbol{A}. +# $$ + +# ## Example 4 +# +# We let the scalar $\alpha$ be defined by + +# $$ +# \alpha = \boldsymbol{y}^T\boldsymbol{x}, +# $$ + +# where both $\boldsymbol{y}$ and $\boldsymbol{x}$ have the same length $n$, or if we +# wish to think of them as column vectors, they have dimensions $n\times +# 1$. We assume that both $\boldsymbol{y}$ and $\boldsymbol{x}$ depend on a vector +# $\boldsymbol{z}$ of the same length. To calculate the derivative of $\alpha$ +# with respect to a given component $z_k$ we need first to write out the +# inner product that defines $\alpha$ as + +# $$ +# \alpha = \sum_{i=0}^{n-1}y_ix_i, +# $$ + +# and the partial derivative + +# $$ +# \frac{\partial \alpha}{\partial z_k} = \sum_{i=0}^{n-1}\left(x_i\frac{\partial y_i}{\partial z_k}+y_i\frac{\partial x_i}{\partial z_k}\right), +# $$ + +# for $\forall k =0,1,2,\dots,n-1$. We can rewrite the partial derivative in a more compact form as + +# $$ +# \frac{\partial \alpha}{\partial \boldsymbol{z}} = \boldsymbol{x}^T\frac{\partial \boldsymbol{y}}{\partial \boldsymbol{z}}+\boldsymbol{y}^T\frac{\partial \boldsymbol{x}}{\partial \boldsymbol{z}}, +# $$ + +# and if $\boldsymbol{y}=\boldsymbol{x}$ we have + +# $$ +# \frac{\partial \alpha}{\partial \boldsymbol{z}} = 2\boldsymbol{x}^T\frac{\partial \boldsymbol{x}}{\partial \boldsymbol{z}}. +# $$ + +# ## The mean squared error and its derivative +# +# We defined earlier a possible cost function using the mean squared error + +# $$ +# 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\}, +# $$ + +# or using the design/feature matrix $\boldsymbol{X}$ we have the more compact matrix-vector + +# $$ +# 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\}. +# $$ + +# We note that the design matrix $\boldsymbol{X}$ does not depend on the unknown parameters defined by the vector $\boldsymbol{\beta}$. +# We are now interested in minimizing the cost function with respect to the unknown parameters $\boldsymbol{\beta}$. +# +# The mean squared error is a scalar and if we use the results from the last example, we define a new vector + +# $$ +# \boldsymbol{w}=\boldsymbol{y}-\boldsymbol{X}\boldsymbol{\beta}, +# $$ + +# which depends on $\boldsymbol{\beta}$. We rewrite the cost function as + +# $$ +# C(\boldsymbol{\beta})=\frac{1}{n}\boldsymbol{w}^T\boldsymbol{w}, +# $$ + +# with partial derivative + +# $$ +# \frac{\partial C(\boldsymbol{\beta})}{\partial \boldsymbol{\beta}}=\frac{2}{n}\boldsymbol{w}^T\frac{\partial \boldsymbol{w}}{\partial \boldsymbol{\beta}}, +# $$ + +# and using that + +# $$ +# \frac{\partial \boldsymbol{w}}{\partial \boldsymbol{\beta}}=-\boldsymbol{X}, +# $$ + +# where we used the result from example two above. Inserting the last expression we obtain + +# $$ +# \frac{\partial C(\boldsymbol{\beta})}{\partial \boldsymbol{\beta}}=-\frac{2}{n}\left(\boldsymbol{y}-\boldsymbol{X}\boldsymbol{\beta}\right)^T\boldsymbol{X}, +# $$ + +# or as + +# $$ +# \frac{\partial C(\boldsymbol{\beta})}{\partial \boldsymbol{\beta}^T}=-\frac{2}{n}\boldsymbol{X}^T\left(\boldsymbol{y}-\boldsymbol{X}\boldsymbol{\beta}\right). +# $$ + +# ## Other useful relations +# +# We list here some other useful relations we may encounter (recall that vectors are defined by boldfaced low-key letters) + +# $$ +# \frac{\partial (\boldsymbol{b}^T\boldsymbol{a})}{\partial \boldsymbol{a}} = \boldsymbol{b}, +# $$ + +# $$ +# \frac{\partial tr(\boldsymbol{B}\boldsymbol{A})}{\partial \boldsymbol{A}} = \boldsymbol{B}^T, +# $$ + +# $$ +# \frac{\partial \log{\vert\boldsymbol{A}\vert}}{\partial \boldsymbol{A}} = (\boldsymbol{A}^{-1})^T. +# $$ + +# ## Meet the Hessian Matrix +# +# A very important matrix we will meet again and again in machine +# learning is the Hessian. It is given by the second derivative of the +# cost function with respect to the parameters $\boldsymbol{\beta}$. Using the above +# expression for derivatives of vectors and matrices, we find that the +# second derivative of the mean squared error as cost function is, + +# $$ +# \frac{\partial}{\partial \boldsymbol{\beta}}\frac{\partial C(\boldsymbol{\beta})}{\partial \boldsymbol{\beta}^T} =\frac{\partial}{\partial \boldsymbol{\beta}}\left[-\frac{2}{n}\boldsymbol{X}^T\left( \boldsymbol{y}-\boldsymbol{X}\boldsymbol{\beta}\right)\right]=\frac{2}{n}\boldsymbol{X}^T\boldsymbol{X}. +# $$ + +# The Hessian matrix plays an important role and is defined here as + +# $$ +# \boldsymbol{H}=\boldsymbol{X}^T\boldsymbol{X}. +# $$ + +# For ordinary least squares, it is inversely proportional (derivation +# next week) with the variance of the optimal parameters +# $\hat{\boldsymbol{\beta}}$. Furthermore, we will see later this week that it is +# (aside the factor $1/n$) equal to the covariance matrix. It plays also a very +# important role in optmization algorithms and Principal Component +# Analysis as a way to reduce the dimensionality of a machine learning/data analysis +# problem. +# +# **Linear algebra question:** Can we use the Hessian matrix to say something about properties of the cost function (our optmization problem)? (hint: think about convex or concave problems and how to relate these to a matrix!). + +# ## Interpretations and optimizing our parameters +# +# The residuals $\boldsymbol{\epsilon}$ are in turn given by + +# $$ +# \boldsymbol{\epsilon} = \boldsymbol{y}-\boldsymbol{\tilde{y}} = \boldsymbol{y}-\boldsymbol{X}\boldsymbol{\beta}, +# $$ + +# and with + +# $$ +# \boldsymbol{X}^T\left( \boldsymbol{y}-\boldsymbol{X}\boldsymbol{\beta}\right)= 0, +# $$ + +# we have + +# $$ +# \boldsymbol{X}^T\boldsymbol{\epsilon}=\boldsymbol{X}^T\left( \boldsymbol{y}-\boldsymbol{X}\boldsymbol{\beta}\right)= 0, +# $$ + +# meaning that the solution for $\boldsymbol{\beta}$ is the one which minimizes the residuals. + +# ## Example relevant for the exercises +# +# In order to understand the relation among the predictors $p$, the set of data $n$ and the target (outcome, output etc) $\boldsymbol{y}$, +# we condiser a simple polynomial fit. +# We assume our data can represented by a fourth-order polynomial. For the $i$th component we have + +# $$ +# \tilde{y}_i = \beta_0+\beta_1x_i+\beta_2x_i^2+\beta_3x_i^3+\beta_4x_i^4. +# $$ + +# we have five predictors/features. The first is the intercept $\beta_0$. The other terms are $\beta_i$ with $i=1,2,3,4$. Furthermore we have $n$ entries for each predictor. It means that our design matrix is a +# $p\times n$ matrix $\boldsymbol{X}$. + +# ## 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}$ and the outputs $\boldsymbol{y}$ we have + +# In[1]: + + +# matrix inversion to find beta +beta = (np.linalg.inv(X.T @ X) @ X.T ) @ y +# and then make the prediction +ytilde = X @ beta + + +# Alternatively, you can use the least squares functionality in **Numpy** as + +# In[2]: + + +fit = np.linalg.lstsq(X, Energies, rcond =None)[0] +ytildenp = np.dot(fit,X.T) + + +# ## Adding error analysis and training set up +# +# We can easily test our fit by computing the $R2$ score that we discussed in connection with the functionality of **Scikit-Learn** in the introductory slides. +# Since we are not using **Scikit-Learn** here we can define our own $R2$ function as + +# In[3]: + + +def R2(y_data, y_model): + return 1 - np.sum((y_data - y_model) ** 2) / np.sum((y_data - np.mean(y_data)) ** 2) + + +# and we would be using it as + +# In[4]: + + +print(R2(Energies,ytilde)) + + +# We can easily add our **MSE** score as + +# In[5]: + + +def MSE(y_data,y_model): + n = np.size(y_model) + return np.sum((y_data-y_model)**2)/n + +print(MSE(Energies,ytilde)) + + +# and finally the relative error as + +# In[6]: + + +def RelativeError(y_data,y_model): + return abs((y_data-y_model)/y_data) +print(RelativeError(Energies, ytilde)) + + +# ## 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. + +# ## The complete code with a simple data set + +# In[7]: + + +get_ipython().run_line_magic('matplotlib', 'inline') + +import os +import numpy as np +import pandas as pd +import matplotlib.pyplot as plt +from sklearn.model_selection import train_test_split + + +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 + +x = np.random.rand(100) +y = 2.0+5*x*x+0.1*np.random.randn(100) + + +# The design matrix now as function of a fourth-order polynomial +X = np.zeros((len(x),5)) +X[:,0] = 1.0 +X[:,1] = x +X[:,2] = x**2 +X[:,3] = x**3 +X[:,4] = x**4 +# We split the data in test and training data +X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2) +# matrix inversion to find beta +beta = np.linalg.inv(X_train.T @ X_train) @ X_train.T @ y_train +print(beta) +# 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)) + + +# ## Making your own test-train splitting + +# In[8]: + + +# equivalently in numpy +def train_test_split_numpy(inputs, labels, train_size, test_size): + n_inputs = len(inputs) + inputs_shuffled = inputs.copy() + labels_shuffled = labels.copy() + + np.random.shuffle(inputs_shuffled) + np.random.shuffle(labels_shuffled) + + train_end = int(n_inputs*train_size) + X_train, X_test = inputs_shuffled[:train_end], inputs_shuffled[train_end:] + Y_train, Y_test = labels_shuffled[:train_end], labels_shuffled[train_end:] + + return X_train, X_test, Y_train, Y_test + + +# But since **scikit-learn** has its own function for doing this and since +# it interfaces easily with **tensorflow** and other libraries, we +# normally recommend using the latter functionality. + +# ## Reducing the number of degrees of freedom, overarching view +# +# Many Machine Learning problems involve thousands or even millions of +# features for each training instance. Not only does this make training +# extremely slow, it can also make it much harder to find a good +# solution, as we will see. This problem is often referred to as the +# curse of dimensionality. Fortunately, in real-world problems, it is +# often possible to reduce the number of features considerably, turning +# an intractable problem into a tractable one. +# +# Later we will discuss some of the most popular dimensionality reduction +# techniques: the principal component analysis (PCA), Kernel PCA, and +# Locally Linear Embedding (LLE). +# +# Principal component analysis and its various variants deal with the +# problem of fitting a low-dimensional [affine +# subspace](https://en.wikipedia.org/wiki/Affine_space) to a set of of +# data points in a high-dimensional space. With its family of methods it +# is one of the most used tools in data modeling, compression and +# visualization. + +# ## Preprocessing our data +# +# Before we proceed however, we will discuss how to preprocess our +# data. Till now and in connection with our previous examples we have +# not met so many cases where we are too sensitive to the scaling of our +# data. Normally the data may need a rescaling and/or may be sensitive +# to extreme values. Scaling the data renders our inputs much more +# suitable for the algorithms we want to employ. +# +# For data sets gathered for real world applications, it is rather normal that +# different features have very different units and +# numerical scales. For example, a data set detailing health habits may include +# features such as **age** in the range $0-80$, and **caloric intake** of order $2000$. +# Many machine learning methods sensitive to the scales of the features and may perform poorly if they +# are very different scales. Therefore, it is typical to scale +# the features in a way to avoid such outlier values. + +# ## Functionality in Scikit-Learn +# +# **Scikit-Learn** has several functions which allow us to rescale the +# data, normally resulting in much better results in terms of various +# accuracy scores. The **StandardScaler** function in **Scikit-Learn** +# ensures that for each feature/predictor we study the mean value is +# zero and the variance is one (every column in the design/feature +# matrix). This scaling has the drawback that it does not ensure that +# we have a particular maximum or minimum in our data set. Another +# function included in **Scikit-Learn** is the **MinMaxScaler** which +# ensures that all features are exactly between $0$ and $1$. The + +# ## More preprocessing +# +# The **Normalizer** scales each data +# point such that the feature vector has a euclidean length of one. In other words, it +# projects a data point on the circle (or sphere in the case of higher dimensions) with a +# radius of 1. This means every data point is scaled by a different number (by the +# inverse of it’s length). +# This normalization is often used when only the direction (or angle) of the data matters, +# not the length of the feature vector. +# +# The **RobustScaler** works similarly to the StandardScaler in that it +# ensures statistical properties for each feature that guarantee that +# they are on the same scale. However, the RobustScaler uses the median +# and quartiles, instead of mean and variance. This makes the +# RobustScaler ignore data points that are very different from the rest +# (like measurement errors). These odd data points are also called +# outliers, and might often lead to trouble for other scaling +# techniques. + +# ## Frequently used scaling functions +# +# Many features are often scaled using standardization to improve performance. In **Scikit-Learn** this is given by the **StandardScaler** function as discussed above. It is easy however to write your own. +# Mathematically, this involves subtracting the mean and divide by the standard deviation over the data set, for each feature: + +# $$ +# x_j^{(i)} \rightarrow \frac{x_j^{(i)} - \overline{x}_j}{\sigma(x_j)}, +# $$ + +# where $\overline{x}_j$ and $\sigma(x_j)$ are the mean and standard deviation, respectively, of the feature $x_j$. +# This ensures that each feature has zero mean and unit standard deviation. For data sets where we do not have the standard deviation or don't wish to calculate it, it is then common to simply set it to one. + +# ## Example of own Standard scaling +# +# Let us consider the following vanilla example where we use both +# **Scikit-Learn** and write our own function as well. We produce a +# simple test design matrix with random numbers. Each column could then +# represent a specific feature whose mean value is subracted. + +# In[9]: + + +import sklearn.linear_model as skl +from sklearn.metrics import mean_squared_error +from sklearn.model_selection import train_test_split +from sklearn.preprocessing import MinMaxScaler, StandardScaler, Normalizer +import numpy as np +import pandas as pd +from IPython.display import display +np.random.seed(100) +# setting up a 10 x 5 matrix +rows = 10 +cols = 5 +X = np.random.randn(rows,cols) +XPandas = pd.DataFrame(X) +display(XPandas) +print(XPandas.mean()) +print(XPandas.std()) +XPandas = (XPandas -XPandas.mean()) +display(XPandas) +# This option does not include the standard deviation +scaler = StandardScaler(with_std=False) +scaler.fit(X) +Xscaled = scaler.transform(X) +display(XPandas-Xscaled) + + +# Small exercise: perform the standard scaling by including the standard deviation and compare with what Scikit-Learn gives. + +# ## Min-Max Scaling +# +# Another commonly used scaling method is min-max scaling. This is very +# useful for when we want the features to lie in a certain interval. To +# scale the feature $x_j$ to the interval $[a, b]$, we can apply the +# transformation + +# $$ +# x_j^{(i)} \rightarrow (b-a)\frac{x_j^{(i)} - \min(x_j)}{\max(x_j) - \min(x_j)} - a +# $$ + +# where $\min(x_j)$ and $\max(x_j)$ return the minimum and maximum value of $x_j$ over the data set, respectively. + +# ## Testing the Means Squared Error as function of Complexity +# +# One of +# the aims is to reproduce Figure 2.11 of [Hastie et al](https://github.com/CompPhysics/MLErasmus/blob/master/doc/Textbooks/elementsstat.pdf). +# +# Our data is defined by $x\in [-3,3]$ with a total of for example $100$ data points. + +# In[10]: + + +np.random.seed() +n = 100 +maxdegree = 14 +# Make data set. +x = np.linspace(-3, 3, n).reshape(-1, 1) +y = np.exp(-x**2) + 1.5 * np.exp(-(x-2)**2)+ np.random.normal(0, 0.1, x.shape) + + +# where $y$ is the function we want to fit with a given polynomial. +# +# Write a first code which sets up a design matrix $X$ defined by a fourth-order polynomial. Scale your data and split it in training and test data. + +# In[11]: + + +import matplotlib.pyplot as plt +import numpy as np +from sklearn.linear_model import LinearRegression +from sklearn.preprocessing import PolynomialFeatures +from sklearn.model_selection import train_test_split +from sklearn.pipeline import make_pipeline + + +np.random.seed(2018) +n = 50 +maxdegree = 5 +# Make data set. +x = np.linspace(-3, 3, n).reshape(-1, 1) +y = np.exp(-x**2) + 1.5 * np.exp(-(x-2)**2)+ np.random.normal(0, 0.1, x.shape) +TestError = np.zeros(maxdegree) +TrainError = np.zeros(maxdegree) +polydegree = np.zeros(maxdegree) +x_train, x_test, y_train, y_test = train_test_split(x, y, test_size=0.2) +scaler = StandardScaler() +scaler.fit(x_train) +x_train_scaled = scaler.transform(x_train) +x_test_scaled = scaler.transform(x_test) + +for degree in range(maxdegree): + model = make_pipeline(PolynomialFeatures(degree=degree), LinearRegression(fit_intercept=False)) + clf = model.fit(x_train_scaled,y_train) + y_fit = clf.predict(x_train_scaled) + y_pred = clf.predict(x_test_scaled) + polydegree[degree] = degree + TestError[degree] = np.mean( np.mean((y_test - y_pred)**2) ) + TrainError[degree] = np.mean( np.mean((y_train - y_fit)**2) ) + +plt.plot(polydegree, TestError, label='Test Error') +plt.plot(polydegree, TrainError, label='Train Error') +plt.legend() +plt.show() + + +# ## More preprocessing examples, two-dimensional example, the Franke function + +# In[12]: + + +# Common imports +import os +import numpy as np +import pandas as pd +import matplotlib.pyplot as plt +import sklearn.linear_model as skl +from sklearn.metrics import mean_squared_error +from sklearn.model_selection import train_test_split +from sklearn.preprocessing import MinMaxScaler, StandardScaler, Normalizer + +# 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 FrankeFunction(x,y): + term1 = 0.75*np.exp(-(0.25*(9*x-2)**2) - 0.25*((9*y-2)**2)) + term2 = 0.75*np.exp(-((9*x+1)**2)/49.0 - 0.1*(9*y+1)) + term3 = 0.5*np.exp(-(9*x-7)**2/4.0 - 0.25*((9*y-3)**2)) + term4 = -0.2*np.exp(-(9*x-4)**2 - (9*y-7)**2) + return term1 + term2 + term3 + term4 + + +def create_X(x, y, n ): + if len(x.shape) > 1: + x = np.ravel(x) + y = np.ravel(y) + + N = len(x) + l = int((n+1)*(n+2)/2) # Number of elements in beta + X = np.ones((N,l)) + + for i in range(1,n+1): + q = int((i)*(i+1)/2) + for k in range(i+1): + X[:,q+k] = (x**(i-k))*(y**k) + + return X + + +# Making meshgrid of datapoints and compute Franke's function +n = 5 +N = 1000 +x = np.sort(np.random.uniform(0, 1, N)) +y = np.sort(np.random.uniform(0, 1, N)) +z = FrankeFunction(x, y) +X = create_X(x, y, n=n) +# split in training and test data +X_train, X_test, y_train, y_test = train_test_split(X,z,test_size=0.2) + + +clf = skl.LinearRegression().fit(X_train, y_train) + +# The mean squared error and R2 score +print("MSE before scaling: {:.2f}".format(mean_squared_error(clf.predict(X_test), y_test))) +print("R2 score before scaling {:.2f}".format(clf.score(X_test,y_test))) + +scaler = StandardScaler() +scaler.fit(X_train) +X_train_scaled = scaler.transform(X_train) +X_test_scaled = scaler.transform(X_test) + +print("Feature min values before scaling:\n {}".format(X_train.min(axis=0))) +print("Feature max values before scaling:\n {}".format(X_train.max(axis=0))) + +print("Feature min values after scaling:\n {}".format(X_train_scaled.min(axis=0))) +print("Feature max values after scaling:\n {}".format(X_train_scaled.max(axis=0))) + +clf = skl.LinearRegression().fit(X_train_scaled, y_train) + + +print("MSE after scaling: {:.2f}".format(mean_squared_error(clf.predict(X_test_scaled), y_test))) +print("R2 score for scaled data: {:.2f}".format(clf.score(X_test_scaled,y_test))) + + +# ## To think about, first part +# +# When you are comparing your own code with for example **Scikit-Learn**'s +# library, there are some technicalities to keep in mind. The examples +# here demonstrate some of these aspects with potential pitfalls. +# +# The discussion here focuses on the role of the intercept, how we can +# set up the design matrix, what scaling we should use and other topics +# which tend confuse us. +# +# The intercept can be interpreted as the expected value of our +# target/output variables when all other predictors are set to zero. +# Thus, if we cannot assume that the expected outputs/targets are zero +# when all predictors are zero (the columns in the design matrix), it +# may be a bad idea to implement a model which penalizes the intercept. +# Furthermore, in for example Ridge and Lasso regression (to be discussed in moe detail next week), the default solutions +# from the library **Scikit-Learn** (when not shrinking $\beta_0$) for the unknown parameters +# $\boldsymbol{\beta}$, are derived under the assumption that both $\boldsymbol{y}$ and +# $\boldsymbol{X}$ are zero centered, that is we subtract the mean values. + +# ## More thinking +# +# If our predictors represent different scales, then it is important to +# standardize the design matrix $\boldsymbol{X}$ by subtracting the mean of each +# column from the corresponding column and dividing the column with its +# standard deviation. Most machine learning libraries do this as a default. This means that if you compare your code with the results from a given library, +# the results may differ. +# +# The +# [Standadscaler](https://scikit-learn.org/stable/modules/generated/sklearn.preprocessing.StandardScaler.html) +# function in **Scikit-Learn** does this for us. For the data sets we +# have been studying in our various examples, the data are in many cases +# already scaled and there is no need to scale them. You as a user of different machine learning algorithms, should always perform a +# survey of your data, with a critical assessment of them in case you need to scale the data. +# +# If you need to scale the data, not doing so will give an *unfair* +# penalization of the parameters since their magnitude depends on the +# scale of their corresponding predictor. +# +# Suppose as an example that you +# you have an input variable given by the heights of different persons. +# Human height might be measured in inches or meters or +# kilometers. If measured in kilometers, a standard linear regression +# model with this predictor would probably give a much bigger +# coefficient term, than if measured in millimeters. +# This can clearly lead to problems in evaluating the cost/loss functions. + +# ## Still thinking +# +# Keep in mind that when you transform your data set before training a model, the same transformation needs to be done +# on your eventual new data set before making a prediction. If we translate this into a Python code, it would could be implemented as follows + +# In[13]: + + +#Model training, we compute the mean value of y and X +y_train_mean = np.mean(y_train) +X_train_mean = np.mean(X_train,axis=0) +X_train = X_train - X_train_mean +y_train = y_train - y_train_mean + +# The we fit our model with the training data +trained_model = some_model.fit(X_train,y_train) + + +#Model prediction, we need also to transform our data set used for the prediction. +X_test = X_test - X_train_mean #Use mean from training data +y_pred = trained_model(X_test) +y_pred = y_pred + y_train_mean + + +# ## What does centering (subtracting the mean values) mean mathematically? +# +# Let us try to understand what this may imply mathematically when we +# subtract the mean values, also known as *zero centering*. For +# simplicity, we will focus on ordinary regression, as done in the above example. +# +# The cost/loss function for regression is + +# $$ +# C(\beta_0, \beta_1, ... , \beta_{p-1}) = \frac{1}{n}\sum_{i=0}^{n} \left(y_i - \beta_0 - \sum_{j=1}^{p-1} X_{ij}\beta_j\right)^2,. +# $$ + +# Recall also that we use the squared value since this leads to an increase of the penalty for higher differences between predicted and output/target values. +# +# What we have done is to single out the $\beta_0$ term in the definition of the mean squared error (MSE). +# The design matrix +# $X$ does in this case not contain any intercept column. +# When we take the derivative with respect to $\beta_0$, we want the derivative to obey + +# $$ +# \frac{\partial C}{\partial \beta_j} = 0, +# $$ + +# for all $j$. For $\beta_0$ we have + +# $$ +# \frac{\partial C}{\partial \beta_0} = -\frac{2}{n}\sum_{i=0}^{n-1} \left(y_i - \beta_0 - \sum_{j=1}^{p-1} X_{ij} \beta_j\right). +# $$ + +# Multiplying away the constant $2/n$, we obtain + +# $$ +# \sum_{i=0}^{n-1} \beta_0 = \sum_{i=0}^{n-1}y_i - \sum_{i=0}^{n-1} \sum_{j=1}^{p-1} X_{ij} \beta_j. +# $$ + +# ## Further Manipulations +# +# Let us special first to the case where we have only two parameters $\beta_0$ and $\beta_1$. +# Our result for $\beta_0$ simplifies then to + +# $$ +# n\beta_0 = \sum_{i=0}^{n-1}y_i - \sum_{i=0}^{n-1} X_{i1} \beta_1. +# $$ + +# We obtain then + +# $$ +# \beta_0 = \frac{1}{n}\sum_{i=0}^{n-1}y_i - \beta_1\frac{1}{n}\sum_{i=0}^{n-1} X_{i1}. +# $$ + +# If we define + +# $$ +# \mu_1=\frac{1}{n}\sum_{i=0}^{n-1} (X_{i1}, +# $$ + +# and if we define the mean value of the outputs as + +# $$ +# \mu_y=\frac{1}{n}\sum_{i=0}^{n-1}y_i, +# $$ + +# we have + +# $$ +# \beta_0 = \mu_y - \beta_1\mu_{1}. +# $$ + +# In the general case, that is we have more parameters than $\beta_0$ and $\beta_1$, we have + +# $$ +# \beta_0 = \frac{1}{n}\sum_{i=0}^{n-1}y_i - \frac{1}{n}\sum_{i=0}^{n-1}\sum_{j=1}^{p-1} X_{ij}\beta_j. +# $$ + +# Replacing $y_i$ with $y_i - y_i - \overline{\boldsymbol{y}}$ and centering also our design matrix results in a cost function (in vector-matrix disguise) + +# $$ +# C(\boldsymbol{\beta}) = (\boldsymbol{\tilde{y}} - \tilde{X}\boldsymbol{\beta})^T(\boldsymbol{\tilde{y}} - \tilde{X}\boldsymbol{\beta}). +# $$ + +# ## Wrapping it up +# +# If we minimize with respect to $\boldsymbol{\beta}$ we have then + +# $$ +# \hat{\boldsymbol{\beta}} = (\tilde{X}^T\tilde{X})^{-1}\tilde{X}^T\boldsymbol{\tilde{y}}, +# $$ + +# where $\boldsymbol{\tilde{y}} = \boldsymbol{y} - \overline{\boldsymbol{y}}$ +# and $\tilde{X}_{ij} = X_{ij} - \frac{1}{n}\sum_{k=0}^{n-1}X_{kj}$. +# +# For Ridge regression we need to add $\lambda \boldsymbol{\beta}^T\boldsymbol{\beta}$ to the cost function and get then + +# $$ +# \hat{\boldsymbol{\beta}} = (\tilde{X}^T\tilde{X} + \lambda I)^{-1}\tilde{X}^T\boldsymbol{\tilde{y}}. +# $$ + +# What does this mean? And why do we insist on all this? Let us look at some examples. + +# ## Linear Regression code, Intercept handling first +# +# This code shows a simple first-order fit to a data set using the above transformed data, where we consider the role of the intercept first, by either excluding it or including it (*code example thanks to Øyvind Sigmundson Schøyen*). Here our scaling of the data is done by subtracting the mean values only. +# Note also that we do not split the data into training and test. + +# In[14]: + + +import numpy as np +import matplotlib.pyplot as plt + +from sklearn.linear_model import LinearRegression + + +np.random.seed(2021) + +def MSE(y_data,y_model): + n = np.size(y_model) + return np.sum((y_data-y_model)**2)/n + + +def fit_beta(X, y): + return np.linalg.pinv(X.T @ X) @ X.T @ y + + +true_beta = [2, 0.5, 3.7] + +x = np.linspace(0, 1, 11) +y = np.sum( + np.asarray([x ** p * b for p, b in enumerate(true_beta)]), axis=0 +) + 0.1 * np.random.normal(size=len(x)) + +degree = 3 +X = np.zeros((len(x), degree)) + +# Include the intercept in the design matrix +for p in range(degree): + X[:, p] = x ** p + +beta = fit_beta(X, y) + +# Intercept is included in the design matrix +skl = LinearRegression(fit_intercept=False).fit(X, y) + +print(f"True beta: {true_beta}") +print(f"Fitted beta: {beta}") +print(f"Sklearn fitted beta: {skl.coef_}") +ypredictOwn = X @ beta +ypredictSKL = skl.predict(X) +print(f"MSE with intercept column") +print(MSE(y,ypredictOwn)) +print(f"MSE with intercept column from SKL") +print(MSE(y,ypredictSKL)) + + +plt.figure() +plt.scatter(x, y, label="Data") +plt.plot(x, X @ beta, label="Fit") +plt.plot(x, skl.predict(X), label="Sklearn (fit_intercept=False)") + + +# Do not include the intercept in the design matrix +X = np.zeros((len(x), degree - 1)) + +for p in range(degree - 1): + X[:, p] = x ** (p + 1) + +# Intercept is not included in the design matrix +skl = LinearRegression(fit_intercept=True).fit(X, y) + +# Use centered values for X and y when computing coefficients +y_offset = np.average(y, axis=0) +X_offset = np.average(X, axis=0) + +beta = fit_beta(X - X_offset, y - y_offset) +intercept = np.mean(y_offset - X_offset @ beta) + +print(f"Manual intercept: {intercept}") +print(f"Fitted beta (wiothout intercept): {beta}") +print(f"Sklearn intercept: {skl.intercept_}") +print(f"Sklearn fitted beta (without intercept): {skl.coef_}") +ypredictOwn = X @ beta +ypredictSKL = skl.predict(X) +print(f"MSE with Manual intercept") +print(MSE(y,ypredictOwn+intercept)) +print(f"MSE with Sklearn intercept") +print(MSE(y,ypredictSKL)) + +plt.plot(x, X @ beta + intercept, "--", label="Fit (manual intercept)") +plt.plot(x, skl.predict(X), "--", label="Sklearn (fit_intercept=True)") +plt.grid() +plt.legend() + +plt.show() + + +# The intercept is the value of our output/target variable +# when all our features are zero and our function crosses the $y$-axis (for a one-dimensional case). +# +# Printing the MSE, we see first that both methods give the same MSE, as +# they should. However, when we move to for example Ridge regression (discussed next week), +# the way we treat the intercept may give a larger or smaller MSE, +# meaning that the MSE can be penalized by the value of the +# intercept. Not including the intercept in the fit, means that the +# regularization term does not include $\beta_0$. For different values +# of $\lambda$, this may lead to differing MSE values. +# +# To remind the reader, the regularization term, with the intercept in Ridge regression is given by + +# $$ +# \lambda \vert\vert \boldsymbol{\beta} \vert\vert_2^2 = \lambda \sum_{j=0}^{p-1}\beta_j^2, +# $$ + +# but when we take out the intercept, this equation becomes + +# $$ +# \lambda \vert\vert \boldsymbol{\beta} \vert\vert_2^2 = \lambda \sum_{j=1}^{p-1}\beta_j^2. +# $$ + +# For Lasso regression we have + +# $$ +# \lambda \vert\vert \boldsymbol{\beta} \vert\vert_1 = \lambda \sum_{j=1}^{p-1}\vert\beta_j\vert. +# $$ + +# It means that, when scaling the design matrix and the outputs/targets, +# by subtracting the mean values, we have an optimization problem which +# is not penalized by the intercept. The MSE value can then be smaller +# since it focuses only on the remaining quantities. If we however bring +# back the intercept, we will get an MSE which then contains the +# intercept. This becomes more important when we discuss Ridge and Lasso +# regression next week. + +# ## The Boston housing data example +# +# The Boston housing +# data set was originally a part of UCI Machine Learning Repository +# and has been removed now. The data set is now included in **Scikit-Learn**'s +# library. There are 506 samples and 13 feature (predictor) variables +# in this data set. The objective is to predict the value of prices of +# the house using the features (predictors) listed here. +# +# The features/predictors are +# 1. CRIM: Per capita crime rate by town +# +# 2. ZN: Proportion of residential land zoned for lots over 25000 square feet +# +# 3. INDUS: Proportion of non-retail business acres per town +# +# 4. CHAS: Charles River dummy variable (= 1 if tract bounds river; 0 otherwise) +# +# 5. NOX: Nitric oxide concentration (parts per 10 million) +# +# 6. RM: Average number of rooms per dwelling +# +# 7. AGE: Proportion of owner-occupied units built prior to 1940 +# +# 8. DIS: Weighted distances to five Boston employment centers +# +# 9. RAD: Index of accessibility to radial highways +# +# 10. TAX: Full-value property tax rate per USD10000 +# +# 11. B: $1000(Bk - 0.63)^2$, where $Bk$ is the proportion of [people of African American descent] by town +# +# 12. LSTAT: Percentage of lower status of the population +# +# 13. MEDV: Median value of owner-occupied homes in USD 1000s + +# ## Housing data, the code +# We start by importing the libraries + +# In[15]: + + +import numpy as np +import matplotlib.pyplot as plt + +import pandas as pd +import seaborn as sns + + +# and load the Boston Housing DataSet from **Scikit-Learn** + +# In[16]: + + +from sklearn.datasets import load_boston + +boston_dataset = load_boston() + +# boston_dataset is a dictionary +# let's check what it contains +boston_dataset.keys() + + +# Then we invoke Pandas + +# In[17]: + + +boston = pd.DataFrame(boston_dataset.data, columns=boston_dataset.feature_names) +boston.head() +boston['MEDV'] = boston_dataset.target + + +# and preprocess the data + +# In[18]: + + +# check for missing values in all the columns +boston.isnull().sum() + + +# We can then visualize the data + +# In[19]: + + +# set the size of the figure +sns.set(rc={'figure.figsize':(11.7,8.27)}) + +# plot a histogram showing the distribution of the target values +sns.distplot(boston['MEDV'], bins=30) +plt.show() + + +# It is now useful to look at the correlation matrix + +# In[20]: + + +# compute the pair wise correlation for all columns +correlation_matrix = boston.corr().round(2) +# use the heatmap function from seaborn to plot the correlation matrix +# annot = True to print the values inside the square +sns.heatmap(data=correlation_matrix, annot=True) + + +# From the above coorelation plot we can see that **MEDV** is strongly correlated to **LSTAT** and **RM**. We see also that **RAD** and **TAX** are stronly correlated, but we don't include this in our features together to avoid multi-colinearity + +# In[21]: + + +plt.figure(figsize=(20, 5)) + +features = ['LSTAT', 'RM'] +target = boston['MEDV'] + +for i, col in enumerate(features): + plt.subplot(1, len(features) , i+1) + x = boston[col] + y = target + plt.scatter(x, y, marker='o') + plt.title(col) + plt.xlabel(col) + plt.ylabel('MEDV') + + +# Now we start training our model + +# In[22]: + + +X = pd.DataFrame(np.c_[boston['LSTAT'], boston['RM']], columns = ['LSTAT','RM']) +Y = boston['MEDV'] + + +# We split the data into training and test sets + +# In[23]: + + +from sklearn.model_selection import train_test_split + +# splits the training and test data set in 80% : 20% +# assign random_state to any value.This ensures consistency. +X_train, X_test, Y_train, Y_test = train_test_split(X, Y, test_size = 0.2, random_state=5) +print(X_train.shape) +print(X_test.shape) +print(Y_train.shape) +print(Y_test.shape) + + +# Then we use the linear regression functionality from **Scikit-Learn** + +# In[24]: + + +from sklearn.linear_model import LinearRegression +from sklearn.metrics import mean_squared_error, r2_score + +lin_model = LinearRegression() +lin_model.fit(X_train, Y_train) + +# model evaluation for training set + +y_train_predict = lin_model.predict(X_train) +rmse = (np.sqrt(mean_squared_error(Y_train, y_train_predict))) +r2 = r2_score(Y_train, y_train_predict) + +print("The model performance for training set") +print("--------------------------------------") +print('RMSE is {}'.format(rmse)) +print('R2 score is {}'.format(r2)) +print("\n") + +# model evaluation for testing set + +y_test_predict = lin_model.predict(X_test) +# root mean square error of the model +rmse = (np.sqrt(mean_squared_error(Y_test, y_test_predict))) + +# r-squared score of the model +r2 = r2_score(Y_test, y_test_predict) + +print("The model performance for testing set") +print("--------------------------------------") +print('RMSE is {}'.format(rmse)) +print('R2 score is {}'.format(r2)) + + +# In[25]: + + +# plotting the y_test vs y_pred +# ideally should have been a straight line +plt.scatter(Y_test, y_test_predict) +plt.show() + + +# ## Material for lecture Thursday, August 31 + +# ## Mathematical Interpretation of Ordinary Least Squares +# +# What is presented here is a mathematical analysis of various regression algorithms (ordinary least squares, Ridge and Lasso Regression). The analysis is based on an important algorithm in linear algebra, the so-called Singular Value Decomposition (SVD). +# +# We have shown that in ordinary least squares the optimal parameters $\beta$ are given by + +# $$ +# \hat{\boldsymbol{\beta}} = \left(\boldsymbol{X}^T\boldsymbol{X}\right)^{-1}\boldsymbol{X}^T\boldsymbol{y}. +# $$ + +# The **hat** over $\boldsymbol{\beta}$ means we have the optimal parameters after minimization of the cost function. +# +# This means that our best model is defined as + +# $$ +# \tilde{\boldsymbol{y}}=\boldsymbol{X}\hat{\boldsymbol{\beta}} = \boldsymbol{X}\left(\boldsymbol{X}^T\boldsymbol{X}\right)^{-1}\boldsymbol{X}^T\boldsymbol{y}. +# $$ + +# We now define a matrix + +# $$ +# \boldsymbol{A}=\boldsymbol{X}\left(\boldsymbol{X}^T\boldsymbol{X}\right)^{-1}\boldsymbol{X}^T. +# $$ + +# We can rewrite + +# $$ +# \tilde{\boldsymbol{y}}=\boldsymbol{X}\hat{\boldsymbol{\beta}} = \boldsymbol{A}\boldsymbol{y}. +# $$ + +# The matrix $\boldsymbol{A}$ has the important property that $\boldsymbol{A}^2=\boldsymbol{A}$. This is the definition of a projection matrix. +# We can then interpret our optimal model $\tilde{\boldsymbol{y}}$ as being represented by an orthogonal projection of $\boldsymbol{y}$ onto a space defined by the column vectors of $\boldsymbol{X}$. In our case here the matrix $\boldsymbol{A}$ is a square matrix. If it is a general rectangular matrix we have an oblique projection matrix. + +# ## Residual Error +# +# We have defined the residual error as + +# $$ +# \boldsymbol{\epsilon}=\boldsymbol{y}-\tilde{\boldsymbol{y}}=\left[\boldsymbol{I}-\boldsymbol{X}\left(\boldsymbol{X}^T\boldsymbol{X}\right)^{-1}\boldsymbol{X}^T\right]\boldsymbol{y}. +# $$ + +# The residual errors are then the projections of $\boldsymbol{y}$ onto the orthogonal component of the space defined by the column vectors of $\boldsymbol{X}$. + +# ## Simple case +# +# If the matrix $\boldsymbol{X}$ is an orthogonal (or unitary in case of complex values) matrix, we have + +# $$ +# \boldsymbol{X}^T\boldsymbol{X}=\boldsymbol{X}\boldsymbol{X}^T = \boldsymbol{I}. +# $$ + +# In this case the matrix $\boldsymbol{A}$ becomes + +# $$ +# \boldsymbol{A}=\boldsymbol{X}\left(\boldsymbol{X}^T\boldsymbol{X}\right)^{-1}\boldsymbol{X}^T)=\boldsymbol{I}, +# $$ + +# and we have the obvious case + +# $$ +# \boldsymbol{\epsilon}=\boldsymbol{y}-\tilde{\boldsymbol{y}}=0. +# $$ + +# This serves also as a useful test of our codes. + +# ## The singular value decomposition +# +# The examples we have looked at so far are cases where we normally can +# invert the matrix $\boldsymbol{X}^T\boldsymbol{X}$. Using a polynomial expansion where we fit of various functions leads to +# row vectors of the design matrix which are essentially orthogonal due +# to the polynomial character of our model. Obtaining the inverse of the +# design matrix is then often done via a so-called LU, QR or Cholesky +# decomposition. +# +# As we will also see in the first project, +# this may +# however not the be case in general and a standard matrix inversion +# algorithm based on say LU, QR or Cholesky decomposition may lead to singularities. We will see examples of this below. +# +# There is however a way to circumvent this problem and also +# gain some insights about the ordinary least squares approach, and +# later shrinkage methods like Ridge and Lasso regressions. +# +# This is given by the **Singular Value Decomposition** (SVD) algorithm, +# perhaps the most powerful linear algebra algorithm. The SVD provides +# a numerically stable matrix decomposition that is used in a large +# swath oc applications and the decomposition is always stable +# numerically. +# +# In machine learning it plays a central role in dealing with for +# example design matrices that may be near singular or singular. +# Furthermore, as we will see here, the singular values can be related +# to the covariance matrix (and thereby the correlation matrix) and in +# turn the variance of a given quantity. It plays also an important role +# in the principal component analysis where high-dimensional data can be +# reduced to the statistically relevant features. + +# ## Linear Regression Problems +# +# One of the typical problems we encounter with linear regression, in particular +# when the matrix $\boldsymbol{X}$ (our so-called design matrix) is high-dimensional, +# are problems with near singular or singular matrices. The column vectors of $\boldsymbol{X}$ +# may be linearly dependent, normally referred to as super-collinearity. +# This means that the matrix may be rank deficient and it is basically impossible to +# to model the data using linear regression. As an example, consider the matrix + +# $$ +# \begin{align*} +# \mathbf{X} & = \left[ +# \begin{array}{rrr} +# 1 & -1 & 2 +# \\ +# 1 & 0 & 1 +# \\ +# 1 & 2 & -1 +# \\ +# 1 & 1 & 0 +# \end{array} \right] +# \end{align*} +# $$ + +# The columns of $\boldsymbol{X}$ are linearly dependent. We see this easily since the +# the first column is the row-wise sum of the other two columns. The rank (more correct, +# the column rank) of a matrix is the dimension of the space spanned by the +# column vectors. Hence, the rank of $\mathbf{X}$ is equal to the number +# of linearly independent columns. In this particular case the matrix has rank 2. +# +# Super-collinearity of an $(n \times p)$-dimensional design matrix $\mathbf{X}$ implies +# that the inverse of the matrix $\boldsymbol{X}^T\boldsymbol{X}$ (the matrix we need to invert to solve the linear regression equations) is non-invertible. If we have a square matrix that does not have an inverse, we say this matrix singular. The example here demonstrates this + +# $$ +# \begin{align*} +# \boldsymbol{X} & = \left[ +# \begin{array}{rr} +# 1 & -1 +# \\ +# 1 & -1 +# \end{array} \right]. +# \end{align*} +# $$ + +# We see easily that $\mbox{det}(\boldsymbol{X}) = x_{11} x_{22} - x_{12} x_{21} = 1 \times (-1) - 1 \times (-1) = 0$. Hence, $\mathbf{X}$ is singular and its inverse is undefined. +# This is equivalent to saying that the matrix $\boldsymbol{X}$ has at least an eigenvalue which is zero. + +# ## Fixing the singularity +# +# If our design matrix $\boldsymbol{X}$ which enters the linear regression problem + +# +#
    +# +# $$ +# \begin{equation} +# \boldsymbol{\beta} = (\boldsymbol{X}^{T} \boldsymbol{X})^{-1} \boldsymbol{X}^{T} \boldsymbol{y}, +# \label{_auto1} \tag{1} +# \end{equation} +# $$ + +# has linearly dependent column vectors, we will not be able to compute the inverse +# of $\boldsymbol{X}^T\boldsymbol{X}$ and we cannot find the parameters (estimators) $\beta_i$. +# The estimators are only well-defined if $(\boldsymbol{X}^{T}\boldsymbol{X})^{-1}$ exits. +# This is more likely to happen when the matrix $\boldsymbol{X}$ is high-dimensional. In this case it is likely to encounter a situation where +# the regression parameters $\beta_i$ cannot be estimated. +# +# A cheap *ad hoc* approach is simply to add a small diagonal component to the matrix to invert, that is we change + +# $$ +# \boldsymbol{X}^{T} \boldsymbol{X} \rightarrow \boldsymbol{X}^{T} \boldsymbol{X}+\lambda \boldsymbol{I}, +# $$ + +# where $\boldsymbol{I}$ is the identity matrix. When we discuss **Ridge** regression this is actually what we end up evaluating. The parameter $\lambda$ is called a hyperparameter. More about this later. + +# ## Basic math of the SVD +# +# From standard linear algebra we know that a square matrix $\boldsymbol{X}$ can be diagonalized if and only it is +# a so-called [normal matrix](https://en.wikipedia.org/wiki/Normal_matrix), that is if $\boldsymbol{X}\in {\mathbb{R}}^{n\times n}$ +# we have $\boldsymbol{X}\boldsymbol{X}^T=\boldsymbol{X}^T\boldsymbol{X}$ or if $\boldsymbol{X}\in {\mathbb{C}}^{n\times n}$ we have $\boldsymbol{X}\boldsymbol{X}^{\dagger}=\boldsymbol{X}^{\dagger}\boldsymbol{X}$. +# The matrix has then a set of eigenpairs + +# $$ +# (\lambda_1,\boldsymbol{u}_1),\dots, (\lambda_n,\boldsymbol{u}_n), +# $$ + +# and the eigenvalues are given by the diagonal matrix + +# $$ +# \boldsymbol{\Sigma}=\mathrm{Diag}(\lambda_1, \dots,\lambda_n). +# $$ + +# The matrix $\boldsymbol{X}$ can be written in terms of an orthogonal/unitary transformation $\boldsymbol{U}$ + +# $$ +# \boldsymbol{X} = \boldsymbol{U}\boldsymbol{\Sigma}\boldsymbol{V}^T, +# $$ + +# with $\boldsymbol{U}\boldsymbol{U}^T=\boldsymbol{I}$ or $\boldsymbol{U}\boldsymbol{U}^{\dagger}=\boldsymbol{I}$. +# +# Not all square matrices are diagonalizable. A matrix like the one discussed above + +# $$ +# \boldsymbol{X} = \begin{bmatrix} +# 1& -1 \\ +# 1& -1\\ +# \end{bmatrix} +# $$ + +# is not diagonalizable, it is a so-called [defective matrix](https://en.wikipedia.org/wiki/Defective_matrix). It is easy to see that the condition +# $\boldsymbol{X}\boldsymbol{X}^T=\boldsymbol{X}^T\boldsymbol{X}$ is not fulfilled. + +# ## The SVD, a Fantastic Algorithm +# +# However, and this is the strength of the SVD algorithm, any general +# matrix $\boldsymbol{X}$ can be decomposed in terms of a diagonal matrix and +# two orthogonal/unitary matrices. The [Singular Value Decompostion +# (SVD) theorem](https://en.wikipedia.org/wiki/Singular_value_decomposition) +# states that a general $m\times n$ matrix $\boldsymbol{X}$ can be written in +# terms of a diagonal matrix $\boldsymbol{\Sigma}$ of dimensionality $m\times n$ +# and two orthognal matrices $\boldsymbol{U}$ and $\boldsymbol{V}$, where the first has +# dimensionality $m \times m$ and the last dimensionality $n\times n$. +# We have then + +# $$ +# \boldsymbol{X} = \boldsymbol{U}\boldsymbol{\Sigma}\boldsymbol{V}^T +# $$ + +# As an example, the above defective matrix can be decomposed as + +# $$ +# \boldsymbol{X} = \frac{1}{\sqrt{2}}\begin{bmatrix} 1& 1 \\ 1& -1\\ \end{bmatrix} \begin{bmatrix} 2& 0 \\ 0& 0\\ \end{bmatrix} \frac{1}{\sqrt{2}}\begin{bmatrix} 1& -1 \\ 1& 1\\ \end{bmatrix}=\boldsymbol{U}\boldsymbol{\Sigma}\boldsymbol{V}^T, +# $$ + +# with eigenvalues $\sigma_1=2$ and $\sigma_2=0$. +# The SVD exits always! +# +# The SVD +# decomposition (singular values) gives eigenvalues +# $\sigma_i\geq\sigma_{i+1}$ for all $i$ and for dimensions larger than $i=p$, the +# eigenvalues (singular values) are zero. +# +# In the general case, where our design matrix $\boldsymbol{X}$ has dimension +# $n\times p$, the matrix is thus decomposed into an $n\times n$ +# orthogonal matrix $\boldsymbol{U}$, a $p\times p$ orthogonal matrix $\boldsymbol{V}$ +# and a diagonal matrix $\boldsymbol{\Sigma}$ with $r=\mathrm{min}(n,p)$ +# singular values $\sigma_i\geq 0$ on the main diagonal and zeros filling +# the rest of the matrix. There are at most $p$ singular values +# assuming that $n > p$. In our regression examples for the nuclear +# masses and the equation of state this is indeed the case, while for +# the Ising model we have $p > n$. These are often cases that lead to +# near singular or singular matrices. +# +# The columns of $\boldsymbol{U}$ are called the left singular vectors while the columns of $\boldsymbol{V}$ are the right singular vectors. + +# ## Economy-size SVD +# +# If we assume that $n > p$, then our matrix $\boldsymbol{U}$ has dimension $n +# \times n$. The last $n-p$ columns of $\boldsymbol{U}$ become however +# irrelevant in our calculations since they are multiplied with the +# zeros in $\boldsymbol{\Sigma}$. +# +# The economy-size decomposition removes extra rows or columns of zeros +# from the diagonal matrix of singular values, $\boldsymbol{\Sigma}$, along with the columns +# in either $\boldsymbol{U}$ or $\boldsymbol{V}$ that multiply those zeros in the expression. +# Removing these zeros and columns can improve execution time +# and reduce storage requirements without compromising the accuracy of +# the decomposition. +# +# If $n > p$, we keep only the first $p$ columns of $\boldsymbol{U}$ and $\boldsymbol{\Sigma}$ has dimension $p\times p$. +# If $p > n$, then only the first $n$ columns of $\boldsymbol{V}$ are computed and $\boldsymbol{\Sigma}$ has dimension $n\times n$. +# The $n=p$ case is obvious, we retain the full SVD. +# In general the economy-size SVD leads to less FLOPS and still conserving the desired accuracy. + +# ## Codes for the SVD + +# In[26]: + + +import numpy as np +# SVD inversion +def SVD(A): + ''' Takes as input a numpy matrix A and returns inv(A) based on singular value decomposition (SVD). + SVD is numerically more stable than the inversion algorithms provided by + numpy and scipy.linalg at the cost of being slower. + ''' + U, S, VT = np.linalg.svd(A,full_matrices=True) + print('test U') + print( (np.transpose(U) @ U - U @np.transpose(U))) + print('test VT') + print( (np.transpose(VT) @ VT - VT @np.transpose(VT))) + print(U) + print(S) + print(VT) + + D = np.zeros((len(U),len(VT))) + for i in range(0,len(VT)): + D[i,i]=S[i] + return U @ D @ VT + + +X = np.array([ [1.0,-1.0], [1.0,-1.0]]) +#X = np.array([[1, 2], [3, 4], [5, 6]]) + +print(X) +C = SVD(X) +# Print the difference between the original matrix and the SVD one +print(C-X) + + +# The matrix $\boldsymbol{X}$ has columns that are linearly dependent. The first +# column is the row-wise sum of the other two columns. The rank of a +# matrix (the column rank) is the dimension of space spanned by the +# column vectors. The rank of the matrix is the number of linearly +# independent columns, in this case just $2$. We see this from the +# singular values when running the above code. Running the standard +# inversion algorithm for matrix inversion with $\boldsymbol{X}^T\boldsymbol{X}$ results +# in the program terminating due to a singular matrix. + +# ## Note about SVD Calculations +# +# The $U$, $S$, and $V$ matrices returned from the **svd()** function +# cannot be multiplied directly. +# +# As you can see from the code, the $S$ vector must be converted into a +# diagonal matrix. This may cause a problem as the size of the matrices +# do not fit the rules of matrix multiplication, where the number of +# columns in a matrix must match the number of rows in the subsequent +# matrix. +# +# If you wish to include the zero singular values, you will need to +# resize the matrices and set up a diagonal matrix as done in the above +# example + +# ## Mathematics of the SVD and implications +# +# Let us take a closer look at the mathematics of the SVD and the various implications for machine learning studies. +# +# Our starting point is our design matrix $\boldsymbol{X}$ of dimension $n\times p$ + +# $$ +# \boldsymbol{X}=\begin{bmatrix} +# x_{0,0} & x_{0,1} & x_{0,2}& \dots & \dots x_{0,p-1}\\ +# x_{1,0} & x_{1,1} & x_{1,2}& \dots & \dots x_{1,p-1}\\ +# x_{2,0} & x_{2,1} & x_{2,2}& \dots & \dots x_{2,p-1}\\ +# \dots & \dots & \dots & \dots \dots & \dots \\ +# x_{n-2,0} & x_{n-2,1} & x_{n-2,2}& \dots & \dots x_{n-2,p-1}\\ +# x_{n-1,0} & x_{n-1,1} & x_{n-1,2}& \dots & \dots x_{n-1,p-1}\\ +# \end{bmatrix}. +# $$ + +# We can SVD decompose our matrix as + +# $$ +# \boldsymbol{X}=\boldsymbol{U}\boldsymbol{\Sigma}\boldsymbol{V}^T, +# $$ + +# where $\boldsymbol{U}$ is an orthogonal matrix of dimension $n\times n$, meaning that $\boldsymbol{U}\boldsymbol{U}^T=\boldsymbol{U}^T\boldsymbol{U}=\boldsymbol{I}_n$. Here $\boldsymbol{I}_n$ is the unit matrix of dimension $n \times n$. +# +# Similarly, $\boldsymbol{V}$ is an orthogonal matrix of dimension $p\times p$, meaning that $\boldsymbol{V}\boldsymbol{V}^T=\boldsymbol{V}^T\boldsymbol{V}=\boldsymbol{I}_p$. Here $\boldsymbol{I}_n$ is the unit matrix of dimension $p \times p$. +# +# Finally $\boldsymbol{\Sigma}$ contains the singular values $\sigma_i$. This matrix has dimension $n\times p$ and the singular values $\sigma_i$ are all positive. The non-zero values are ordered in descending order, that is + +# $$ +# \sigma_0 > \sigma_1 > \sigma_2 > \dots > \sigma_{p-1} > 0. +# $$ + +# All values beyond $p-1$ are all zero. + +# ## Example Matrix +# +# As an example, consider the following $3\times 2$ example for the matrix $\boldsymbol{\Sigma}$ + +# $$ +# \boldsymbol{\Sigma}= +# \begin{bmatrix} +# 2& 0 \\ +# 0 & 1 \\ +# 0 & 0 \\ +# \end{bmatrix} +# $$ + +# The singular values are $\sigma_0=2$ and $\sigma_1=1$. It is common to rewrite the matrix $\boldsymbol{\Sigma}$ as + +# $$ +# \boldsymbol{\Sigma}= +# \begin{bmatrix} +# \boldsymbol{\tilde{\Sigma}}\\ +# \boldsymbol{0}\\ +# \end{bmatrix}, +# $$ + +# where + +# $$ +# \boldsymbol{\tilde{\Sigma}}= +# \begin{bmatrix} +# 2& 0 \\ +# 0 & 1 \\ +# \end{bmatrix}, +# $$ + +# contains only the singular values. Note also (and we will use this below) that + +# $$ +# \boldsymbol{\Sigma}^T\boldsymbol{\Sigma}= +# \begin{bmatrix} +# 4& 0 \\ +# 0 & 1 \\ +# \end{bmatrix}, +# $$ + +# which is a $2\times 2 $ matrix while + +# $$ +# \boldsymbol{\Sigma}\boldsymbol{\Sigma}^T= +# \begin{bmatrix} +# 4& 0 & 0\\ +# 0 & 1 & 0\\ +# 0 & 0 & 0\\ +# \end{bmatrix}, +# $$ + +# is a $3\times 3 $ matrix. The last row and column of this last matrix +# contain only zeros. This will have important consequences for our SVD +# decomposition of the design matrix. + +# ## Setting up the Matrix to be inverted +# +# The matrix that may cause problems for us is $\boldsymbol{X}^T\boldsymbol{X}$. Using the SVD we can rewrite this matrix as + +# $$ +# \boldsymbol{X}^T\boldsymbol{X}=\boldsymbol{V}\boldsymbol{\Sigma}^T\boldsymbol{U}^T\boldsymbol{U}\boldsymbol{\Sigma}\boldsymbol{V}^T, +# $$ + +# and using the orthogonality of the matrix $\boldsymbol{U}$ we have + +# $$ +# \boldsymbol{X}^T\boldsymbol{X}=\boldsymbol{V}\boldsymbol{\Sigma}^T\boldsymbol{\Sigma}\boldsymbol{V}^T. +# $$ + +# We define $\boldsymbol{\Sigma}^T\boldsymbol{\Sigma}=\tilde{\boldsymbol{\Sigma}}^2$ which is a diagonal matrix containing only the singular values squared. It has dimensionality $p \times p$. +# +# We can now insert the result for the matrix $\boldsymbol{X}^T\boldsymbol{X}$ into our equation for ordinary least squares where + +# $$ +# \tilde{y}_{\mathrm{OLS}}=\boldsymbol{X}\left(\boldsymbol{X}^T\boldsymbol{X}\right)^{-1}\boldsymbol{X}^T\boldsymbol{y}, +# $$ + +# and using our SVD decomposition of $\boldsymbol{X}$ we have + +# $$ +# \tilde{y}_{\mathrm{OLS}}=\boldsymbol{U}\boldsymbol{\Sigma}\boldsymbol{V}^T\left(\boldsymbol{V}\tilde{\boldsymbol{\Sigma}}^{2}(\boldsymbol{V}^T\right)^{-1}\boldsymbol{V}\boldsymbol{\Sigma}^T\boldsymbol{U}^T\boldsymbol{y}, +# $$ + +# which gives us, using the orthogonality of the matrices $\boldsymbol{U}$ and $\boldsymbol{V}$, + +# $$ +# \tilde{y}_{\mathrm{OLS}}=\boldsymbol{U}\boldsymbol{U}^T\boldsymbol{y}=\sum_{i=0}^{p-1}\boldsymbol{u}_i\boldsymbol{u}^T_i\boldsymbol{y}, +# $$ + +# It means that the ordinary least square model (with the optimal +# parameters) $\boldsymbol{\tilde{y}}$, corresponds to an orthogonal +# transformation of the output (or target) vector $\boldsymbol{y}$ by the +# vectors of the matrix $\boldsymbol{U}$. Note that the summation ends at $p-1$, +# that is $\boldsymbol{\tilde{y}}\ne \boldsymbol{y}$. + +# ## Further properties (important for our analyses later) +# +# Let us study again $\boldsymbol{X}^T\boldsymbol{X}$ in terms of our SVD, + +# $$ +# \boldsymbol{X}^T\boldsymbol{X}=\boldsymbol{V}\boldsymbol{\Sigma}^T\boldsymbol{U}^T\boldsymbol{U}\boldsymbol{\Sigma}\boldsymbol{V}^T=\boldsymbol{V}\boldsymbol{\Sigma}^T\boldsymbol{\Sigma}\boldsymbol{V}^T. +# $$ + +# If we now multiply from the right with $\boldsymbol{V}$ (using the orthogonality of $\boldsymbol{V}$) we get + +# $$ +# \left(\boldsymbol{X}^T\boldsymbol{X}\right)\boldsymbol{V}=\boldsymbol{V}\boldsymbol{\Sigma}^T\boldsymbol{\Sigma}. +# $$ + +# This means the vectors $\boldsymbol{v}_i$ of the orthogonal matrix $\boldsymbol{V}$ are the eigenvectors of the matrix $\boldsymbol{X}^T\boldsymbol{X}$ +# with eigenvalues given by the singular values squared, that is + +# $$ +# \left(\boldsymbol{X}^T\boldsymbol{X}\right)\boldsymbol{v}_i=\boldsymbol{v}_i\sigma_i^2. +# $$ + +# Similarly, if we use the SVD decomposition for the matrix $\boldsymbol{X}\boldsymbol{X}^T$, we have + +# $$ +# \boldsymbol{X}\boldsymbol{X}^T=\boldsymbol{U}\boldsymbol{\Sigma}\boldsymbol{V}^T\boldsymbol{V}\boldsymbol{\Sigma}^T\boldsymbol{U}^T=\boldsymbol{U}\boldsymbol{\Sigma}\boldsymbol{\Sigma}^T\boldsymbol{U}^T. +# $$ + +# If we now multiply from the right with $\boldsymbol{U}$ (using the orthogonality of $\boldsymbol{U}$) we get + +# $$ +# \left(\boldsymbol{X}\boldsymbol{X}^T\right)\boldsymbol{U}=\boldsymbol{U}\boldsymbol{\Sigma}\boldsymbol{\Sigma}^T. +# $$ + +# This means the vectors $\boldsymbol{u}_i$ of the orthogonal matrix $\boldsymbol{U}$ are the eigenvectors of the matrix $\boldsymbol{X}\boldsymbol{X}^T$ +# with eigenvalues given by the singular values squared, that is + +# $$ +# \left(\boldsymbol{X}\boldsymbol{X}^T\right)\boldsymbol{u}_i=\boldsymbol{u}_i\sigma_i^2. +# $$ + +# **Important note**: we have defined our design matrix $\boldsymbol{X}$ to be an +# $n\times p$ matrix. In most supervised learning cases we have that $n +# \ge p$, and quite often we have $n >> p$. For linear algebra based methods like ordinary least squares or Ridge regression, this leads to a matrix $\boldsymbol{X}^T\boldsymbol{X}$ which is small and thereby easier to handle from a computational point of view (in terms of number of floating point operations). +# +# In our lectures, the number of columns will +# always refer to the number of features in our data set, while the +# number of rows represents the number of data inputs. Note that in +# other texts you may find the opposite notation. This has consequences +# for the definition of for example the covariance matrix and its relation to the SVD. + +# ## Meet the Covariance Matrix +# +# Before we move on to a discussion of Ridge and Lasso regression, we want to show an important example of the above. +# +# We have already noted that the matrix $\boldsymbol{X}^T\boldsymbol{X}$ in ordinary +# least squares is proportional to the second derivative of the cost +# function, that is we have + +# $$ +# \frac{\partial^2 C(\boldsymbol{\beta})}{\partial \boldsymbol{\beta}^T\partial \boldsymbol{\beta}} =\frac{2}{n}\boldsymbol{X}^T\boldsymbol{X}. +# $$ + +# This quantity defines was what is called the Hessian matrix (the second derivative of a function we want to optimize). +# +# The Hessian matrix plays an important role and is defined in this course as + +# $$ +# \boldsymbol{H}=\boldsymbol{X}^T\boldsymbol{X}. +# $$ + +# The Hessian matrix for ordinary least squares is also proportional to +# the covariance matrix. This means also that we can use the SVD to find +# the eigenvalues of the covariance matrix and the Hessian matrix in +# terms of the singular values. Let us develop these arguments, as they will play an important role in our machine learning studies. + +# ## Introducing the Covariance and Correlation functions +# +# Before we discuss the link between for example Ridge regression and the singular value decomposition, we need to remind ourselves about +# the definition of the covariance and the correlation function. These are quantities that play a central role in machine learning methods. +# +# Suppose we have defined two vectors +# $\hat{x}$ and $\hat{y}$ with $n$ elements each. The covariance matrix $\boldsymbol{C}$ is defined as + +# $$ +# \boldsymbol{C}[\boldsymbol{x},\boldsymbol{y}] = \begin{bmatrix} \mathrm{cov}[\boldsymbol{x},\boldsymbol{x}] & \mathrm{cov}[\boldsymbol{x},\boldsymbol{y}] \\ +# \mathrm{cov}[\boldsymbol{y},\boldsymbol{x}] & \mathrm{cov}[\boldsymbol{y},\boldsymbol{y}] \\ +# \end{bmatrix}, +# $$ + +# where for example + +# $$ +# \mathrm{cov}[\boldsymbol{x},\boldsymbol{y}] =\frac{1}{n} \sum_{i=0}^{n-1}(x_i- \overline{x})(y_i- \overline{y}). +# $$ + +# With this definition and recalling that the variance is defined as + +# $$ +# \mathrm{var}[\boldsymbol{x}]=\frac{1}{n} \sum_{i=0}^{n-1}(x_i- \overline{x})^2, +# $$ + +# we can rewrite the covariance matrix as + +# $$ +# \boldsymbol{C}[\boldsymbol{x},\boldsymbol{y}] = \begin{bmatrix} \mathrm{var}[\boldsymbol{x}] & \mathrm{cov}[\boldsymbol{x},\boldsymbol{y}] \\ +# \mathrm{cov}[\boldsymbol{x},\boldsymbol{y}] & \mathrm{var}[\boldsymbol{y}] \\ +# \end{bmatrix}. +# $$ + +# **Note:** we have used $1/n$ in the above definitions of the *sample* variance and covariance. We assume then that we can calculate the exact mean value. +# What you will find in essentially all statistics texts are equations +# with a factor $1/(n-1)$. This is called [Bessel's correction](https://mathworld.wolfram.com/BesselsCorrection.html). This +# method corrects the bias in the estimation of the population variance +# and covariance. It also partially corrects the bias in the estimation +# of the population standard deviation. If you use a library like +# **Scikit-Learn** or **nunmpy's** function calculate the covariance, this +# quantity will be computed with a factor $1/(n-1)$. + +# ## Covariance and Correlation Matrix +# +# The covariance takes values between zero and infinity and may thus +# lead to problems with loss of numerical precision for particularly +# large values. It is common to scale the covariance matrix by +# introducing instead the correlation matrix defined via the so-called +# correlation function + +# $$ +# \mathrm{corr}[\boldsymbol{x},\boldsymbol{y}]=\frac{\mathrm{cov}[\boldsymbol{x},\boldsymbol{y}]}{\sqrt{\mathrm{var}[\boldsymbol{x}] \mathrm{var}[\boldsymbol{y}]}}. +# $$ + +# The correlation function is then given by values $\mathrm{corr}[\boldsymbol{x},\boldsymbol{y}] +# \in [-1,1]$. This avoids eventual problems with too large values. We +# can then define the correlation matrix for the two vectors $\boldsymbol{x}$ +# and $\boldsymbol{y}$ as + +# $$ +# \boldsymbol{K}[\boldsymbol{x},\boldsymbol{y}] = \begin{bmatrix} 1 & \mathrm{corr}[\boldsymbol{x},\boldsymbol{y}] \\ +# \mathrm{corr}[\boldsymbol{y},\boldsymbol{x}] & 1 \\ +# \end{bmatrix}, +# $$ + +# In the above example this is the function we constructed using **pandas**. + +# ## Correlation Function and Design/Feature Matrix +# +# In our derivation of the various regression algorithms like **Ordinary Least Squares** or **Ridge regression** +# we defined the design/feature matrix $\boldsymbol{X}$ as + +# $$ +# \boldsymbol{X}=\begin{bmatrix} +# x_{0,0} & x_{0,1} & x_{0,2}& \dots & \dots x_{0,p-1}\\ +# x_{1,0} & x_{1,1} & x_{1,2}& \dots & \dots x_{1,p-1}\\ +# x_{2,0} & x_{2,1} & x_{2,2}& \dots & \dots x_{2,p-1}\\ +# \dots & \dots & \dots & \dots \dots & \dots \\ +# x_{n-2,0} & x_{n-2,1} & x_{n-2,2}& \dots & \dots x_{n-2,p-1}\\ +# x_{n-1,0} & x_{n-1,1} & x_{n-1,2}& \dots & \dots x_{n-1,p-1}\\ +# \end{bmatrix}, +# $$ + +# with $\boldsymbol{X}\in {\mathbb{R}}^{n\times p}$, with the predictors/features $p$ refering to the column numbers and the +# entries $n$ being the row elements. +# We can rewrite the design/feature matrix in terms of its column vectors as + +# $$ +# \boldsymbol{X}=\begin{bmatrix} \boldsymbol{x}_0 & \boldsymbol{x}_1 & \boldsymbol{x}_2 & \dots & \dots & \boldsymbol{x}_{p-1}\end{bmatrix}, +# $$ + +# with a given vector + +# $$ +# \boldsymbol{x}_i^T = \begin{bmatrix}x_{0,i} & x_{1,i} & x_{2,i}& \dots & \dots x_{n-1,i}\end{bmatrix}. +# $$ + +# With these definitions, we can now rewrite our $2\times 2$ +# correlation/covariance matrix in terms of a moe general design/feature +# matrix $\boldsymbol{X}\in {\mathbb{R}}^{n\times p}$. This leads to a $p\times p$ +# covariance matrix for the vectors $\boldsymbol{x}_i$ with $i=0,1,\dots,p-1$ + +# $$ +# \boldsymbol{C}[\boldsymbol{x}] = \begin{bmatrix} +# \mathrm{var}[\boldsymbol{x}_0] & \mathrm{cov}[\boldsymbol{x}_0,\boldsymbol{x}_1] & \mathrm{cov}[\boldsymbol{x}_0,\boldsymbol{x}_2] & \dots & \dots & \mathrm{cov}[\boldsymbol{x}_0,\boldsymbol{x}_{p-1}]\\ +# \mathrm{cov}[\boldsymbol{x}_1,\boldsymbol{x}_0] & \mathrm{var}[\boldsymbol{x}_1] & \mathrm{cov}[\boldsymbol{x}_1,\boldsymbol{x}_2] & \dots & \dots & \mathrm{cov}[\boldsymbol{x}_1,\boldsymbol{x}_{p-1}]\\ +# \mathrm{cov}[\boldsymbol{x}_2,\boldsymbol{x}_0] & \mathrm{cov}[\boldsymbol{x}_2,\boldsymbol{x}_1] & \mathrm{var}[\boldsymbol{x}_2] & \dots & \dots & \mathrm{cov}[\boldsymbol{x}_2,\boldsymbol{x}_{p-1}]\\ +# \dots & \dots & \dots & \dots & \dots & \dots \\ +# \dots & \dots & \dots & \dots & \dots & \dots \\ +# \mathrm{cov}[\boldsymbol{x}_{p-1},\boldsymbol{x}_0] & \mathrm{cov}[\boldsymbol{x}_{p-1},\boldsymbol{x}_1] & \mathrm{cov}[\boldsymbol{x}_{p-1},\boldsymbol{x}_{2}] & \dots & \dots & \mathrm{var}[\boldsymbol{x}_{p-1}]\\ +# \end{bmatrix}, +# $$ + +# and the correlation matrix + +# $$ +# \boldsymbol{K}[\boldsymbol{x}] = \begin{bmatrix} +# 1 & \mathrm{corr}[\boldsymbol{x}_0,\boldsymbol{x}_1] & \mathrm{corr}[\boldsymbol{x}_0,\boldsymbol{x}_2] & \dots & \dots & \mathrm{corr}[\boldsymbol{x}_0,\boldsymbol{x}_{p-1}]\\ +# \mathrm{corr}[\boldsymbol{x}_1,\boldsymbol{x}_0] & 1 & \mathrm{corr}[\boldsymbol{x}_1,\boldsymbol{x}_2] & \dots & \dots & \mathrm{corr}[\boldsymbol{x}_1,\boldsymbol{x}_{p-1}]\\ +# \mathrm{corr}[\boldsymbol{x}_2,\boldsymbol{x}_0] & \mathrm{corr}[\boldsymbol{x}_2,\boldsymbol{x}_1] & 1 & \dots & \dots & \mathrm{corr}[\boldsymbol{x}_2,\boldsymbol{x}_{p-1}]\\ +# \dots & \dots & \dots & \dots & \dots & \dots \\ +# \dots & \dots & \dots & \dots & \dots & \dots \\ +# \mathrm{corr}[\boldsymbol{x}_{p-1},\boldsymbol{x}_0] & \mathrm{corr}[\boldsymbol{x}_{p-1},\boldsymbol{x}_1] & \mathrm{corr}[\boldsymbol{x}_{p-1},\boldsymbol{x}_{2}] & \dots & \dots & 1\\ +# \end{bmatrix}, +# $$ + +# ## Covariance Matrix Examples +# +# The Numpy function **np.cov** calculates the covariance elements using +# the factor $1/(n-1)$ instead of $1/n$ since it assumes we do not have +# the exact mean values. The following simple function uses the +# **np.vstack** function which takes each vector of dimension $1\times n$ +# and produces a $2\times n$ matrix $\boldsymbol{W}$ +# +# Note that this assumes you have the features as the rows, and the inputs as columns, that is + +# $$ +# \boldsymbol{W} = \begin{bmatrix} x_0 & x_1 & x_2 & \dots & x_{n-2} & x_{n-1} \\ +# y_0 & y_1 & y_2 & \dots & y_{n-2} & y_{n-1} \\ +# \end{bmatrix}, +# $$ + +# which in turn is converted into into the $2\times 2$ covariance matrix +# $\boldsymbol{C}$ via the Numpy function **np.cov()**. We note that we can also calculate +# the mean value of each set of samples $\boldsymbol{x}$ etc using the Numpy +# function **np.mean(x)**. We can also extract the eigenvalues of the +# covariance matrix through the **np.linalg.eig()** function. + +# In[27]: + + +# Importing various packages +import numpy as np +n = 100 +x = np.random.normal(size=n) +print(np.mean(x)) +y = 4+3*x+np.random.normal(size=n) +print(np.mean(y)) +W = np.vstack((x, y)) +C = np.cov(W) +print(C) + + +# ## Correlation Matrix +# +# The previous example can be converted into the correlation matrix by +# simply scaling the matrix elements with the variances. We should also +# subtract the mean values for each column. This leads to the following +# code which sets up the correlations matrix for the previous example in +# a more brute force way. Here we scale the mean values for each column of the design matrix, calculate the relevant mean values and variances and then finally set up the $2\times 2$ correlation matrix (since we have only two vectors). + +# In[28]: + + +import numpy as np +n = 100 +# define two vectors +x = np.random.random(size=n) +y = 4+3*x+np.random.normal(size=n) +#scaling the x and y vectors +x = x - np.mean(x) +y = y - np.mean(y) +variance_x = np.sum(x@x)/n +variance_y = np.sum(y@y)/n +print(variance_x) +print(variance_y) +cov_xy = np.sum(x@y)/n +cov_xx = np.sum(x@x)/n +cov_yy = np.sum(y@y)/n +C = np.zeros((2,2)) +C[0,0]= cov_xx/variance_x +C[1,1]= cov_yy/variance_y +C[0,1]= cov_xy/np.sqrt(variance_y*variance_x) +C[1,0]= C[0,1] +print(C) + + +# We see that the matrix elements along the diagonal are one as they +# should be and that the matrix is symmetric. Furthermore, diagonalizing +# this matrix we easily see that it is a positive definite matrix. +# +# The above procedure with **numpy** can be made more compact if we use **pandas**. + +# ## Correlation Matrix with Pandas +# +# We whow here how we can set up the correlation matrix using **pandas**, as done in this simple code + +# In[29]: + + +import numpy as np +import pandas as pd +n = 10 +x = np.random.normal(size=n) +x = x - np.mean(x) +y = 4+3*x+np.random.normal(size=n) +y = y - np.mean(y) +# Note that we transpose the matrix in order to stay with our ordering n x p +X = (np.vstack((x, y))).T +print(X) +Xpd = pd.DataFrame(X) +print(Xpd) +correlation_matrix = Xpd.corr() +print(correlation_matrix) + + +# We expand this model to the Franke function discussed above. + +# ## Correlation Matrix with Pandas and the Franke function + +# In[30]: + + +# Common imports +import numpy as np +import pandas as pd + + +def FrankeFunction(x,y): + term1 = 0.75*np.exp(-(0.25*(9*x-2)**2) - 0.25*((9*y-2)**2)) + term2 = 0.75*np.exp(-((9*x+1)**2)/49.0 - 0.1*(9*y+1)) + term3 = 0.5*np.exp(-(9*x-7)**2/4.0 - 0.25*((9*y-3)**2)) + term4 = -0.2*np.exp(-(9*x-4)**2 - (9*y-7)**2) + return term1 + term2 + term3 + term4 + + +def create_X(x, y, n ): + if len(x.shape) > 1: + x = np.ravel(x) + y = np.ravel(y) + + N = len(x) + l = int((n+1)*(n+2)/2) # Number of elements in beta + X = np.ones((N,l)) + + for i in range(1,n+1): + q = int((i)*(i+1)/2) + for k in range(i+1): + X[:,q+k] = (x**(i-k))*(y**k) + + return X + + +# Making meshgrid of datapoints and compute Franke's function +n = 4 +N = 100 +x = np.sort(np.random.uniform(0, 1, N)) +y = np.sort(np.random.uniform(0, 1, N)) +z = FrankeFunction(x, y) +X = create_X(x, y, n=n) + +Xpd = pd.DataFrame(X) +# subtract the mean values and set up the covariance matrix +Xpd = Xpd - Xpd.mean() +covariance_matrix = Xpd.cov() +print(covariance_matrix) + + +# We note here that the covariance is zero for the first rows and +# columns since all matrix elements in the design matrix were set to one +# (we are fitting the function in terms of a polynomial of degree $n$). +# +# This means that the variance for these elements will be zero and will +# cause problems when we set up the correlation matrix. We can simply +# drop these elements and construct a correlation +# matrix without these elements. + +# ## Rewriting the Covariance and/or Correlation Matrix +# +# We can rewrite the covariance matrix in a more compact form in terms of the design/feature matrix $\boldsymbol{X}$ as + +# $$ +# \boldsymbol{C}[\boldsymbol{x}] = \frac{1}{n}\boldsymbol{X}^T\boldsymbol{X}= \mathbb{E}[\boldsymbol{X}^T\boldsymbol{X}]. +# $$ + +# To see this let us simply look at a design matrix $\boldsymbol{X}\in {\mathbb{R}}^{2\times 2}$ + +# $$ +# \boldsymbol{X}=\begin{bmatrix} +# x_{00} & x_{01}\\ +# x_{10} & x_{11}\\ +# \end{bmatrix}=\begin{bmatrix} +# \boldsymbol{x}_{0} & \boldsymbol{x}_{1}\\ +# \end{bmatrix}. +# $$ + +# If we then compute the expectation value (note the $1/n$ factor instead of $1/(n-1)$) + +# $$ +# \mathbb{E}[\boldsymbol{X}^T\boldsymbol{X}] = \frac{1}{n}\boldsymbol{X}^T\boldsymbol{X}=\frac{1}{n}\begin{bmatrix} +# x_{00}^2+x_{10}^2 & x_{00}x_{01}+x_{10}x_{11}\\ +# x_{01}x_{00}+x_{11}x_{10} & x_{01}^2+x_{11}^2\\ +# \end{bmatrix}, +# $$ + +# which is just + +# $$ +# \boldsymbol{C}[\boldsymbol{x}_0,\boldsymbol{x}_1] = \boldsymbol{C}[\boldsymbol{x}]=\begin{bmatrix} \mathrm{var}[\boldsymbol{x}_0] & \mathrm{cov}[\boldsymbol{x}_0,\boldsymbol{x}_1] \\ +# \mathrm{cov}[\boldsymbol{x}_1,\boldsymbol{x}_0] & \mathrm{var}[\boldsymbol{x}_1] \\ +# \end{bmatrix}, +# $$ + +# where we wrote $$\boldsymbol{C}[\boldsymbol{x}_0,\boldsymbol{x}_1] = \boldsymbol{C}[\boldsymbol{x}]$$ to indicate that this is the covariance of the vectors $\boldsymbol{x}$ of the design/feature matrix $\boldsymbol{X}$. +# +# It is easy to generalize this to a matrix $\boldsymbol{X}\in {\mathbb{R}}^{n\times p}$. + +# ## Linking with the SVD +# +# We saw earlier that + +# $$ +# \boldsymbol{X}^T\boldsymbol{X}=\boldsymbol{V}\boldsymbol{\Sigma}^T\boldsymbol{U}^T\boldsymbol{U}\boldsymbol{\Sigma}\boldsymbol{V}^T=\boldsymbol{V}\boldsymbol{\Sigma}^T\boldsymbol{\Sigma}\boldsymbol{V}^T. +# $$ + +# Since the matrices here have dimension $p\times p$, with $p$ corresponding to the singular values, we defined earlier the matrix + +# $$ +# \boldsymbol{\Sigma}^T\boldsymbol{\Sigma} = \begin{bmatrix} \tilde{\boldsymbol{\Sigma}} & \boldsymbol{0}\\ \end{bmatrix}\begin{bmatrix} \tilde{\boldsymbol{\Sigma}} \\ \boldsymbol{0}\\ \end{bmatrix}, +# $$ + +# where the tilde-matrix $\tilde{\boldsymbol{\Sigma}}$ is a matrix of dimension $p\times p$ containing only the singular values $\sigma_i$, that is + +# $$ +# \tilde{\boldsymbol{\Sigma}}=\begin{bmatrix} \sigma_0 & 0 & 0 & \dots & 0 & 0 \\ +# 0 & \sigma_1 & 0 & \dots & 0 & 0 \\ +# 0 & 0 & \sigma_2 & \dots & 0 & 0 \\ +# 0 & 0 & 0 & \dots & \sigma_{p-2} & 0 \\ +# 0 & 0 & 0 & \dots & 0 & \sigma_{p-1} \\ +# \end{bmatrix}, +# $$ + +# meaning we can write + +# $$ +# \boldsymbol{X}^T\boldsymbol{X}=\boldsymbol{V}\tilde{\boldsymbol{\Sigma}}^2\boldsymbol{V}^T. +# $$ + +# Multiplying from the right with $\boldsymbol{V}$ (using the orthogonality of $\boldsymbol{V}$) we get + +# $$ +# \left(\boldsymbol{X}^T\boldsymbol{X}\right)\boldsymbol{V}=\boldsymbol{V}\tilde{\boldsymbol{\Sigma}}^2. +# $$ + +# ## What does it mean? +# +# This means the vectors $\boldsymbol{v}_i$ of the orthogonal matrix $\boldsymbol{V}$ +# are the eigenvectors of the matrix $\boldsymbol{X}^T\boldsymbol{X}$ with eigenvalues +# given by the singular values squared, that is + +# $$ +# \left(\boldsymbol{X}^T\boldsymbol{X}\right)\boldsymbol{v}_i=\boldsymbol{v}_i\sigma_i^2. +# $$ + +# In other words, each non-zero singular value of $\boldsymbol{X}$ is a positive +# square root of an eigenvalue of $\boldsymbol{X}^T\boldsymbol{X}$. It means also that +# the columns of $\boldsymbol{V}$ are the eigenvectors of +# $\boldsymbol{X}^T\boldsymbol{X}$. Since we have ordered the singular values of +# $\boldsymbol{X}$ in a descending order, it means that the column vectors +# $\boldsymbol{v}_i$ are hierarchically ordered by how much correlation they +# encode from the columns of $\boldsymbol{X}$. +# +# Note that these are also the eigenvectors and eigenvalues of the +# Hessian matrix. +# +# If we now recall the definition of the covariance matrix (not using +# Bessel's correction) we have + +# $$ +# \boldsymbol{C}[\boldsymbol{X}]=\frac{1}{n}\boldsymbol{X}^T\boldsymbol{X}, +# $$ + +# meaning that every squared non-singular value of $\boldsymbol{X}$ divided by $n$ ( +# the number of samples) are the eigenvalues of the covariance +# matrix. Every singular value of $\boldsymbol{X}$ is thus a positive square +# root of an eigenvalue of $\boldsymbol{X}^T\boldsymbol{X}$. If the matrix $\boldsymbol{X}$ is +# self-adjoint, the singular values of $\boldsymbol{X}$ are equal to the +# absolute value of the eigenvalues of $\boldsymbol{X}$. + +# ## And finally $\boldsymbol{X}\boldsymbol{X}^T$ +# +# For $\boldsymbol{X}\boldsymbol{X}^T$ we found + +# $$ +# \boldsymbol{X}\boldsymbol{X}^T=\boldsymbol{U}\boldsymbol{\Sigma}\boldsymbol{V}^T\boldsymbol{V}\boldsymbol{\Sigma}^T\boldsymbol{U}^T=\boldsymbol{U}\boldsymbol{\Sigma}^T\boldsymbol{\Sigma}\boldsymbol{U}^T. +# $$ + +# Since the matrices here have dimension $n\times n$, we have + +# $$ +# \boldsymbol{\Sigma}\boldsymbol{\Sigma}^T = \begin{bmatrix} \tilde{\boldsymbol{\Sigma}} \\ \boldsymbol{0}\\ \end{bmatrix}\begin{bmatrix} \tilde{\boldsymbol{\Sigma}} \boldsymbol{0}\\ \end{bmatrix}=\begin{bmatrix} \tilde{\boldsymbol{\Sigma}} & \boldsymbol{0} \\ \boldsymbol{0} & \boldsymbol{0}\\ \end{bmatrix}, +# $$ + +# leading to + +# $$ +# \boldsymbol{X}\boldsymbol{X}^T=\boldsymbol{U}\begin{bmatrix} \tilde{\boldsymbol{\Sigma}} & \boldsymbol{0} \\ \boldsymbol{0} & \boldsymbol{0}\\ \end{bmatrix}\boldsymbol{U}^T. +# $$ + +# Multiplying with $\boldsymbol{U}$ from the right gives us the eigenvalue problem + +# $$ +# (\boldsymbol{X}\boldsymbol{X}^T)\boldsymbol{U}=\boldsymbol{U}\begin{bmatrix} \tilde{\boldsymbol{\Sigma}} & \boldsymbol{0} \\ \boldsymbol{0} & \boldsymbol{0}\\ \end{bmatrix}. +# $$ + +# It means that the eigenvalues of $\boldsymbol{X}\boldsymbol{X}^T$ are again given by +# the non-zero singular values plus now a series of zeros. The column +# vectors of $\boldsymbol{U}$ are the eigenvectors of $\boldsymbol{X}\boldsymbol{X}^T$ and +# measure how much correlations are contained in the rows of $\boldsymbol{X}$. +# +# Since we will mainly be interested in the correlations among the features +# of our data (the columns of $\boldsymbol{X}$, the quantity of interest for us are the non-zero singular +# values and the column vectors of $\boldsymbol{V}$. + +# ## Ridge and LASSO Regression +# +# Let us remind ourselves about the expression for the standard Mean Squared Error (MSE) which we used to define our cost function and the equations for the ordinary least squares (OLS) method, that is +# our optimization problem is + +# $$ +# {\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\}. +# $$ + +# or we can state it as + +# $$ +# {\displaystyle \min_{\boldsymbol{\beta}\in +# {\mathbb{R}}^{p}}}\frac{1}{n}\sum_{i=0}^{n-1}\left(y_i-\tilde{y}_i\right)^2=\frac{1}{n}\vert\vert \boldsymbol{y}-\boldsymbol{X}\boldsymbol{\beta}\vert\vert_2^2, +# $$ + +# where we have used the definition of a norm-2 vector, that is + +# $$ +# \vert\vert \boldsymbol{x}\vert\vert_2 = \sqrt{\sum_i x_i^2}. +# $$ + +# By minimizing the above equation with respect to the parameters +# $\boldsymbol{\beta}$ we could then obtain an analytical expression for the +# parameters $\boldsymbol{\beta}$. We can add a regularization parameter $\lambda$ by +# defining a new cost function to be optimized, that is + +# $$ +# {\displaystyle \min_{\boldsymbol{\beta}\in +# {\mathbb{R}}^{p}}}\frac{1}{n}\vert\vert \boldsymbol{y}-\boldsymbol{X}\boldsymbol{\beta}\vert\vert_2^2+\lambda\vert\vert \boldsymbol{\beta}\vert\vert_2^2 +# $$ + +# which leads to the Ridge regression minimization problem where we +# require that $\vert\vert \boldsymbol{\beta}\vert\vert_2^2\le t$, where $t$ is +# a finite number larger than zero. By defining + +# $$ +# C(\boldsymbol{X},\boldsymbol{\beta})=\frac{1}{n}\vert\vert \boldsymbol{y}-\boldsymbol{X}\boldsymbol{\beta}\vert\vert_2^2+\lambda\vert\vert \boldsymbol{\beta}\vert\vert_1, +# $$ + +# we have a new optimization equation + +# $$ +# {\displaystyle \min_{\boldsymbol{\beta}\in +# {\mathbb{R}}^{p}}}\frac{1}{n}\vert\vert \boldsymbol{y}-\boldsymbol{X}\boldsymbol{\beta}\vert\vert_2^2+\lambda\vert\vert \boldsymbol{\beta}\vert\vert_1 +# $$ + +# which leads to Lasso regression. Lasso stands for least absolute shrinkage and selection operator. +# +# Here we have defined the norm-1 as + +# $$ +# \vert\vert \boldsymbol{x}\vert\vert_1 = \sum_i \vert x_i\vert. +# $$ + +# ## Deriving the Ridge Regression Equations +# +# Using the matrix-vector expression for Ridge regression and dropping the parameter $1/n$ in front of the standard means squared error equation, we have + +# $$ +# C(\boldsymbol{X},\boldsymbol{\beta})=\left\{(\boldsymbol{y}-\boldsymbol{X}\boldsymbol{\beta})^T(\boldsymbol{y}-\boldsymbol{X}\boldsymbol{\beta})\right\}+\lambda\boldsymbol{\beta}^T\boldsymbol{\beta}, +# $$ + +# and +# taking the derivatives with respect to $\boldsymbol{\beta}$ we obtain then +# a slightly modified matrix inversion problem which for finite values +# of $\lambda$ does not suffer from singularity problems. We obtain +# the optimal parameters + +# $$ +# \hat{\boldsymbol{\beta}}_{\mathrm{Ridge}} = \left(\boldsymbol{X}^T\boldsymbol{X}+\lambda\boldsymbol{I}\right)^{-1}\boldsymbol{X}^T\boldsymbol{y}, +# $$ + +# with $\boldsymbol{I}$ being a $p\times p$ identity matrix with the constraint that + +# $$ +# \sum_{i=0}^{p-1} \beta_i^2 \leq t, +# $$ + +# with $t$ a finite positive number. +# +# If we keep the $1/n$ factor, the equation for the optimal $\beta$ changes to + +# $$ +# \hat{\boldsymbol{\beta}}_{\mathrm{Ridge}} = \left(\boldsymbol{X}^T\boldsymbol{X}+n\lambda\boldsymbol{I}\right)^{-1}\boldsymbol{X}^T\boldsymbol{y}. +# $$ + +# In many textbooks the $1/n$ term is often omitted. Note that a library like **Scikit-Learn** does not include the $1/n$ factor in the setup of the cost function. +# +# When we compare this with the ordinary least squares result we have + +# $$ +# \hat{\boldsymbol{\beta}}_{\mathrm{OLS}} = \left(\boldsymbol{X}^T\boldsymbol{X}\right)^{-1}\boldsymbol{X}^T\boldsymbol{y}, +# $$ + +# which can lead to singular matrices. However, with the SVD, we can always compute the inverse of the matrix $\boldsymbol{X}^T\boldsymbol{X}$. +# +# We see that Ridge regression is nothing but the standard OLS with a +# modified diagonal term added to $\boldsymbol{X}^T\boldsymbol{X}$. The consequences, in +# particular for our discussion of the bias-variance tradeoff are rather +# interesting. We will see that for specific values of $\lambda$, we may +# even reduce the variance of the optimal parameters $\boldsymbol{\beta}$. These topics and other related ones, will be discussed after the more linear algebra oriented analysis here. +# +# Using our insights about the SVD of the design matrix $\boldsymbol{X}$ +# We have already analyzed the OLS solutions in terms of the eigenvectors (the columns) of the right singular value matrix $\boldsymbol{U}$ as + +# $$ +# \tilde{\boldsymbol{y}}_{\mathrm{OLS}}=\boldsymbol{X}\boldsymbol{\beta} =\boldsymbol{U}\boldsymbol{U}^T\boldsymbol{y}. +# $$ + +# For Ridge regression this becomes + +# $$ +# \tilde{\boldsymbol{y}}_{\mathrm{Ridge}}=\boldsymbol{X}\boldsymbol{\beta}_{\mathrm{Ridge}} = \boldsymbol{U\Sigma V^T}\left(\boldsymbol{V}\boldsymbol{\Sigma}^2\boldsymbol{V}^T+\lambda\boldsymbol{I} \right)^{-1}(\boldsymbol{U\Sigma V^T})^T\boldsymbol{y}=\sum_{j=0}^{p-1}\boldsymbol{u}_j\boldsymbol{u}_j^T\frac{\sigma_j^2}{\sigma_j^2+\lambda}\boldsymbol{y}, +# $$ + +# with the vectors $\boldsymbol{u}_j$ being the columns of $\boldsymbol{U}$ from the SVD of the matrix $\boldsymbol{X}$. + +# ## Interpreting the Ridge results +# +# Since $\lambda \geq 0$, it means that compared to OLS, we have + +# $$ +# \frac{\sigma_j^2}{\sigma_j^2+\lambda} \leq 1. +# $$ + +# Ridge regression finds the coordinates of $\boldsymbol{y}$ with respect to the +# orthonormal basis $\boldsymbol{U}$, it then shrinks the coordinates by +# $\frac{\sigma_j^2}{\sigma_j^2+\lambda}$. Recall that the SVD has +# eigenvalues ordered in a descending way, that is $\sigma_i \geq +# \sigma_{i+1}$. +# +# For small eigenvalues $\sigma_i$ it means that their contributions become less important, a fact which can be used to reduce the number of degrees of freedom. More about this when we have covered the material on a statistical interpretation of various linear regression methods. + +# ## More interpretations +# +# For the sake of simplicity, let us assume that the design matrix is orthonormal, that is + +# $$ +# \boldsymbol{X}^T\boldsymbol{X}=(\boldsymbol{X}^T\boldsymbol{X})^{-1} =\boldsymbol{I}. +# $$ + +# In this case the standard OLS results in + +# $$ +# \boldsymbol{\beta}^{\mathrm{OLS}} = \boldsymbol{X}^T\boldsymbol{y}=\sum_{i=0}^{n-1}\boldsymbol{u}_i\boldsymbol{u}_i^T\boldsymbol{y}, +# $$ + +# and + +# $$ +# \boldsymbol{\beta}^{\mathrm{Ridge}} = \left(\boldsymbol{I}+\lambda\boldsymbol{I}\right)^{-1}\boldsymbol{X}^T\boldsymbol{y}=\left(1+\lambda\right)^{-1}\boldsymbol{\beta}^{\mathrm{OLS}}, +# $$ + +# that is the Ridge estimator scales the OLS estimator by the inverse of a factor $1+\lambda$, and +# the Ridge estimator converges to zero when the hyperparameter goes to +# infinity. +# +# We will come back to more interpreations after we have gone through some of the statistical analysis part. +# +# For more discussions of Ridge and Lasso regression, [Wessel van Wieringen's](https://arxiv.org/abs/1509.09169) article is highly recommended. +# Similarly, [Mehta et al's article](https://arxiv.org/abs/1803.08823) is also recommended. + +# ## Deriving the Lasso Regression Equations +# +# Using the matrix-vector expression for Lasso regression and dropping the parameter $1/n$ in front of the standard means squared error equation, we have the following **cost** function + +# $$ +# C(\boldsymbol{X},\boldsymbol{\beta})=\left\{(\boldsymbol{y}-\boldsymbol{X}\boldsymbol{\beta})^T(\boldsymbol{y}-\boldsymbol{X}\boldsymbol{\beta})\right\}+\lambda\vert\vert\boldsymbol{\beta}\vert\vert_1, +# $$ + +# Taking the derivative with respect to $\boldsymbol{\beta}$ and recalling that the derivative of the absolute value is (we drop the boldfaced vector symbol for simplicty) + +# $$ +# \frac{d \vert \beta\vert}{d \boldsymbol{\beta}}=\mathrm{sgn}(\boldsymbol{\beta})=\left\{\begin{array}{cc} 1 & \beta > 0 \\-1 & \beta < 0, \end{array}\right. +# $$ + +# we have that the derivative of the cost function is + +# $$ +# \frac{\partial C(\boldsymbol{X},\boldsymbol{\beta})}{\partial \boldsymbol{\beta}}=-2\boldsymbol{X}^T(\boldsymbol{y}-\boldsymbol{X}\boldsymbol{\beta})+\lambda sgn(\boldsymbol{\beta})=0, +# $$ + +# and reordering we have + +# $$ +# \boldsymbol{X}^T\boldsymbol{X}\boldsymbol{\beta}+\lambda sgn(\boldsymbol{\beta})=2\boldsymbol{X}^T\boldsymbol{y}. +# $$ + +# This equation does not lead to a nice analytical equation as in either Ridge regression or ordinary least squares. This equation can however be solved by using standard convex optimization algorithms using for example the Python package [CVXOPT](https://cvxopt.org/). We will discuss this later. diff --git a/doc/LectureNotes/_toc.yml b/doc/LectureNotes/_toc.yml index bbc08c8da..44f2bc06f 100644 --- a/doc/LectureNotes/_toc.yml +++ b/doc/LectureNotes/_toc.yml @@ -43,3 +43,5 @@ parts: chapters: - file: exercisesweek34.ipynb - file: week34.ipynb + - file: exercisesweek35.ipynb + - file: week35.ipynb diff --git a/doc/src/week35/exercisesweek35.ipynb b/doc/src/week35/exercisesweek35.ipynb new file mode 100644 index 000000000..7fb80b2bd --- /dev/null +++ b/doc/src/week35/exercisesweek35.ipynb @@ -0,0 +1,352 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "28dad322", + "metadata": {}, + "source": [ + "\n", + "" + ] + }, + { + "cell_type": "markdown", + "id": "9c719aee", + "metadata": {}, + "source": [ + "# Exercises week 35\n", + "**August 28-September 1, 2023**\n", + "\n", + "Date: **Deadline, Friday September 1 at midnight**" + ] + }, + { + "cell_type": "markdown", + "id": "cb1c110e", + "metadata": {}, + "source": [ + "## Exercise 1: Analytical exercises\n", + "\n", + "In this exercise we derive the expressions for various derivatives of\n", + "products of vectors and matrices. Such derivatives are central to the\n", + "optimization of various cost functions. Although we will often use\n", + "automatic differentiation in actual calculations, to be able to have\n", + "analytical expressions is extremely helpful in case we have simpler\n", + "derivatives as well as when we analyze various properties (like second\n", + "derivatives) of the chosen cost functions. Vectors are always written\n", + "as boldfaced lower case letters and matrices as upper case boldfaced\n", + "letters. You will find useful the notes from week 35 on derivatives of vectors and matrices.\n", + "\n", + "Show that" + ] + }, + { + "cell_type": "markdown", + "id": "7e7a925d", + "metadata": {}, + "source": [ + "$$\n", + "\\frac{\\partial (\\boldsymbol{b}^T\\boldsymbol{a})}{\\partial \\boldsymbol{a}} = \\boldsymbol{b},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "1e9b2076", + "metadata": {}, + "source": [ + "and" + ] + }, + { + "cell_type": "markdown", + "id": "451ff3bd", + "metadata": {}, + "source": [ + "$$\n", + "\\frac{\\partial (\\boldsymbol{a}^T\\boldsymbol{A}\\boldsymbol{a})}{\\partial \\boldsymbol{a}} = \\boldsymbol{a}^T(\\boldsymbol{A}+\\boldsymbol{A}^T),\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "d44390bf", + "metadata": {}, + "source": [ + "and" + ] + }, + { + "cell_type": "markdown", + "id": "445324c2", + "metadata": {}, + "source": [ + "$$\n", + "\\frac{\\partial \\left(\\boldsymbol{x}-\\boldsymbol{A}\\boldsymbol{s}\\right)^T\\left(\\boldsymbol{x}-\\boldsymbol{A}\\boldsymbol{s}\\right)}{\\partial \\boldsymbol{s}} = -2\\left(\\boldsymbol{x}-\\boldsymbol{A}\\boldsymbol{s}\\right)^T\\boldsymbol{A},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "e7405149", + "metadata": {}, + "source": [ + "and finally find the second derivative of this function with respect to the vector $\\boldsymbol{s}$. If we replace the vector $\\boldsymbol{s}$ with the unknown parameters $\\boldsymbol{\\beta}$ used to define the ordinary least squares method, we end up with the equations that determine these parameters. The matrix $\\boldsymbol{A}$ is then the design matrix $\\boldsymbol{X}$ and $\\boldsymbol{x}$ here has to be replaced with the outputs $\\boldsymbol{y}$.\n", + "\n", + "The second derivative of the mean squared error is then proportional to the so-called Hessian matrix $\\boldsymbol{H}=\\boldsymbol{X}^T\\boldsymbol{X}$.\n", + "\n", + "**Hint**: In these exercises it is always useful to write out with summation indices the various quantities.\n", + "As an example, consider the function" + ] + }, + { + "cell_type": "markdown", + "id": "3b7eb2f9", + "metadata": {}, + "source": [ + "$$\n", + "f(\\boldsymbol{x}) =\\boldsymbol{A}\\boldsymbol{x},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "52cc515a", + "metadata": {}, + "source": [ + "which reads for a specific component $f_i$ (we define the matrix $\\boldsymbol{A}$ to have dimension $n\\times n$ and the vector $\\boldsymbol{x}$ to have length $n$)" + ] + }, + { + "cell_type": "markdown", + "id": "a76d3703", + "metadata": {}, + "source": [ + "$$\n", + "f_i =\\sum_{j=0}^{n-1}a_{ij}x_j,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "79edf0b7", + "metadata": {}, + "source": [ + "which leads to" + ] + }, + { + "cell_type": "markdown", + "id": "14dd340b", + "metadata": {}, + "source": [ + "$$\n", + "\\frac{\\partial f_i}{\\partial x_j}= a_{ij},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "839010a1", + "metadata": {}, + "source": [ + "and written out in terms of the vector $\\boldsymbol{x}$ we have" + ] + }, + { + "cell_type": "markdown", + "id": "f53fa6eb", + "metadata": {}, + "source": [ + "$$\n", + "\\frac{\\partial f(\\boldsymbol{x})}{\\partial \\boldsymbol{x}}= \\boldsymbol{A}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "fc259c9f", + "metadata": {}, + "source": [ + "## Exercise 2: making your own data and exploring scikit-learn\n", + "\n", + "We will generate our own dataset for a function $y(x)$ where $x \\in\n", + "[0,1]$ and defined by random numbers computed with the uniform\n", + "distribution. The function $y$ is a quadratic polynomial in $x$ with\n", + "added stochastic noise according to the normal distribution $\\cal\n", + "{N}(0,1)$. The following simple Python instructions define our $x$\n", + "and $y$ values (with 100 data points)." + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "id": "a4ad5843", + "metadata": {}, + "outputs": [], + "source": [ + "import numpy as np\n", + "x = np.random.rand(100,1)\n", + "y = 2.0+5*x*x+0.1*np.random.randn(100,1)" + ] + }, + { + "cell_type": "markdown", + "id": "f2162d9e", + "metadata": {}, + "source": [ + "1. Write your own code (following the examples under the [regression notes](https://compphysics.github.io/MachineLearning/doc/LectureNotes/_build/html/chapter1.html)) for computing the parametrization of the data set fitting a second-order polynomial. \n", + "\n", + "2. Use thereafter **scikit-learn** (see again the examples in the regression slides) and compare with your own code. Note here that **scikit-learn** does not include, by default, the intercept. See the discussions on scaling your data in the slides for this week. This type of problems appear in particular if we fit a polynomial with an intercept. \n", + "\n", + "3. Using scikit-learn, compute also the mean squared error, a risk metric corresponding to the expected value of the squared (quadratic) error defined as" + ] + }, + { + "cell_type": "markdown", + "id": "3e68b705", + "metadata": {}, + "source": [ + "$$\n", + "MSE(\\boldsymbol{y},\\boldsymbol{\\tilde{y}}) = \\frac{1}{n}\n", + "\\sum_{i=0}^{n-1}(y_i-\\tilde{y}_i)^2,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "9bcd4cf4", + "metadata": {}, + "source": [ + "and the $R^2$ score function.\n", + "If $\\tilde{\\boldsymbol{y}}_i$ is the predicted value of the $i-th$ sample and $y_i$ is the corresponding true value, then the score $R^2$ is defined as" + ] + }, + { + "cell_type": "markdown", + "id": "bece94d5", + "metadata": {}, + "source": [ + "$$\n", + "R^2(\\boldsymbol{y}, \\tilde{\\boldsymbol{y}}) = 1 - \\frac{\\sum_{i=0}^{n - 1} (y_i - \\tilde{y}_i)^2}{\\sum_{i=0}^{n - 1} (y_i - \\bar{y})^2},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "ec3afe62", + "metadata": {}, + "source": [ + "where we have defined the mean value of $\\boldsymbol{y}$ as" + ] + }, + { + "cell_type": "markdown", + "id": "bf20e50c", + "metadata": {}, + "source": [ + "$$\n", + "\\bar{y} = \\frac{1}{n} \\sum_{i=0}^{n - 1} y_i.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "ce77b9f1", + "metadata": {}, + "source": [ + "You can use the functionality included in scikit-learn. If you feel for it, you can use your own program and define functions which compute the above two functions. \n", + "Discuss the meaning of these results. Try also to vary the coefficient in front of the added stochastic noise term and discuss the quality of the fits." + ] + }, + { + "cell_type": "markdown", + "id": "68933736", + "metadata": {}, + "source": [ + "## Exercise 3: Split data in test and training data\n", + "\n", + "In this exercise we want you to to compute the MSE for the training\n", + "data and the test data as function of the complexity of a polynomial,\n", + "that is the degree of a given polynomial. \n", + "\n", + "The aim is to reproduce Figure 2.11 of [Hastie et al](https://github.com/CompPhysics/MLErasmus/blob/master/doc/Textbooks/elementsstat.pdf).\n", + "Feel free to read the discussions leading to figure 2.11 of Hastie et al. \n", + "\n", + "Our data is defined by $x\\in [-3,3]$ with a total of for example $n=100$ data points. You should try to vary the number of data points $n$ in your analysis." + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "e37ee7a9", + "metadata": {}, + "outputs": [], + "source": [ + "np.random.seed()\n", + "n = 100\n", + "# Make data set.\n", + "x = np.linspace(-3, 3, n).reshape(-1, 1)\n", + "y = np.exp(-x**2) + 1.5 * np.exp(-(x-2)**2)+ np.random.normal(0, 0.1, x.shape)" + ] + }, + { + "cell_type": "markdown", + "id": "b096a6a8", + "metadata": {}, + "source": [ + "where $y$ is the function we want to fit with a given polynomial." + ] + }, + { + "cell_type": "markdown", + "id": "62e4b8f7", + "metadata": {}, + "source": [ + "**a)**\n", + "Write a first code which sets up a design matrix $X$ defined by a fifth-order polynomial and split your data set in training and test data." + ] + }, + { + "cell_type": "markdown", + "id": "3d9241eb", + "metadata": {}, + "source": [ + "**b)**\n", + "Write thereafter (using either **scikit-learn** or your matrix inversion code using for example **numpy**)\n", + "and perform an ordinary least squares fitting and compute the mean squared error for the training data and the test data. These calculations should apply to a model given by a fifth-order polynomial. If you compare your own code with _scikit_learn_, not that the latter does not include by default the intercept. See the discussions on scaling your data in the slides for this week." + ] + }, + { + "cell_type": "markdown", + "id": "6e6d0041", + "metadata": {}, + "source": [ + "**c)**\n", + "Add now a model which allows you to make polynomials up to degree $15$. Perform a standard OLS fitting of the training data and compute the MSE for the training and test data and plot both test and training data MSE as functions of the polynomial degree. Compare what you see with Figure 2.11 of Hastie et al. Comment your results. For which polynomial degree do you find an optimal MSE (smallest value)?" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.10" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +}
    +
    + + + + + + + + +
    + +
    +
    + +
    + + + + + + + + + + + + + + +
    + + + +
    +
    +
    +
    + + + +
    + + +
    +

    Exercises week 35¶

    +

    August 28-September 1, 2023

    +

    Date: Deadline is Friday September 1 at midnight

    +
    +

    Exercise 1: Analytical exercises¶

    +

    In this exercise we derive the expressions for various derivatives of +products of vectors and matrices. Such derivatives are central to the +optimization of various cost functions. Although we will often use +automatic differentiation in actual calculations, to be able to have +analytical expressions is extremely helpful in case we have simpler +derivatives as well as when we analyze various properties (like second +derivatives) of the chosen cost functions. Vectors are always written +as boldfaced lower case letters and matrices as upper case boldfaced +letters. You will find useful the notes from week 35 on derivatives of vectors and matrices.

    +

    Show that

    +
    +\[ +\frac{\partial (\boldsymbol{b}^T\boldsymbol{a})}{\partial \boldsymbol{a}} = \boldsymbol{b}, +\]
    +

    and

    +
    +\[ +\frac{\partial (\boldsymbol{a}^T\boldsymbol{A}\boldsymbol{a})}{\partial \boldsymbol{a}} = \boldsymbol{a}^T(\boldsymbol{A}+\boldsymbol{A}^T), +\]
    +

    and

    +
    +\[ +\frac{\partial \left(\boldsymbol{x}-\boldsymbol{A}\boldsymbol{s}\right)^T\left(\boldsymbol{x}-\boldsymbol{A}\boldsymbol{s}\right)}{\partial \boldsymbol{s}} = -2\left(\boldsymbol{x}-\boldsymbol{A}\boldsymbol{s}\right)^T\boldsymbol{A}, +\]
    +

    and finally find the second derivative of this function with respect to the vector \(\boldsymbol{s}\). If we replace the vector \(\boldsymbol{s}\) with the unknown parameters \(\boldsymbol{\beta}\) used to define the ordinary least squares method, we end up with the equations that determine these parameters. The matrix \(\boldsymbol{A}\) is then the design matrix \(\boldsymbol{X}\) and \(\boldsymbol{x}\) here has to be replaced with the outputs \(\boldsymbol{y}\).

    +

    The second derivative of the mean squared error is then proportional to the so-called Hessian matrix \(\boldsymbol{H}=\boldsymbol{X}^T\boldsymbol{X}\).

    +

    Hint: In these exercises it is always useful to write out with summation indices the various quantities. +As an example, consider the function

    +
    +\[ +f(\boldsymbol{x}) =\boldsymbol{A}\boldsymbol{x}, +\]
    +

    which reads for a specific component \(f_i\) (we define the matrix \(\boldsymbol{A}\) to have dimension \(n\times n\) and the vector \(\boldsymbol{x}\) to have length \(n\))

    +
    +\[ +f_i =\sum_{j=0}^{n-1}a_{ij}x_j, +\]
    +

    which leads to

    +
    +\[ +\frac{\partial f_i}{\partial x_j}= a_{ij}, +\]
    +

    and written out in terms of the vector \(\boldsymbol{x}\) we have

    +
    +\[ +\frac{\partial f(\boldsymbol{x})}{\partial \boldsymbol{x}}= \boldsymbol{A}. +\]
    +
    +
    +

    Exercise 2: making your own data and exploring scikit-learn¶

    +

    We will generate our own dataset for a function \(y(x)\) where \(x \in +[0,1]\) and defined by random numbers computed with the uniform +distribution. The function \(y\) is a quadratic polynomial in \(x\) with +added stochastic noise according to the normal distribution \(\cal +{N}(0,1)\). The following simple Python instructions define our \(x\) +and \(y\) values (with 100 data points).

    +
    +
    +
    import numpy as np
    +x = np.random.rand(100,1)
    +y = 2.0+5*x*x+0.1*np.random.randn(100,1)
    +
    +
    +
    +
    +
      +
    1. Write your own code (following the examples under the regression notes) for computing the parametrization of the data set fitting a second-order polynomial.

    2. +
    3. Use thereafter scikit-learn (see again the examples in the slides for week 35) and compare with your own code. Note here that scikit-learn does not include, by default, the intercept. See the discussions on scaling your data in the slides for this week. This type of problems appear in particular if we fit a polynomial with an intercept.

    4. +
    5. Using scikit-learn, compute also the mean squared error, a risk metric corresponding to the expected value of the squared (quadratic) error defined as

    6. +
    +
    +\[ +MSE(\boldsymbol{y},\boldsymbol{\tilde{y}}) = \frac{1}{n} +\sum_{i=0}^{n-1}(y_i-\tilde{y}_i)^2, +\]
    +

    and the \(R^2\) score function. +If \(\tilde{\boldsymbol{y}}_i\) is the predicted value of the \(i-th\) sample and \(y_i\) is the corresponding true value, then the score \(R^2\) is defined as

    +
    +\[ +R^2(\boldsymbol{y}, \tilde{\boldsymbol{y}}) = 1 - \frac{\sum_{i=0}^{n - 1} (y_i - \tilde{y}_i)^2}{\sum_{i=0}^{n - 1} (y_i - \bar{y})^2}, +\]
    +

    where we have defined the mean value of \(\boldsymbol{y}\) as

    +
    +\[ +\bar{y} = \frac{1}{n} \sum_{i=0}^{n - 1} y_i. +\]
    +

    You can use the functionality included in scikit-learn. If you feel for it, you can use your own program and define functions which compute the above two functions. +Discuss the meaning of these results. Try also to vary the coefficient in front of the added stochastic noise term and discuss the quality of the fits.

    +
    +
    +

    Exercise 3: Split data in test and training data¶

    +

    In this exercise we want you to to compute the MSE for the training +data and the test data as function of the complexity of a polynomial, +that is the degree of a given polynomial.

    +

    The aim is to reproduce Figure 2.11 of Hastie et al. +Feel free to read the discussions leading to figure 2.11 of Hastie et al.

    +

    Our data is defined by \(x\in [-3,3]\) with a total of for example \(n=100\) data points. You should try to vary the number of data points \(n\) in your analysis.

    +
    +
    +
    np.random.seed()
    +n = 100
    +# Make data set.
    +x = np.linspace(-3, 3, n).reshape(-1, 1)
    +y = np.exp(-x**2) + 1.5 * np.exp(-(x-2)**2)+ np.random.normal(0, 0.1, x.shape)
    +
    +
    +
    +
    +

    where \(y\) is the function we want to fit with a given polynomial.

    +

    a) +Write a first code which sets up a design matrix \(X\) defined by a fifth-order polynomial and split your data set in training and test data.

    +

    b) +Write thereafter (using either scikit-learn or your matrix inversion code using for example numpy) +and perform an ordinary least squares fitting and compute the mean squared error for the training data and the test data. These calculations should apply to a model given by a fifth-order polynomial. If you compare your own code with scikit_learn, not that the latter does not include by default the intercept. See the discussions on scaling your data in the slides for this week.

    +

    c) +Add now a model which allows you to make polynomials up to degree \(15\). Perform a standard OLS fitting of the training data and compute the MSE for the training and test data and plot both test and training data MSE as functions of the polynomial degree. Compare what you see with Figure 2.11 of Hastie et al. Comment your results. For which polynomial degree do you find an optimal MSE (smallest value)?

    +
    +
    + + + + +
    + + + + + +
    +
    + +
    + + +
    +