lecture 5 completed

This commit is contained in:
Andreaierardi 2020-04-12 19:35:06 +02:00
parent 416b3bad3b
commit 8f333d6e22
21 changed files with 1289 additions and 187 deletions

View File

@ -1,3 +1,6 @@
\documentclass[../main.tex]{subfiles}
\begin{document}
\section{Lecture 10 - 07-04-2020}
\subsection{TO BE DEFINE}
@ -89,4 +92,6 @@ Depends on dimension: curse of dimensionality
$
\ell_d(f*) = 0 \iff min\{ \eta(x), 1-\eta(x)\} =0 \quad$ with probability = 1
\\
to be true $\eta(x) \in \{0,1\}$
to be true $\eta(x) \in \{0,1\}$
\end{document}

View File

@ -1,4 +1,4 @@
This is pdfTeX, Version 3.14159265-2.6-1.40.21 (MiKTeX 2.9.7300 64-bit) (preloaded format=pdflatex 2020.4.12) 12 APR 2020 16:28
This is pdfTeX, Version 3.14159265-2.6-1.40.21 (MiKTeX 2.9.7300 64-bit) (preloaded format=pdflatex 2020.4.12) 12 APR 2020 16:33
entering extended mode
**./lecture4.tex
(lecture4.tex
@ -161,43 +161,33 @@ Underfull \hbox (badness 10000) in paragraph at lines 15--17
[]
Underfull \hbox (badness 10000) in paragraph at lines 19--20
[]
Underfull \hbox (badness 10000) in paragraph at lines 21--39
[]
Underfull \hbox (badness 10000) in paragraph at lines 39--40
Underfull \hbox (badness 10000) in paragraph at lines 42--66
[]
Underfull \hbox (badness 10000) in paragraph at lines 42--66
[]
Underfull \hbox (badness 10000) in paragraph at lines 42--66
[]
Underfull \hbox (badness 10000) in paragraph at lines 42--66
[]
[1
{C:/Users/AndreDany/AppData/Local/MiKTeX/2.9/pdftex/config/pdftex.map}]
Underfull \hbox (badness 10000) in paragraph at lines 42--66
[]
Underfull \hbox (badness 10000) in paragraph at lines 42--66
[]
Underfull \hbox (badness 10000) in paragraph at lines 42--66
[]
Underfull \hbox (badness 10000) in paragraph at lines 42--66
[]
Underfull \hbox (badness 10000) in paragraph at lines 68--70
[]
@ -284,7 +274,7 @@ s/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmr8.pfb><E:/Program Files/MiKTeX 2
/type1/public/amsfonts/cm/cmsy8.pfb><E:/Program Files/MiKTeX 2.9/fonts/type1/pu
blic/amsfonts/cm/cmti12.pfb><E:/Program Files/MiKTeX 2.9/fonts/type1/public/ams
fonts/symbols/msbm10.pfb>
Output written on lecture4.pdf (4 pages, 125496 bytes).
Output written on lecture4.pdf (4 pages, 125307 bytes).
PDF statistics:
64 PDF objects out of 1000 (max. 8388607)
0 named destinations out of 1000 (max. 500000)

View File

@ -6,7 +6,7 @@
We spoke about Knn classifier with voronoi diagram
$$
\hat{\ell}(\hnn) = 0 \qquad \forall Traning set
\hat{\ell}(\hnn) = 0 \qquad \forall \, \textit{Traning set}
$$
\\
$\hnn$ predictor needs to store entire dataset.
@ -16,7 +16,7 @@ Computing $\hnn(x)$ requires computing distances between x and points in the tra
\\
$$
\Theta(d) \quad \textit{time for each distance}
$$\\
$$
NN $\rightarrow$ 1-NN\\
We can generalise NN in K-NN with $k = 1,3,5,7$ so odd $K$ \\
@ -36,7 +36,7 @@ $K = 1$ error is 0.\\
In the second line we switch to $k =3$. Second point doesnt switch and third will
be classify to positive and we have training mistake.\\
Switches corresponds to border of voronoi partition.
$$\knn \qquad \textit{For multiclass classification}$$\\
$$\knn \qquad \textit{For multiclass classification}$$
$$
(|Y| > 2 ) \qquad \textit{for regression } Y\equiv \barra{R}
$$

View File

@ -0,0 +1,8 @@
\relax
\@nameuse{bbl@beforestart}
\babel@aux{english}{}
\@writefile{toc}{\contentsline {section}{\numberline {1}Lecture 5 - 07-04-2020}{1}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {1.1}Tree Classifier}{1}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {1.2}Jensens inequality}{2}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {1.3}Tree Predictor}{4}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {1.4}Statistical model for Machine Learning}{5}\protected@file@percent }

View File

