Norme e Condizionamento

Errore inerente Bisogna cercare di generalizzare il concetto di errore e lo si fa con la norma Norma vettoriale È una funzione da $f: \mathbb{R}^n \to \mathbb{R}$ indicata con due barrette, questa funzione mi dà un concetto di distanza. Proprietà della norma Si definisce una norma una funzione che soddisfa queste proprietà $\lVert x \rVert \geq 0$ per ogni $x \in \mathbb{R}^{n}$ $\lVert x \rVert = 0 \iff x = 0$ $\lVert \alpha x \rVert = \lvert \alpha \rvert \lVert x \rVert$ per ogni $x \in \mathbb{R}^{n}$ e $\alpha \in \mathbb{R}$ Vale la disuguaglianza triangolare, ossia $\forall x, y \in \mathbb{R}^{n}, \lVert x + y \rVert \leq \lVert x \rVert + \lVert y \rVert$. Convessità Analizzato meglio in Analisi di Convessità. Si può dimostrare tramite la proprietà 3 e 4 che la norma è una funzione convessa. Infatti sia $f$ la funzione che soddisfa le proprietà della norma (quindi effettivamente si può chiamare norma). Allora: ...

3 min · Xuanqiang 'Angelo' Huang

Tecniche algoritmiche

In questa nota andiamo a parlare in modo sommario (si impara probabilmente molto meglio con la pratica) di generali tipologie di approcci che esistono per affrontare problemi di tipo algoritmico. Divide et impera Introduzione Abbiamo già visto L’utilizzo di questa tecnica per quick e merge sort in Algoritmi di ordinamento Questa tecnica si focalizza in tre passi fondamentali: Dividere il problema in sotto-problemi Risolvere il sotto-problema Mergiare le soluzioni di questi sotto-problemi. Questa è più una tecnica che si impara di più con la pratica, andremo a fare un problema che utilizza questa tecnica ...

3 min · Xuanqiang 'Angelo' Huang

Advanced SQL

Check function A volte può essere molto pesante, perché What does check do? Viene utilizzato per introdurre un constraint check per avere sicurezza su un range. Check e innestamenti Può essere che certe implementazioni non permettano il check innestato, questo è una cosa molto pesante, perché ogni modifica deve andare a rifare la modifica ai subalterni, quindi questo è pesante pesante. Assertions Sono dei check fatti al livello dello schema, quindi valgono sempre, e possono essere riutilizzati in table diversi credo. Un altro aspetto è che è database wide. ...

4 min · Xuanqiang 'Angelo' Huang

Variabili aleatorie

