Relational Model

This is the classical format that we encounter, it is the format used for relational databases introduced in databases course introduction, introduced in (Codd 1970). Introduzione, i modelli di dati Lista modelli di dati (4) Nel tempo sono stati sviluppati molti modelli di dati: Relational Data Model: This is the most common data model and uses tables to represent data. It organizes data into rows and columns, where each row represents a record, and each column represents an attribute of that record. Relationships between data are established through keys. ...

Reading Time: 5 minutes ·  By Xuanqiang 'Angelo' Huang

Programmazione lineare

Vogliamo cercare di restare nel nostro spazio delle soluzioni ammissibili, senza dover stare ad esplorare tutto, vogliamo andare a concentrarci su una parte specifica di essa. Vogliamo utilizzare una struttura fondamentale per i problemi di programmazione lineare, che è quello con cui vogliamo andare a fare. Il fatto è che spostandoci leggermente da un punto tra le soluzioni, possiamo gestire in modo molto semplice il modo con cui si sposta la retta dei valori. ...

Reading Time: 6 minutes ·  By Xuanqiang 'Angelo' Huang

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: ...

Reading Time: 3 minutes ·  By 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 ...

Reading Time: 3 minutes ·  By 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. ...

Reading Time: 4 minutes ·  By 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 ...

Reading Time: 4 minutes ·  By 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}$). ...

Reading Time: 1 minute ·  By 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! ...

Reading Time: 3 minutes ·  By 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. ...

Reading Time: 6 minutes ·  By 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). ...

Reading Time: 2 minutes ·  By Xuanqiang 'Angelo' Huang