@ -0,0 +1,445 @@
This is pdfTeX, Version 3.14159265-2.6-1.40.21 (MiKTeX 2.9.7300 64-bit) (preloaded format=pdflatex 2020.4.12) 12 APR 2020 19:32
entering extended mode
**./lecture5.tex
(lecture5.tex
LaTeX2e <2020-02-02> patch level 2
L3 programming layer <2020-02-14>
("E:\Program Files\MiKTeX 2.9\tex/latex/subfiles\subfiles.cls"
Document Class: subfiles 2020/02/14 v1.6 Multi-file projects (class)
Preamble taken from file `../main.tex'
("E:\Program Files\MiKTeX 2.9\tex/latex/tools\verbatim.sty"
Package: verbatim 2019/11/10 v1.5r LaTeX2e package for verbatim enhancements
\every@verbatim=\toks14
\verbatim@line=\toks15
\verbatim@in@stream=\read2
)
("E:\Program Files\MiKTeX 2.9\tex/latex/import\import.sty"
Package: import 2020/04/01 v 6.2
) (../main.tex
("E:\Program Files\MiKTeX 2.9\tex/latex/base\article.cls"
Document Class: article 2019/12/20 v1.4l Standard LaTeX document class
("E:\Program Files\MiKTeX 2.9\tex/latex/base\size12.clo"
File: size12.clo 2019/12/20 v1.4l Standard LaTeX file (size option)
)
\c@part=\count167
\c@section=\count168
\c@subsection=\count169
\c@subsubsection=\count170
\c@paragraph=\count171
\c@subparagraph=\count172
\c@figure=\count173
\c@table=\count174
\abovecaptionskip=\skip47
\belowcaptionskip=\skip48
\bibindent=\dimen134
)
("E:\Program Files\MiKTeX 2.9\tex/latex/amsmath\amsmath.sty"
Package: amsmath 2020/01/20 v2.17e AMS math features
\@mathmargin=\skip49
For additional information on amsmath, use the `?' option.
("E:\Program Files\MiKTeX 2.9\tex/latex/amsmath\amstext.sty"
Package: amstext 2000/06/29 v2.01 AMS text
("E:\Program Files\MiKTeX 2.9\tex/latex/amsmath\amsgen.sty"
File: amsgen.sty 1999/11/30 v2.0 generic functions
\@emptytoks=\toks16
\ex@=\dimen135
))
("E:\Program Files\MiKTeX 2.9\tex/latex/amsmath\amsbsy.sty"
Package: amsbsy 1999/11/29 v1.2d Bold Symbols
\pmbraise@=\dimen136
)
("E:\Program Files\MiKTeX 2.9\tex/latex/amsmath\amsopn.sty"
Package: amsopn 2016/03/08 v2.02 operator names
)
\inf@bad=\count175
LaTeX Info: Redefining \frac on input line 227.
\uproot@=\count176
\leftroot@=\count177
LaTeX Info: Redefining \overline on input line 389.
\classnum@=\count178
\DOTSCASE@=\count179
LaTeX Info: Redefining \ldots on input line 486.
LaTeX Info: Redefining \dots on input line 489.
LaTeX Info: Redefining \cdots on input line 610.
\Mathstrutbox@=\box45
\strutbox@=\box46
\big@size=\dimen137
LaTeX Font Info: Redeclaring font encoding OML on input line 733.
LaTeX Font Info: Redeclaring font encoding OMS on input line 734.
\macc@depth=\count180
\c@MaxMatrixCols=\count181
\dotsspace@=\muskip16
\c@parentequation=\count182
\dspbrk@lvl=\count183
\tag@help=\toks17
\row@=\count184
\column@=\count185
\maxfields@=\count186
\andhelp@=\toks18
\eqnshift@=\dimen138
\alignsep@=\dimen139
\tagshift@=\dimen140
\tagwidth@=\dimen141
\totwidth@=\dimen142
\lineht@=\dimen143
\@envbody=\toks19
\multlinegap=\skip50
\multlinetaggap=\skip51
\mathdisplay@stack=\toks20
LaTeX Info: Redefining \[ on input line 2859.
LaTeX Info: Redefining \] on input line 2860.
)
("E:\Program Files\MiKTeX 2.9\tex/latex/systeme\systeme.sty"
("E:\Program Files\MiKTeX 2.9\tex/latex/xstring\xstring.sty"
("E:\Program Files\MiKTeX 2.9\tex/generic/xstring\xstring.tex"
\integerpart=\count187
\decimalpart=\count188
)
Package: xstring 2019/02/06 v1.83 String manipulations (CT)
)
("E:\Program Files\MiKTeX 2.9\tex/generic/systeme\systeme.tex"
\SYS_systemecode=\toks21
\SYS_systempreamble=\toks22
\SYSeqnum=\count189
)
Package: systeme 2019/01/13 v0.32 Mise en forme de systemes d'equations (CT)
)
("E:\Program Files\MiKTeX 2.9\tex/latex/amsfonts\amssymb.sty"
Package: amssymb 2013/01/14 v3.01 AMS font symbols
("E:\Program Files\MiKTeX 2.9\tex/latex/amsfonts\amsfonts.sty"
Package: amsfonts 2013/01/14 v3.01 Basic AMSFonts support
\symAMSa=\mathgroup4
\symAMSb=\mathgroup5
LaTeX Font Info: Redeclaring math symbol \hbar on input line 98.
LaTeX Font Info: Overwriting math alphabet `\mathfrak' in version `bold'
(Font) U/euf/m/n --> U/euf/b/n on input line 106.
))
("E:\Program Files\MiKTeX 2.9\tex/latex/subfiles\subfiles.sty"
Package: subfiles 2020/02/14 v1.6 Multi-file projects (package)
)
("E:\Program Files\MiKTeX 2.9\tex/generic/babel\babel.sty"
Package: babel 2020/02/14 3.40 The Babel package
("E:\Program Files\MiKTeX 2.9\tex/generic/babel\switch.def"
File: switch.def 2020/02/14 3.40 Babel switching mechanism
)
*************************************
* Local config file bblopts.cfg used
*
("E:\Program Files\MiKTeX 2.9\tex/latex/arabi\bblopts.cfg"
File: bblopts.cfg 2005/09/08 v0.1 add Arabic and Farsi to "declared" options of
babel
)
("E:\Program Files\MiKTeX 2.9\tex/latex/babel-english\english.ldf"
Language: english 2017/06/06 v3.3r English support from the babel system
("E:\Program Files\MiKTeX 2.9\tex/generic/babel\babel.def"
File: babel.def 2020/02/14 3.40 Babel common definitions
\babel@savecnt=\count190
\U@D=\dimen144
("E:\Program Files\MiKTeX 2.9\tex/generic/babel\txtbabel.def")
\bbl@readstream=\read3
\bbl@dirlevel=\count191
)
Package babel Info: \l@canadian = using hyphenrules for english
(babel) (\language0) on input line 102.
Package babel Info: \l@australian = using hyphenrules for ukenglish
(babel) (\language72) on input line 105.
Package babel Info: \l@newzealand = using hyphenrules for ukenglish
(babel) (\language72) on input line 108.
))
("E:\Program Files\MiKTeX 2.9\tex/latex/xcolor\xcolor.sty"
Package: xcolor 2016/05/11 v2.12 LaTeX color extensions (UK)
("E:\Program Files\MiKTeX 2.9\tex/latex/graphics-cfg\color.cfg"
File: color.cfg 2016/01/02 v1.6 sample color configuration
)
Package xcolor Info: Driver file: pdftex.def on input line 225.
("E:\Program Files\MiKTeX 2.9\tex/latex/graphics-def\pdftex.def"
File: pdftex.def 2018/01/08 v1.0l Graphics/color driver for pdftex
)
Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1348.
Package xcolor Info: Model `hsb' substituted by `rgb' on input line 1352.
Package xcolor Info: Model `RGB' extended on input line 1364.
Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1366.
Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1367.
Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1368.
Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1369.
Package xcolor Info: Model `Gray' substituted by `gray' on input line 1370.
Package xcolor Info: Model `wave' substituted by `hsb' on input line 1371.
("E:\Program Files\MiKTeX 2.9\tex/latex/graphics\dvipsnam.def"
File: dvipsnam.def 2016/06/17 v3.0m Driver-dependent file (DPC,SPQR)
))
("E:\Program Files\MiKTeX 2.9\tex/latex/framed\framed.sty"
Package: framed 2011/10/22 v 0.96: framed or shaded text with page breaks
\OuterFrameSep=\skip52
\fb@frw=\dimen145
\fb@frh=\dimen146
\FrameRule=\dimen147
\FrameSep=\dimen148
)))
("E:\Program Files\MiKTeX 2.9\tex/latex/l3backend\l3backend-pdfmode.def"
File: l3backend-pdfmode.def 2020-02-03 L3 backend support: PDF mode
\l__kernel_color_stack_int=\count192
\l__pdf_internal_box=\box47
)
(lecture5.aux)
\openout1 = `lecture5.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 2.
LaTeX Font Info: ... okay on input line 2.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 2.
LaTeX Font Info: ... okay on input line 2.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 2.
LaTeX Font Info: ... okay on input line 2.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 2.
LaTeX Font Info: ... okay on input line 2.
LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line 2.
LaTeX Font Info: ... okay on input line 2.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 2.
LaTeX Font Info: ... okay on input line 2.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 2.
LaTeX Font Info: ... okay on input line 2.
("E:\Program Files\MiKTeX 2.9\tex/context/base/mkii\supp-pdf.mkii"
[Loading MPS to PDF converter (version 2006.09.02).]
\scratchcounter=\count193
\scratchdimen=\dimen149
\scratchbox=\box48
\nofMPsegments=\count194
\nofMParguments=\count195
\everyMPshowfont=\toks23
\MPscratchCnt=\count196
\MPscratchDim=\dimen150
\MPnumerator=\count197
\makeMPintoPDFobject=\count198
\everyMPtoPDFconversion=\toks24
)
LaTeX Font Info: Trying to load font information for U+msa on input line 10.
("E:\Program Files\MiKTeX 2.9\tex/latex/amsfonts\umsa.fd"
File: umsa.fd 2013/01/14 v3.01 AMS symbols A
)
LaTeX Font Info: Trying to load font information for U+msb on input line 10.
("E:\Program Files\MiKTeX 2.9\tex/latex/amsfonts\umsb.fd"
File: umsb.fd 2013/01/14 v3.01 AMS symbols B
)
Underfull \hbox (badness 10000) in paragraph at lines 7--14
[]
Underfull \hbox (badness 10000) in paragraph at lines 7--14
[]
Underfull \hbox (badness 10000) in paragraph at lines 7--14
[]
Underfull \hbox (badness 10000) in paragraph at lines 16--20
[]
Underfull \hbox (badness 10000) in paragraph at lines 35--38
[]
Underfull \hbox (badness 10000) in paragraph at lines 54--66
[]
Underfull \hbox (badness 10000) in paragraph at lines 54--66
[]
[1
{C:/Users/AndreDany/AppData/Local/MiKTeX/2.9/pdftex/config/pdftex.map}]
Underfull \hbox (badness 10000) in paragraph at lines 68--70
[]
Underfull \hbox (badness 10000) in paragraph at lines 72--76
[]
Underfull \hbox (badness 10000) in paragraph at lines 77--81
[]
Underfull \hbox (badness 10000) in paragraph at lines 83--90
[]
Underfull \hbox (badness 10000) in paragraph at lines 83--90
[]
Underfull \hbox (badness 10000) in paragraph at lines 83--90
[]
Underfull \hbox (badness 10000) in paragraph at lines 90--95
[]
Underfull \hbox (badness 10000) in paragraph at lines 90--95
[]
Underfull \hbox (badness 10000) in paragraph at lines 90--95
[]
Underfull \hbox (badness 10000) in paragraph at lines 103--130
[]
Underfull \hbox (badness 10000) in paragraph at lines 103--130
[]
Underfull \hbox (badness 10000) in paragraph at lines 103--130
[]
Underfull \hbox (badness 10000) in paragraph at lines 103--130
[]
Underfull \hbox (badness 10000) in paragraph at lines 103--130
[]
[2]
Underfull \hbox (badness 10000) in paragraph at lines 133--135
[]
Underfull \hbox (badness 10000) in paragraph at lines 136--146
[]
Underfull \hbox (badness 10000) in paragraph at lines 136--146
[]
Underfull \hbox (badness 10000) in paragraph at lines 136--146
[]
[3]
Underfull \hbox (badness 10000) in paragraph at lines 152--154
[]
Underfull \hbox (badness 10000) in paragraph at lines 156--161
[]
Underfull \hbox (badness 10000) in paragraph at lines 171--177
[]
Underfull \hbox (badness 10000) in paragraph at lines 171--177
[]
LaTeX Warning: Command \textquoteright invalid in math mode on input line 189.
LaTeX Warning: Command \textquoteright invalid in math mode on input line 189.
Underfull \hbox (badness 10000) in paragraph at lines 182--193
[]
Underfull \hbox (badness 10000) in paragraph at lines 182--193
[]
[4]
Underfull \hbox (badness 10000) in paragraph at lines 203--213
[]
Underfull \hbox (badness 10000) in paragraph at lines 203--213
[]
Underfull \hbox (badness 10000) in paragraph at lines 215--221
[]
Underfull \hbox (badness 10000) in paragraph at lines 215--221
[]
[5] [6] (lecture5.aux) )
Here is how much of TeX's memory you used:
3704 strings out of 481556
49754 string characters out of 2923622
308037 words of memory out of 3000000
18904 multiletter control sequences out of 15000+200000
541018 words of font info for 54 fonts, out of 3000000 for 9000
1141 hyphenation exceptions out of 8191
42i,11n,50p,332b,177s stack positions out of 5000i,500n,10000p,200000b,50000s
<C:\Users\AndreDany\AppData\Local\MiKTeX\2.9\fonts/pk/
ljfour/jknappen/ec/dpi600\tcrm1200.pk> <C:\Users\AndreDany\AppData\Local\MiKTeX
\2.9\fonts/pk/ljfour/jknappen/ec/dpi600\tcti1200.pk><E:/Program Files/MiKTeX 2.
9/fonts/type1/public/amsfonts/cm/cmbx12.pfb><E:/Program Files/MiKTeX 2.9/fonts/
type1/public/amsfonts/cm/cmex10.pfb><E:/Program Files/MiKTeX 2.9/fonts/type1/pu
blic/amsfonts/cm/cmmi12.pfb><E:/Program Files/MiKTeX 2.9/fonts/type1/public/ams
fonts/cm/cmmi6.pfb><E:/Program Files/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/
cmmi8.pfb><E:/Program Files/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmr12.pfb
><E:/Program Files/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmr6.pfb><E:/Progr
am Files/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmr8.pfb><E:/Program Files/M
iKTeX 2.9/fonts/type1/public/amsfonts/cm/cmsy10.pfb><E:/Program Files/MiKTeX 2.
9/fonts/type1/public/amsfonts/cm/cmsy6.pfb><E:/Program Files/MiKTeX 2.9/fonts/t
ype1/public/amsfonts/cm/cmsy8.pfb><E:/Program Files/MiKTeX 2.9/fonts/type1/publ
ic/amsfonts/cm/cmti12.pfb><E:/Program Files/MiKTeX 2.9/fonts/type1/public/amsfo
nts/symbols/msbm10.pfb>
Output written on lecture5.pdf (6 pages, 153372 bytes).
PDF statistics:
83 PDF objects out of 1000 (max. 8388607)
0 named destinations out of 1000 (max. 500000)
1 words of extra memory for PDF output out of 10000 (max. 10000000)

View File

@ -1 +1,248 @@
\documentclass[../main.tex]{subfiles}
\begin{document}
\section{Lecture 5 - 07-04-2020}
\subsection{Tree Classifier}
Supposed we groped a tree up to this point and we are wandering how to
grow it.
\\
$S$ Training set $(x_1,y_1)...(x_m,y_m)$, $x_1 \in X$
\\\\
-- DISEGNO
\\\\
$$
\sll \equiv \{(x_1,y_1) \, x_t \quad \textit{is router to } \ell \}
$$
\\
$y_1 \in \{-1,1\}$
\\
$$
\sll ^+ \equiv \{(x_1,y_1) \in \sll : \quad y_t = +1 \}
$$
$$
\sll^- \equiv \{(x_1,y_1) \in \sll : \quad y_t = -1 \}
\qquad
\sll^+ \cap \sll^- \equiv 0 \qquad \sll \equiv \sll^+ \cup \sll^-
$$
$$
\qquad \nl = | \sll|
\qquad \nl^+ = |\sll^+|
\qquad \nl^- = |\sll^-| $$
$$
\nl = \nl^- + \nl^+
$$
leaf $\ell$ classifies all traning example ($\sll$)
\\
$$
Y_{\ell} =
\begin{cases}
+1, & \mbox{If } \nl^+ \geq \nl^-
\\
-1, & \mbox{If } otherwise
\end{cases}
$$
\\
$\ell$ makes a mistake on $min \{\nl^+, \nl^- \}$ example in $\sll$
$$
\hat{\ell}(h_T) = \frac{1}{m}
\cdot \sum_{\ell}{} min \{ \frac{\nl^+}{\nl} , \frac{\nl^-}{\nl} \} \cdot \nl =
$$
$$
= \frac{1}{m} \cdot \sum_{\ell}{}\psi \cdot (\frac{\nl+}{\nl}) \cdot \nl \quad \longrightarrow \qquad \frac{\nl^+}{\nl} = 1 - \frac{\nl}{\nl ??}
$$
where $\psi(a) = min \{a, 1-a \} \qquad a \in [0,1] $
\\
I want to replace inner node with other leaves.
\\
-- DISEGNO --
\\\\
How is traning error going to change?
(when i replace inner nodes with other leaves)
\\
Im hoping my algorithm is not going to overfit (if training error goes to 0 also
testing error goes to 0).\\
\subsection{Jensens inequality}
If $\psi$ is a concave function $\longrightarrow $ (like $log$ or $\sqrt[2]{..}$ )\\
Also $\psi$ is a function that map $0$ to $1$, \quad $\longrightarrow$ \quad $\psi\:[0,1]\rightarrow \barra{R}$\\
$$
\psi(\alpha \cdot a + (1-\alpha) \cdot b ) \geq \alpha \cdot \psi(a) + (1-\alpha) \cdot \psi(b)
\qquad \textit{Also 2° derivative is negative}$$
\\
-- DISEGNO --
\\
$$ \hat{\ell}(h_T) = \frac{1}{m} \cdot \sum_{\ell}{} \psi (\frac{\nl^+}{\nl}) \cdot \nl
$$
\\
Look a single contribution fo a leaf $\ell$ to training error
\\
$$
\psi(\frac{\nl^+}{\nl}) \cdot \nl = \psi(\frac{\nl'^+}{\nl'} \cdot \red{\frac{\nl'}{\nl}} + \frac{\nl"^+}{\nl"} \cdot \red{\frac{\nl"}{\nl}}) \cdot \nl
$$
where $\red{\frac{\nl'}{\nl}} = \alpha$ and $\red{\frac{\nl"}{\nl}} = 1-\alpha$ \qquad so \quad $\red{\frac{\nl'}{\nl}} + \red{\frac{\nl"}{\nl}} = 1$ \qquad $\longrightarrow$ $\alpha + 1 -\alpha = 1$
\\\\
$N_{\ell'}^+ + N_{\ell"}^+ = \nl
$
\\\\
I want to check function $min$ concave between 0 and 1.\\
$$min (0,1) = 0 \qquad \psi(a) = min(\alpha, 1- \alpha) $$
\\ -- DISEGNO --
\\\\
\red{This is a concave function and now I can apply Jensen's inquality}
\\\\
$$
\psi(\frac{\nl^+}{\nl}) \cdot \nl
\geq
(\frac{\nl'}{\nl} \cdot \psi (\frac{\nl'^+}{\nl'})
+
\frac{\nl"}{\nl}\cdot \psi(\frac{\nl"^+}{\nl"})) \cdot \nl =
$$
$\qquad \qquad\qquad \qquad \quad= $
\framebox[1.1\width]
{
$
\psi(\frac{\nl'^+}{\nl'})\cdot \nl'
+
\psi(\frac{\nl"^+}{\nl"})\cdot \nl"
$
}
\\\\
\red{This are the contribuion of $\ell'$ and $\ell"$ to the training error}
\\\\
Every time i split my tree my training error is never going to increase since we
have a concave function.\\
Whenever Im growing my tree training error is going to be smaller.\\\\
\textbf{Every time a leaf is expanded the training error never goes up.
(Hopelly will go down)}
\\
Ill should always grow the tree by expanding leave that decrease the training
error as much as possible.\\
If i take the effort of growing the tree i should get benefits. I can imaging that if
i grow the tree at random my training error is going to drop down error (but
maybe will derive overfitting).\\
For now is just an intuition since we will introduced statistical learning model.\\\\
Could be complicated and tree big may have 100 leave and there could be
many way of associating a test with that leaves.\\
I can spent a lot of time to select which leave is the best promising to split.\\
\begin{itemize}
\item Grow the tree by expanding leave that decrease the training error as much
as possible
\item In general we can assume:\\greedy algorithm at each step pick the pair leaf and test that cause
(approximative) the largest decrease in training error\\
\end{itemize}
In practise we want optimise this all the way since its time expensive. Thats
the approximately since we are not every time sure.
\\\\
--- MANCA PARTE ---
\\
--- IMMAGINE ---
\\\\
$ p = 0.8 \qquad q = 1 \qquad r = 1 \qquad \alpha = 60\%$
\\
Net Change in number of mistakes\\
$$
\psi(p) - (\alpha \cdot \psi(q) + (1- \alpha ) \cdot \psi (r) ) =
$$
$$
\red{
\qquad \qquad \ell \quad- \qquad \ell' \quad+ \qquad \ell" \qquad \qquad \qquad \qquad
}$$
Fraction of example miss classified $\ell -$ error $\ell' +$ error $\ell"$ \\
$$
= 0.2 - ( \frac{1}{2} \cdot 0.4 + \frac{1}{2} \cdot 0 ) = 0
$$
\\
--- DISEGNO ---
\\\\
Idea is to replace minimum function with convex combination.
$$
\psi(\alpha) = min\ \{\alpha, 1-\alpha\} \qquad \psi(a) \geq \psi(\alpha)
$$
$$
\begin{cases}
\psi_1(\alpha) = 2\cdot\alpha \cdot (1-\alpha) \longrightarrow \red{GNI} \\
\psi_2(\alpha)= -\frac{\alpha}{2}\cdot \ln \alpha - \frac{1-\alpha}{2} \cdot \ln (1-\alpha)\longrightarrow \red{ENTROPY} \\
\psi_3(\alpha) = \sqrt[]{\alpha \cdot (1-\alpha
)}
\end{cases}
$$
All this functions has this shape (concave???)\\
-- DISEGNO --
\\
In practise Machine Learning algorithm use GNI or entropy to control the split
\\\\
\subsection{Tree Predictor}
\begin{itemize}
\item Multi class classification $|Y| > 2$ $\longrightarrow$ \red{take majority}
\item Regression $Y = \barra{R} $ $\longrightarrow$ \red{take average of labels in $\sll$}
\end{itemize}
I still take majority among different classes.\\
Take average of labels in $\sll$
\\
Unless $\frac{\nl^+}{\nl} \in {0,1} $ \qquad $\forall$ leaves $\ell$, $\hat{\ell}(h_T) > 0$
\\
Unless leaves are \textit{"pured"}, the training error will be bigger than 0.
\\\\
In general, i can always write $\hat{\ell}(h_t)$ to 0 by growing enough the tree unless there are $x_1$ in the Time Series such that $(x_t, y_t)(x_t,y_t)$ with $y_t \neq y_t$ both occur.
\\
--- DISEGNO ----
\\
$$ if (x_1 = \alpha) \wedge (x_2 = \geq \alpha) \vee (x_1 = b) \vee (x_1 = c) \wedge (x_3= y) \qquad
$$
$$
\textit{then predict 1} \qquad \qquad
$$
$
\qquad \quad \,\,else
$
$$
\textit{then predict -1} \qquad \qquad
$$
\\
--- Picture of tree classifier of iris dataset. ---\\
Im using due attribute at the time.\\
Each data point is a flower and i can measure how petal and sepal are long.
I can use two attribute and i test this two. I can see the plot of the tree
classifier (second one) making test splitting data space into region that has
this sort of “blackish” shape ( like boxes: blue box, red box, yellow box)\\
A good exercise in which I want to reconstruct the tree given this picture.
\\\\
\subsection{Statistical model for Machine Learning}
To understand Tree classifier, nearest neighbour and other algorithm...\\
Its important to understand that the only way to have a guideline in which
model to choose.\\\\
\textbf{This mathematical model are developed to learning and choose learning
algorithm.}\\\\
Now let start with theoretical model.
\begin{itemize}
\item How example $(x,y)$ are generated to create test set and training set?\\
We get the dataset but we need to have a mathematical model for this
process.
$(x,y)$ are drawn from a fixed but unknown probability distribution on the pairs $X$
and $Y$ ($X$ data space, $Y$ label set o label space)
\item Why $X$ should be random? \\
In general we assumed that not all the $x$ in $X$ are equally likely to be observed.
I have some distribution over my data point and this said that Im most like to
get a datapoint to another.
\item How much label?\\
Often labels are not determined uniquely by their datapoints because labels
are given by human that have their subjective thoughts and also natural
phenomena. Labels are stochastic phenomena given a datapoint: i will have a
distribution.
\end{itemize}
Were going to write (in capital) $(X, Y)$ since they are random variable drawn
from $D$ on $X \cdot Y$
A dataset $(X_1, Y_1) ... (X_m, Y_m)$ they are drawn independently from $D$
(distribution on examples)\\
When I get a training the abstraction of process collecting a training set\\
$D$ is a joint probability distribution over $X\cdot Y$\\
where $D_x$ is the marginal over $X \rightarrow D_y|x$ (conditional of $Y$ given $X$).\\
I can divided my draw in two part.
I draw sample and label from conditional.??\\
Any dataset ( training or test ) is a random sample (campione casuale) in the
statistical sense $\longrightarrow$ so we can use all stastical tools to make inference.
\end{document}

View File

@ -1 +1,7 @@
\documentclass[../main.tex]{subfiles}
\begin{document}
\section{Lecture 6 - 07-04-2020}
\end{document}

View File

@ -1 +1,6 @@
\documentclass[../main.tex]{subfiles}
\begin{document}
\section{Lecture 7 - 07-04-2020}
\end{document}

View File

@ -1 +1,5 @@
\documentclass[../main.tex]{subfiles}
\begin{document}
\section{Lecture 8 - 07-04-2020}
\end{document}

View File

@ -1 +1,6 @@
\documentclass[../main.tex]{subfiles}
\begin{document}
\section{Lecture 9 - 07-04-2020}
\end{document}

View File

@ -1,26 +1,34 @@
\relax
\@writefile{toc}{\contentsline {section}{\numberline {1}Lecture 1 - 09-03-2020}{3}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {1.1}Introduction}{3}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {2}Lecture 2 - 07-04-2020}{6}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {2.1}Argomento}{6}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {2.2}Loss}{6}\protected@file@percent }
\@writefile{toc}{\contentsline {subsubsection}{\numberline {2.2.1}Absolute Loss}{6}\protected@file@percent }
\@writefile{toc}{\contentsline {subsubsection}{\numberline {2.2.2}Square Loss}{7}\protected@file@percent }
\@writefile{toc}{\contentsline {subsubsection}{\numberline {2.2.3}Example of information of square loss}{7}\protected@file@percent }
\@writefile{toc}{\contentsline {subsubsection}{\numberline {2.2.4}labels and losses}{9}\protected@file@percent }
\@writefile{toc}{\contentsline {subsubsection}{\numberline {2.2.5}Example TF(idf) documents encoding}{10}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {3}Lecture 3 - 07-04-2020}{12}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {3.1}Overfitting}{14}\protected@file@percent }
\@writefile{toc}{\contentsline {subsubsection}{\numberline {3.1.1}Noise in the data}{14}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {3.2}Underfitting}{16}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {3.3}Nearest neighbour}{16}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {4}Lecture 4 - 07-04-2020}{18}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {5}Lecture 5 - 07-04-2020}{19}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {6}Lecture 6 - 07-04-2020}{20}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {7}Lecture 7 - 07-04-2020}{21}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {8}Lecture 8 - 07-04-2020}{22}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {9}Lecture 9 - 07-04-2020}{23}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {10}Lecture 10 - 07-04-2020}{24}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {10.1}TO BE DEFINE}{24}\protected@file@percent }
\@nameuse{bbl@beforestart}
\babel@aux{english}{}
\@writefile{toc}{\contentsline {section}{\numberline {1}Lecture 1 - 09-03-2020}{4}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {1.1}Introduction}{4}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {2}Lecture 2 - 07-04-2020}{7}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {2.1}Argomento}{7}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {2.2}Loss}{7}\protected@file@percent }
\@writefile{toc}{\contentsline {subsubsection}{\numberline {2.2.1}Absolute Loss}{7}\protected@file@percent }
\@writefile{toc}{\contentsline {subsubsection}{\numberline {2.2.2}Square Loss}{8}\protected@file@percent }
\@writefile{toc}{\contentsline {subsubsection}{\numberline {2.2.3}Example of information of square loss}{8}\protected@file@percent }
\@writefile{toc}{\contentsline {subsubsection}{\numberline {2.2.4}labels and losses}{10}\protected@file@percent }
\@writefile{toc}{\contentsline {subsubsection}{\numberline {2.2.5}Example TF(idf) documents encoding}{11}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {3}Lecture 3 - 07-04-2020}{13}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {3.1}Overfitting}{15}\protected@file@percent }
\@writefile{toc}{\contentsline {subsubsection}{\numberline {3.1.1}Noise in the data}{15}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {3.2}Underfitting}{17}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {3.3}Nearest neighbour}{17}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {4}Lecture 4 - 07-04-2020}{19}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {4.1}Computing $h_{NN}$}{19}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {4.2}Tree Predictor}{20}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {5}Lecture 5 - 07-04-2020}{23}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {5.1}Tree Classifier}{23}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {5.2}Jensens inequality}{24}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {5.3}Tree Predictor}{26}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {5.4}Statistical model for Machine Learning}{27}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {6}Lecture 6 - 07-04-2020}{29}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {7}Lecture 7 - 07-04-2020}{30}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {8}Lecture 8 - 07-04-2020}{31}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {9}Lecture 9 - 07-04-2020}{32}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {10}Lecture 10 - 07-04-2020}{33}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {10.1}TO BE DEFINE}{33}\protected@file@percent }
\bibstyle{abbrv}
\bibdata{main}

View File

@ -1,4 +1,4 @@
This is pdfTeX, Version 3.14159265-2.6-1.40.21 (MiKTeX 2.9.7300 64-bit) (preloaded format=pdflatex 2020.4.12) 12 APR 2020 15:21
This is pdfTeX, Version 3.14159265-2.6-1.40.21 (MiKTeX 2.9.7300 64-bit) (preloaded format=pdflatex 2020.4.12) 12 APR 2020 19:33
entering extended mode
**./main.tex
(main.tex
@ -111,34 +111,112 @@ Package: subfiles 2020/02/14 v1.6 Multi-file projects (package)
("E:\Program Files\MiKTeX 2.9\tex/latex/import\import.sty"
Package: import 2020/04/01 v 6.2
))
("E:\Program Files\MiKTeX 2.9\tex/generic/babel\babel.sty"
Package: babel 2020/02/14 3.40 The Babel package
("E:\Program Files\MiKTeX 2.9\tex/generic/babel\switch.def"
File: switch.def 2020/02/14 3.40 Babel switching mechanism
)
*************************************
* Local config file bblopts.cfg used
*
("E:\Program Files\MiKTeX 2.9\tex/latex/arabi\bblopts.cfg"
File: bblopts.cfg 2005/09/08 v0.1 add Arabic and Farsi to "declared" options of
babel
)
("E:\Program Files\MiKTeX 2.9\tex/latex/babel-english\english.ldf"
Language: english 2017/06/06 v3.3r English support from the babel system
("E:\Program Files\MiKTeX 2.9\tex/generic/babel\babel.def"
File: babel.def 2020/02/14 3.40 Babel common definitions
\babel@savecnt=\count190
\U@D=\dimen144
("E:\Program Files\MiKTeX 2.9\tex/generic/babel\txtbabel.def")
\bbl@readstream=\read2
\bbl@dirlevel=\count191
)
Package babel Info: \l@canadian = using hyphenrules for english
(babel) (\language0) on input line 102.
Package babel Info: \l@australian = using hyphenrules for ukenglish
(babel) (\language72) on input line 105.
Package babel Info: \l@newzealand = using hyphenrules for ukenglish
(babel) (\language72) on input line 108.
))
("E:\Program Files\MiKTeX 2.9\tex/latex/xcolor\xcolor.sty"
Package: xcolor 2016/05/11 v2.12 LaTeX color extensions (UK)
("E:\Program Files\MiKTeX 2.9\tex/latex/graphics-cfg\color.cfg"
File: color.cfg 2016/01/02 v1.6 sample color configuration
)
Package xcolor Info: Driver file: pdftex.def on input line 225.
("E:\Program Files\MiKTeX 2.9\tex/latex/graphics-def\pdftex.def"
File: pdftex.def 2018/01/08 v1.0l Graphics/color driver for pdftex
)
Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1348.
Package xcolor Info: Model `hsb' substituted by `rgb' on input line 1352.
Package xcolor Info: Model `RGB' extended on input line 1364.
Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1366.
Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1367.
Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1368.
Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1369.
Package xcolor Info: Model `Gray' substituted by `gray' on input line 1370.
Package xcolor Info: Model `wave' substituted by `hsb' on input line 1371.
("E:\Program Files\MiKTeX 2.9\tex/latex/graphics\dvipsnam.def"
File: dvipsnam.def 2016/06/17 v3.0m Driver-dependent file (DPC,SPQR)
))
("E:\Program Files\MiKTeX 2.9\tex/latex/framed\framed.sty"
Package: framed 2011/10/22 v 0.96: framed or shaded text with page breaks
\OuterFrameSep=\skip52
\fb@frw=\dimen145
\fb@frh=\dimen146
\FrameRule=\dimen147
\FrameSep=\dimen148
)
("E:\Program Files\MiKTeX 2.9\tex/latex/l3backend\l3backend-pdfmode.def"
File: l3backend-pdfmode.def 2020-02-03 L3 backend support: PDF mode
\l__kernel_color_stack_int=\count190
\l__kernel_color_stack_int=\count192
\l__pdf_internal_box=\box47
)
(main.aux)
\openout1 = `main.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 19.
LaTeX Font Info: ... okay on input line 19.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 19.
LaTeX Font Info: ... okay on input line 19.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 19.
LaTeX Font Info: ... okay on input line 19.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 19.
LaTeX Font Info: ... okay on input line 19.
LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line 19.
LaTeX Font Info: ... okay on input line 19.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 19.
LaTeX Font Info: ... okay on input line 19.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 19.
LaTeX Font Info: ... okay on input line 19.
LaTeX Font Info: Trying to load font information for U+msa on input line 20.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 30.
LaTeX Font Info: ... okay on input line 30.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 30.
LaTeX Font Info: ... okay on input line 30.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 30.
LaTeX Font Info: ... okay on input line 30.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 30.
LaTeX Font Info: ... okay on input line 30.
LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line 30.
LaTeX Font Info: ... okay on input line 30.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 30.
LaTeX Font Info: ... okay on input line 30.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 30.
LaTeX Font Info: ... okay on input line 30.
("E:\Program Files\MiKTeX 2.9\tex/context/base/mkii\supp-pdf.mkii"
[Loading MPS to PDF converter (version 2006.09.02).]
\scratchcounter=\count193
\scratchdimen=\dimen149
\scratchbox=\box48
\nofMPsegments=\count194
\nofMParguments=\count195
\everyMPshowfont=\toks21
\MPscratchCnt=\count196
\MPscratchDim=\dimen150
\MPnumerator=\count197
\makeMPintoPDFobject=\count198
\everyMPtoPDFconversion=\toks22
)
LaTeX Font Info: Trying to load font information for U+msa on input line 31.
("E:\Program Files\MiKTeX 2.9\tex/latex/amsfonts\umsa.fd"
File: umsa.fd 2013/01/14 v3.01 AMS symbols A
)
LaTeX Font Info: Trying to load font information for U+msb on input line 20.
LaTeX Font Info: Trying to load font information for U+msb on input line 31.
("E:\Program Files\MiKTeX 2.9\tex/latex/amsfonts\umsb.fd"
@ -150,7 +228,7 @@ oc)
\tf@toc=\write3
\openout3 = `main.toc'.
[2]
[2] [3]
(lectures/lecture1.tex
Underfull \hbox (badness 10000) in paragraph at lines 9--96
@ -161,7 +239,7 @@ Underfull \hbox (badness 10000) in paragraph at lines 9--96
[]
[3]
[4]
Underfull \hbox (badness 10000) in paragraph at lines 99--139
[]
@ -176,7 +254,7 @@ Underfull \hbox (badness 10000) in paragraph at lines 99--139
[]
[4]) [5] (lectures/lecture2.tex
[5]) [6] (lectures/lecture2.tex
Underfull \hbox (badness 10000) in paragraph at lines 7--16
[]
@ -196,7 +274,7 @@ Underfull \hbox (badness 10000) in paragraph at lines 32--35
[]
[6]
[7]
Underfull \hbox (badness 10000) in paragraph at lines 49--52
[]
@ -211,7 +289,7 @@ Underfull \hbox (badness 10000) in paragraph at lines 63--81
[]
[7]
[8]
Underfull \hbox (badness 10000) in paragraph at lines 81--86
[]
@ -236,42 +314,42 @@ Underfull \hbox (badness 10000) in paragraph at lines 110--115
[]
[8]
Underfull \hbox (badness 10000) in paragraph at lines 118--156
[]
Underfull \hbox (badness 10000) in paragraph at lines 118--156
[]
Underfull \hbox (badness 10000) in paragraph at lines 118--156
[]
Underfull \hbox (badness 10000) in paragraph at lines 118--156
[]
Underfull \hbox (badness 10000) in paragraph at lines 118--156
[]
Underfull \hbox (badness 10000) in paragraph at lines 118--156
[]
[9]
Underfull \hbox (badness 10000) in paragraph at lines 164--171
Underfull \hbox (badness 10000) in paragraph at lines 118--156
[]
Underfull \hbox (badness 10000) in paragraph at lines 118--156
[]
Underfull \hbox (badness 10000) in paragraph at lines 118--156
[]
Underfull \hbox (badness 10000) in paragraph at lines 118--156
[]
Underfull \hbox (badness 10000) in paragraph at lines 118--156
[]
Underfull \hbox (badness 10000) in paragraph at lines 118--156
[]
[10]
Underfull \hbox (badness 10000) in paragraph at lines 164--171
[]
[11]
Underfull \hbox (badness 10000) in paragraph at lines 172--182
[]
@ -281,7 +359,7 @@ Underfull \hbox (badness 10000) in paragraph at lines 189--199
[]
) [11] (lectures/lecture3.tex
) [12] (lectures/lecture3.tex
Underfull \hbox (badness 10000) in paragraph at lines 5--7
[]
@ -336,7 +414,7 @@ Underfull \hbox (badness 10000) in paragraph at lines 28--35
[]
[12]
[13]
Underfull \hbox (badness 10000) in paragraph at lines 48--54
[]
@ -356,7 +434,7 @@ Underfull \hbox (badness 10000) in paragraph at lines 65--75
[]
[13]
[14]
Underfull \hbox (badness 10000) in paragraph at lines 78--86
[]
@ -381,7 +459,7 @@ Underfull \hbox (badness 10000) in paragraph at lines 104--108
[]
[14]
[15]
Underfull \hbox (badness 10000) in paragraph at lines 110--138
[]
@ -416,7 +494,7 @@ Underfull \hbox (badness 10000) in paragraph at lines 164--168
[]
[15]
[16]
Overfull \hbox (36.32568pt too wide) detected at line 170
\OML/cmm/m/it/12 A \OMS/cmsy/m/n/12  \OML/cmm/m/it/12 ERM[] \OMS/cmsy/m/n/12 !
[]
@ -457,118 +535,402 @@ Underfull \hbox (badness 10000) in paragraph at lines 187--223
[]
[16]
[17]
Underfull \hbox (badness 10000) in paragraph at lines 225--226
[]
) [17] (lectures/lecture4.tex) [18] (lectures/lecture5.tex) [19]
(lectures/lecture6.tex) [20] (lectures/lecture7.tex) [21]
(lectures/lecture8.tex) [22] (lectures/lecture9.tex) [23]
(lectures/lecture10.tex
LaTeX Font Warning: Command \small invalid in math mode on input line 6.
Underfull \hbox (badness 10000) in paragraph at lines 4--21
) [18] (lectures/lecture4.tex
Underfull \hbox (badness 10000) in paragraph at lines 10--14
[]
Underfull \hbox (badness 10000) in paragraph at lines 4--21
Underfull \hbox (badness 10000) in paragraph at lines 15--17
[]
Underfull \hbox (badness 10000) in paragraph at lines 22--24
Underfull \hbox (badness 10000) in paragraph at lines 21--39
[]
Underfull \hbox (badness 10000) in paragraph at lines 22--24
Underfull \hbox (badness 10000) in paragraph at lines 42--66
[]
Underfull \hbox (badness 10000) in paragraph at lines 25--31
Underfull \hbox (badness 10000) in paragraph at lines 42--66
[]
Underfull \hbox (badness 10000) in paragraph at lines 42--66
[]
Underfull \hbox (badness 10000) in paragraph at lines 42--66
[]
[19]
Underfull \hbox (badness 10000) in paragraph at lines 68--70
[]
Underfull \hbox (badness 10000) in paragraph at lines 73--88
[]
[20]
Underfull \hbox (badness 10000) in paragraph at lines 93--99
[]
Overfull \hbox (30.99239pt too wide) detected at line 115
\OML/cmm/m/it/12 X \OT1/cmr/m/n/12 = \OMS/cmsy/m/n/12 f\OML/cmm/m/it/12 Sunny;
\OT1/cmr/m/n/12 50%\OML/cmm/m/it/12 ; No\OMS/cmsy/m/n/12 g ! []f\OML/cmm/m/it
/12 outlook:humidity; windy\OMS/cmsy/m/n/12 g
[]
[21]
LaTeX Warning: Command \textquoteright invalid in math mode on input line 163.
)
Underfull \hbox (badness 10000) in paragraph at lines 142--50
[]
Underfull \hbox (badness 10000) in paragraph at lines 142--50
[]
Underfull \hbox (badness 10000) in paragraph at lines 142--50
[]
Underfull \hbox (badness 10000) in paragraph at lines 142--50
[]
Underfull \hbox (badness 10000) in paragraph at lines 142--50
[]
Underfull \hbox (badness 10000) in paragraph at lines 142--50
[]
Underfull \hbox (badness 10000) in paragraph at lines 142--50
[]
Underfull \hbox (badness 10000) in paragraph at lines 142--50
[]
[22] (lectures/lecture5.tex
Underfull \hbox (badness 10000) in paragraph at lines 7--14
[]
Underfull \hbox (badness 10000) in paragraph at lines 7--14
[]
Underfull \hbox (badness 10000) in paragraph at lines 7--14
[]
Underfull \hbox (badness 10000) in paragraph at lines 16--20
[]
Underfull \hbox (badness 10000) in paragraph at lines 35--38
[]
Underfull \hbox (badness 10000) in paragraph at lines 54--66
[]
Underfull \hbox (badness 10000) in paragraph at lines 54--66
[]
[23]
Underfull \hbox (badness 10000) in paragraph at lines 68--70
[]
Underfull \hbox (badness 10000) in paragraph at lines 72--76
[]
Underfull \hbox (badness 10000) in paragraph at lines 77--81
[]
Underfull \hbox (badness 10000) in paragraph at lines 83--90
[]
Underfull \hbox (badness 10000) in paragraph at lines 83--90
[]
Underfull \hbox (badness 10000) in paragraph at lines 83--90
[]
Underfull \hbox (badness 10000) in paragraph at lines 90--95
[]
Underfull \hbox (badness 10000) in paragraph at lines 90--95
[]
Underfull \hbox (badness 10000) in paragraph at lines 90--95
[]
Underfull \hbox (badness 10000) in paragraph at lines 103--130
[]
Underfull \hbox (badness 10000) in paragraph at lines 103--130
[]
Underfull \hbox (badness 10000) in paragraph at lines 103--130
[]
Underfull \hbox (badness 10000) in paragraph at lines 103--130
[]
Underfull \hbox (badness 10000) in paragraph at lines 103--130
[]
[24]
Underfull \hbox (badness 10000) in paragraph at lines 34--47
Underfull \hbox (badness 10000) in paragraph at lines 133--135
[]
Underfull \hbox (badness 10000) in paragraph at lines 34--47
Underfull \hbox (badness 10000) in paragraph at lines 136--146
[]
Underfull \hbox (badness 10000) in paragraph at lines 49--51
Underfull \hbox (badness 10000) in paragraph at lines 136--146
[]
Underfull \hbox (badness 10000) in paragraph at lines 49--51
Underfull \hbox (badness 10000) in paragraph at lines 136--146
[]
[25]
Underfull \hbox (badness 10000) in paragraph at lines 152--154
[]
Underfull \hbox (badness 10000) in paragraph at lines 52--58
[]
)
Underfull \hbox (badness 10000) in paragraph at lines 60--63
Underfull \hbox (badness 10000) in paragraph at lines 156--161
[]
Underfull \hbox (badness 10000) in paragraph at lines 60--63
Underfull \hbox (badness 10000) in paragraph at lines 171--177
[]
Underfull \hbox (badness 10000) in paragraph at lines 60--63
Underfull \hbox (badness 10000) in paragraph at lines 171--177
[]
Underfull \hbox (badness 10000) in paragraph at lines 60--63
LaTeX Warning: Command \textquoteright invalid in math mode on input line 189.
LaTeX Warning: Command \textquoteright invalid in math mode on input line 189.
Underfull \hbox (badness 10000) in paragraph at lines 182--193
[]
[25] [26] (main.bbl
Underfull \hbox (badness 10000) in paragraph at lines 182--193
[]
[26]
Underfull \hbox (badness 10000) in paragraph at lines 203--213
[]
Underfull \hbox (badness 10000) in paragraph at lines 203--213
[]
Underfull \hbox (badness 10000) in paragraph at lines 215--221
[]
Underfull \hbox (badness 10000) in paragraph at lines 215--221
[]
[27]) [28] (lectures/lecture6.tex) [29] (lectures/lecture7.tex) [30]
(lectures/lecture8.tex) [31] (lectures/lecture9.tex) [32]
(lectures/lecture10.tex
LaTeX Font Warning: Command \small invalid in math mode on input line 9.
Underfull \hbox (badness 10000) in paragraph at lines 7--24
[]
Underfull \hbox (badness 10000) in paragraph at lines 7--24
[]
Underfull \hbox (badness 10000) in paragraph at lines 25--27
[]
Underfull \hbox (badness 10000) in paragraph at lines 25--27
[]
Underfull \hbox (badness 10000) in paragraph at lines 28--34
[]
[33]
Underfull \hbox (badness 10000) in paragraph at lines 37--50
[]
Underfull \hbox (badness 10000) in paragraph at lines 37--50
[]
Underfull \hbox (badness 10000) in paragraph at lines 52--54
[]
Underfull \hbox (badness 10000) in paragraph at lines 52--54
[]
Underfull \hbox (badness 10000) in paragraph at lines 55--61
[]
Underfull \hbox (badness 10000) in paragraph at lines 63--96
[]
Underfull \hbox (badness 10000) in paragraph at lines 63--96
[]
Underfull \hbox (badness 10000) in paragraph at lines 63--96
[]
Underfull \hbox (badness 10000) in paragraph at lines 63--96
[]
[34]) [35] (main.bbl
LaTeX Warning: Empty `thebibliography' environment on input line 3.
) [27] (main.aux) )
) [36] (main.aux) )
Here is how much of TeX's memory you used:
2059 strings out of 481556
29942 string characters out of 2923622
268529 words of memory out of 3000000
17278 multiletter control sequences out of 15000+200000
542786 words of font info for 63 fonts, out of 3000000 for 9000
3728 strings out of 481556
51810 string characters out of 2923622
310148 words of memory out of 3000000
18900 multiletter control sequences out of 15000+200000
543918 words of font info for 66 fonts, out of 3000000 for 9000
1141 hyphenation exceptions out of 8191
30i,11n,31p,321b,206s stack positions out of 5000i,500n,10000p,200000b,50000s
30i,11n,37p,321b,258s stack positions out of 5000i,500n,10000p,200000b,50000s
<C:\Users\AndreDany\AppData\Local\MiKTeX\2.9\fonts/pk/ljfou
r/jknappen/ec/dpi600\tcrm1200.pk><E:/Program Files/MiKTeX 2.9/fonts/type1/publi
c/amsfonts/cm/cmbx12.pfb><E:/Program Files/MiKTeX 2.9/fonts/type1/public/amsfon
ts/cm/cmex10.pfb><E:/Program Files/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cm
mi12.pfb><E:/Program Files/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmmi8.pfb>
<E:/Program Files/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmr12.pfb><E:/Progr
am Files/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmr17.pfb><E:/Program Files/
MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmr6.pfb><E:/Program Files/MiKTeX 2.9
/fonts/type1/public/amsfonts/cm/cmr8.pfb><E:/Program Files/MiKTeX 2.9/fonts/typ
e1/public/amsfonts/cm/cmsy10.pfb><E:/Program Files/MiKTeX 2.9/fonts/type1/publi
c/amsfonts/cm/cmsy6.pfb><E:/Program Files/MiKTeX 2.9/fonts/type1/public/amsfont
s/cm/cmsy8.pfb><E:/Program Files/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmti
12.pfb><E:/Program Files/MiKTeX 2.9/fonts/type1/public/amsfonts/symbols/msbm10.
pfb>
Output written on main.pdf (27 pages, 198691 bytes).
r/jknappen/ec/dpi600\tcti1200.pk> <C:\Users\AndreDany\AppData\Local\MiKTeX\2.9\
fonts/pk/ljfour/jknappen/ec/dpi600\tcrm1200.pk><E:/Program Files/MiKTeX 2.9/fon
ts/type1/public/amsfonts/cm/cmbx12.pfb><E:/Program Files/MiKTeX 2.9/fonts/type1
/public/amsfonts/cm/cmex10.pfb><E:/Program Files/MiKTeX 2.9/fonts/type1/public/
amsfonts/cm/cmmi10.pfb><E:/Program Files/MiKTeX 2.9/fonts/type1/public/amsfonts
/cm/cmmi12.pfb><E:/Program Files/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmmi
6.pfb><E:/Program Files/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmmi8.pfb><E:
/Program Files/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmr12.pfb><E:/Program
Files/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmr17.pfb><E:/Program Files/MiK
TeX 2.9/fonts/type1/public/amsfonts/cm/cmr6.pfb><E:/Program Files/MiKTeX 2.9/fo
nts/type1/public/amsfonts/cm/cmr8.pfb><E:/Program Files/MiKTeX 2.9/fonts/type1/
public/amsfonts/cm/cmsy10.pfb><E:/Program Files/MiKTeX 2.9/fonts/type1/public/a
msfonts/cm/cmsy6.pfb><E:/Program Files/MiKTeX 2.9/fonts/type1/public/amsfonts/c
m/cmsy8.pfb><E:/Program Files/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmti12.
pfb><E:/Program Files/MiKTeX 2.9/fonts/type1/public/amsfonts/symbols/msbm10.pfb
>
Output written on main.pdf (36 pages, 243951 bytes).
PDF statistics:
146 PDF objects out of 1000 (max. 8388607)
187 PDF objects out of 1000 (max. 8388607)
0 named destinations out of 1000 (max. 500000)
1 words of extra memory for PDF output out of 10000 (max. 10000000)

View File

@ -12,11 +12,21 @@
\usepackage{systeme}
\usepackage{amssymb}
\usepackage{subfiles}
\usepackage[english]{babel}
\usepackage[dvipsnames]{xcolor}
\definecolor{mypink}{cmyk}{0, 0.7808, 0.4429, 0.1412}
\definecolor{mygray}{gray}{0.6}
\usepackage{framed}
\newcommand\barra[1]{\mathbb{#1}}
\newcommand\hnn{h_{NN}}
\newcommand\hknn{h_{k-NN}}
\newcommand\knn{K_{NN}}
\newcommand\nl{N_{\ell}}
\newcommand\sll{S_{\ell}}
\newcommand\red[1]{\textcolor{BrickRed}{#1}}
\newcommand\gray[1]{\textcolor{mygray}{#1}}
\begin{document}
\maketitle

View File

@ -1,23 +1,30 @@
\contentsline {section}{\numberline {1}Lecture 1 - 09-03-2020}{3}%
\contentsline {subsection}{\numberline {1.1}Introduction}{3}%
\contentsline {section}{\numberline {2}Lecture 2 - 07-04-2020}{6}%
\contentsline {subsection}{\numberline {2.1}Argomento}{6}%
\contentsline {subsection}{\numberline {2.2}Loss}{6}%
\contentsline {subsubsection}{\numberline {2.2.1}Absolute Loss}{6}%
\contentsline {subsubsection}{\numberline {2.2.2}Square Loss}{7}%
\contentsline {subsubsection}{\numberline {2.2.3}Example of information of square loss}{7}%
\contentsline {subsubsection}{\numberline {2.2.4}labels and losses}{9}%
\contentsline {subsubsection}{\numberline {2.2.5}Example TF(idf) documents encoding}{10}%
\contentsline {section}{\numberline {3}Lecture 3 - 07-04-2020}{12}%
\contentsline {subsection}{\numberline {3.1}Overfitting}{14}%
\contentsline {subsubsection}{\numberline {3.1.1}Noise in the data}{14}%
\contentsline {subsection}{\numberline {3.2}Underfitting}{16}%
\contentsline {subsection}{\numberline {3.3}Nearest neighbour}{16}%
\contentsline {section}{\numberline {4}Lecture 4 - 07-04-2020}{18}%
\contentsline {section}{\numberline {5}Lecture 5 - 07-04-2020}{19}%
\contentsline {section}{\numberline {6}Lecture 6 - 07-04-2020}{20}%
\contentsline {section}{\numberline {7}Lecture 7 - 07-04-2020}{21}%
\contentsline {section}{\numberline {8}Lecture 8 - 07-04-2020}{22}%
\contentsline {section}{\numberline {9}Lecture 9 - 07-04-2020}{23}%
\contentsline {section}{\numberline {10}Lecture 10 - 07-04-2020}{24}%
\contentsline {subsection}{\numberline {10.1}TO BE DEFINE}{24}%
\babel@toc {english}{}
\contentsline {section}{\numberline {1}Lecture 1 - 09-03-2020}{4}%
\contentsline {subsection}{\numberline {1.1}Introduction}{4}%
\contentsline {section}{\numberline {2}Lecture 2 - 07-04-2020}{7}%
\contentsline {subsection}{\numberline {2.1}Argomento}{7}%
\contentsline {subsection}{\numberline {2.2}Loss}{7}%
\contentsline {subsubsection}{\numberline {2.2.1}Absolute Loss}{7}%
\contentsline {subsubsection}{\numberline {2.2.2}Square Loss}{8}%
\contentsline {subsubsection}{\numberline {2.2.3}Example of information of square loss}{8}%
\contentsline {subsubsection}{\numberline {2.2.4}labels and losses}{10}%
\contentsline {subsubsection}{\numberline {2.2.5}Example TF(idf) documents encoding}{11}%
\contentsline {section}{\numberline {3}Lecture 3 - 07-04-2020}{13}%
\contentsline {subsection}{\numberline {3.1}Overfitting}{15}%
\contentsline {subsubsection}{\numberline {3.1.1}Noise in the data}{15}%
\contentsline {subsection}{\numberline {3.2}Underfitting}{17}%
\contentsline {subsection}{\numberline {3.3}Nearest neighbour}{17}%
\contentsline {section}{\numberline {4}Lecture 4 - 07-04-2020}{19}%
\contentsline {subsection}{\numberline {4.1}Computing $h_{NN}$}{19}%
\contentsline {subsection}{\numberline {4.2}Tree Predictor}{20}%
\contentsline {section}{\numberline {5}Lecture 5 - 07-04-2020}{23}%
\contentsline {subsection}{\numberline {5.1}Tree Classifier}{23}%
\contentsline {subsection}{\numberline {5.2}Jensens inequality}{24}%
\contentsline {subsection}{\numberline {5.3}Tree Predictor}{26}%
\contentsline {subsection}{\numberline {5.4}Statistical model for Machine Learning}{27}%
\contentsline {section}{\numberline {6}Lecture 6 - 07-04-2020}{29}%
\contentsline {section}{\numberline {7}Lecture 7 - 07-04-2020}{30}%
\contentsline {section}{\numberline {8}Lecture 8 - 07-04-2020}{31}%
\contentsline {section}{\numberline {9}Lecture 9 - 07-04-2020}{32}%
\contentsline {section}{\numberline {10}Lecture 10 - 07-04-2020}{33}%
\contentsline {subsection}{\numberline {10.1}TO BE DEFINE}{33}%