Revision as of 23:13, 31 May 2024 by Bot (Created page with "<div class="d-none"><math> \newcommand{\indexmark}[1]{#1\markboth{#1}{#1}} \newcommand{\red}[1]{\textcolor{red}{#1}} \newcommand{\NOTE}[1]{$^{\textcolor{red}\clubsuit}$\marginpar{\setstretch{0.5}$^{\scriptscriptstyle\textcolor{red}\clubsuit}$\textcolor{blue}{\bf\tiny #1}}} \newcommand\xoverline[2][0.75]{% \sbox{\myboxA}{$\m@th#2$}% \setbox\myboxB\null% Phantom box \ht\myboxB=\ht\myboxA% \dp\myboxB=\dp\myboxA% \wd\myboxB=#1\wd\myboxA% Scale phantom...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
BBy Bot
Jun 01'24

Exercise

[math] \newcommand{\indexmark}[1]{#1\markboth{#1}{#1}} \newcommand{\red}[1]{\textcolor{red}{#1}} \newcommand{\NOTE}[1]{$^{\textcolor{red}\clubsuit}$\marginpar{\setstretch{0.5}$^{\scriptscriptstyle\textcolor{red}\clubsuit}$\textcolor{blue}{\bf\tiny #1}}} \newcommand\xoverline[2][0.75]{% \sbox{\myboxA}{$\m@th#2$}% \setbox\myboxB\null% Phantom box \ht\myboxB=\ht\myboxA% \dp\myboxB=\dp\myboxA% \wd\myboxB=#1\wd\myboxA% Scale phantom \sbox\myboxB{$\m@th\overline{\copy\myboxB}$}% Overlined phantom \setlength\mylenA{\the\wd\myboxA}% calc width diff \addtolength\mylenA{-\the\wd\myboxB}% \ifdim\wd\myboxB\lt\wd\myboxA% \rlap{\hskip 0.35\mylenA\usebox\myboxB}{\usebox\myboxA}% \else \hskip -0.5\mylenA\rlap{\usebox\myboxA}{\hskip 0.5\mylenA\usebox\myboxB}% \fi} \newcommand{\smallfrac}[2]{\scalebox{1.35}{\ensuremath{\frac{#1}{#2}}}} \newcommand{\medfrac}[2]{\scalebox{1.2}{\ensuremath{\frac{#1}{#2}}}} \newcommand{\textfrac}[2]{{\textstyle\ensuremath{\frac{#1}{#2}}}} \newcommand{\nsum}[1][1.4]{% only for \displaystyle \mathop{% \raisebox {-#1\depthofsumsign+1\depthofsumsign} \newcommand{\tr}{\operatorname{tr}} \newcommand{\e}{\operatorname{e}} \newcommand{\B}{\operatorname{B}} \newcommand{\Bbar}{\xoverline[0.75]{\operatorname{B}}} \newcommand{\pr}{\operatorname{pr}} \newcommand{\dd}{\operatorname{d}\hspace{-1pt}} \newcommand{\E}{\operatorname{E}} \newcommand{\V}{\operatorname{V}} \newcommand{\Cov}{\operatorname{Cov}} \newcommand{\Bigsum}[2]{\ensuremath{\mathop{\textstyle\sum}_{#1}^{#2}}} \newcommand{\ran}{\operatorname{ran}} \newcommand{\card}{\#} \newcommand{\Conv}{\mathop{\scalebox{1.1}{\raisebox{-0.08ex}{$\ast$}}}}% \usepackage{pgfplots} \newcommand{\filledsquare}{\begin{picture}(0,0)(0,0)\put(-4,1.4){$\scriptscriptstyle\text{\ding{110}}$}\end{picture}\hspace{2pt}} \newcommand{\mathds}{\mathbb}[/math]

Replicate the results of Figure. More precisely, run the code from Problem for different dimensions [math]d[/math] and different distance functions [math]\Delta=\Delta(d)[/math], e.g., [math]\Delta\equiv c \gt 0[/math], [math]\Delta=2\sqrt{d}[/math], [math]\Delta=d^{0.3}[/math] or [math]\Delta=d^{1/4}[/math]. Plot the rate of correctly classified data points as a function of the dimension. Simulate also the case [math]\Delta=2d^{0.2}[/math] and confirm that this leads to a low correct classification rate which decreases for large dimensions. \begin{center} \begin{tikzpicture} \pgfplotsset{scaled x ticks=false} \begin{axis} [ axis line style={thick, shorten > =-5pt, shorten < =-2pt}, y=100pt, x=0.0095pt, axis y line=left, axis x line=middle, axis line style={- > }, no markers, tick align=outside, major tick length=2pt, ymin=0.5, ymax=1.05, ytick={0.5,0.6,...,1}, xmin=200,xmax=10000, xtick={500,3000,6000,9000}, every tick label/.append style={font=\tiny}, xlabel=[math]\scriptstyle d[/math], every axis x label/.style={

  at={(ticklabel* cs:1.07)},
  anchor=west,

}, every axis y label/.style={

  at={(ticklabel* cs:1.2)},
  anchor=north,

}, ] \addplot[ mark=none] coordinates { (200,0.6812) (400,0.6777) (600,0.6661) (800,0.6648) (1000,0.6502) (1200,0.6532) (1400,0.6528) (1600,0.641) (1800,0.6525) (2000,0.6538) (2200,0.6436) (2400,0.6478) (2600,0.649) (2800,0.6432) (3000,0.6416) (3200,0.642) (3400,0.6418) (3600,0.6384) (3800,0.64) (4000,0.6442) (4200,0.635) (4400,0.6389) (4600,0.6361) (4800,0.6375) (5000,0.6283) (5200,0.6389) (5400,0.6287) (5600,0.6403) (5800,0.6367) (6000,0.6367) (6200,0.6385) (6400,0.6312) (6600,0.6287) (6800,0.6355) (7000,0.6394) (7200,0.6306) (7400,0.6334) (7600,0.6274) (7800,0.6346) (8000,0.6268) (8200,0.6275) (8400,0.6341) (8600,0.6364) (8800,0.6371) (9000,0.6338) (9200,0.6288) (9400,0.6309) (9600,0.6275) (9800,0.6333) (10000,0.634) }; \end{axis} \end{tikzpicture} \nopagebreak[4]\begin{fig}\label{SEP-FIG-4}Average rate of correctly classified data points for [math]\Delta=2d^{0.2}[/math].\end{fig} \end{center}