Le variabili aleatorie ci permettono di dire qualcosa sullo spazio di probabilità senza andare troppo nei dettagli a considerare singoli eventi e cose simili. Variabili aleatorie discrete Con le variabili aleatorie cominciamo ad entrare nel noccio della questione, finalmente possiamo in un certo senso legare l’outcome di un evento, alla probabilità dell’evento. Definizione Variabili aleatorie Si definisce variabile aleatoria $X$ una funzione da $\Omega \to E$, con $\Omega$ il nostro spazio campionario, e $E$ qualunque insieme (quando $E = \mathbb{R}$ si parla di variabile aleatoria reale ...

4 min · Xuanqiang 'Angelo' Huang

Introduction to Information Theory

The course will be more about the the quantization, talking about lossless and lossy compression (how many bits will be needed to describe something? This is not a CS course so it will not be so much algorithmically focused course), then we will talk about channel and capacity and DMC things. Most of the things explained in the Lapidoth course will be theoretical there will be some heavy maths. The professor starts with some mathy definitions (not very important, just that the $\mathbb{E}[ \cdot]$ needs a domain to be defined, so notations like $\mathbb{E}[x]$ do not make sense, while $\mathbb{E}[g(x)]$ do make sense because $g(x) : \mathcal{X} \to \mathbb{R}$). ...

1 min · Xuanqiang 'Angelo' Huang

Expressiveness of NN

The perceptron Slide summary of working of perceptron Note on the bias: it is only useful to move the treshhold where to consider the output to be 1 and where to be 1. Now we ask what can be predicted by a perceptron? We can see the update rule of the perceptron: $$ \begin{cases} w = w + \alpha x \\ b = b + \alpha \end{cases} $$$$ \alpha = \begin{cases} 0 & \Theta(x \theta + b) = y \\ -1 & \Theta(x \theta + b) > y \\ 1 & \Theta(x \theta + b) < y \end{cases} $$Linearly separability necessity Hyperplanes, because that equation is an hyperplane, so we are sure that we can predict an hyperplane, and that it, and it’s only it. (it’s predicting wheter it can be above or below that line). So the perceptron is correct only if the data is linearly separable! ...

3 min · Xuanqiang 'Angelo' Huang

Connettivi Logici, correttezza, variabili

8.1 Dimostrazione teorema invarianza 8.1.1 Introduzione Basi: Due proposizioni sono equivalenti quando valgono sugli stessi mondi. quindi $\forall v, \llbracket F \rrbracket ^v \equiv \llbracket G \rrbracket ^ v$. Vogliamo dire che dati un buco presente in una proposizione, queste valgono sempre, sono in effetti equivalenti. Il buco la prendo come una variabile proposizionale. (riempire = rimpiazzare il buco) 8.1.2 Operazione di sostituzione Si può notare che ci sono 4 casi base, mentre le altre 4 sono per ricorsione strutturale. ...

6 min · Xuanqiang 'Angelo' Huang

Metric Spaces

There is a close relationship between topologies and metric spaces. We will see that every metric space directly induces a topology based on its metric. (from a CS point of view, this means topologies are more general than metric spaces). Definition of Metric Space We say that $(\mathcal{X}, d)$ is a metric space if $\mathcal{X}$ is a set and $d$ a function $\mathcal{X} \times \mathcal{X} \to \mathbb{R}$ such that: Distance from it self is zero $d(a, b) = 0 \iff a = b$ Symmetric function: $d(a, b) = d(b, a), \forall a, b \in \mathcal{X}$ Triangle inequality is satisfied: $\forall a, b, c \in \mathcal{X}: d(a, b) + d(b, c) \geq d(a, c)$ Induced topology If we define the sets $B(c, r) = \left\{ p \in \mathcal{X} \mid d(p, c) < r \right\}$ to be open, this induces a topology $(\mathcal{X}, \mathbb{B})$ where $\mathbb{B} := \left\{ B(c, r) \mid c \in \mathcal{X}, r \in\mathbb{R} \right\}$. This should be easy to verify, but it is mostly uninteresting and quite intuitive (i’m not reasoning like a mathematician now). ...

2 min · Xuanqiang 'Angelo' Huang

Time and Space Complexity

In this note we explore a theme of time and space complexity. Those are cardinal themes in Theoretical CS. Time -> execution step bounds on algorithms Space -> the cells visited by a Turing Machine when executed. Introduction to Time Complexity This note will build upon know techniques of algorithms analysis explained in Notazione Asintotica. We will need big-$O$ notation and $o$ notation. L’idea è che il problema di decisione è decidibile se limito la lunghezza del teorema. Simile al numero di Chaitin, che non è computabile, ma è approssimabile quanto si vuole. In un certo senso è computabile. The general idea is to ask how the function $\varphi$ that maps the longest $n$ proof to the number of steps of computation behaves. ...

7 min · Xuanqiang 'Angelo' Huang

Topological Spaces

Introduction to topological spaces We want now to extend the idea of continuity presented in limits, which is a function $f : E^{n} \to E^{n}$ is continuous if given $x$ then $\forall\varepsilon > 0$ $\exists \delta$ such that $\forall y : \lVert y -x \rVert < \delta \implies \lVert f(y) - f(x) \rVert < \varepsilon$. But we want to get rid of the idea of distance, and base our definition on the idea of neighborhoods, which in $E^{n}$ are just spherical radius centered around a point. ...

9 min · Xuanqiang 'Angelo' Huang