Spazi vettoriali

Spazi vettoriali 1.1 Piano cartesiano 1.1.1 Definizione Possiamo considerare il piano cartesiano come l’insieme $\R^2$ potremmo dire che esiste una corrispondenza fra una coordinata e un punto del piano, una volta che abbiamo definito un punto di origine. Si può vedere anche come corrispondenza biunivoca con vettori del piano per l’origine (parte dall’origine). Questa cosa vale anche per uno spazio n-dimensionale, non soltanto due, ma per semplicità di introduzione di questo lo faccio con 2 ...

7 min · Xuanqiang 'Angelo' Huang

Derivate

Geometria introduttiva Tangente e pendenza Si può trovare la relazione fra la pendenza della retta e la tangente. Possiamo analizzare la retta dal punto di vista analitico, della formula e si può dimostrare che data una retta nella forma $y = mx + q$ $m$ è la pendenza della retta. Formula generale delle rette Dati qualunque due punti .$(x_1, y_1), (x_2, y_2)$ possiamo dire che la pendenza è esprimibile come ...

4 min · Xuanqiang 'Angelo' Huang

Maximum Entropy Principle

The maximum entropy principle is one of the most important guiding motives in artificial artificial intelligence. Its roots emerge from a long tradition of probabilistic inference that goes back to Laplace and Occam’s Razor, i.e. the principle of parsimony. Let’s start with a simple example taken from Andreas Kraus’s Lecture notes in the ETH course of Probabilistic Artificial Intelligence: Consider a criminal trial with three suspects, A, B, and C. The collected evidence shows that suspect C can not have committed the crime, however it does not yield any information about sus- pects A and B. Clearly, any distribution respecting the data must assign zero probability of having committed the crime to suspect C. However, any distribution interpolating between (1, 0, 0) and (0, 1, 0) respects the data. The principle of indifference suggests that the desired distribution is $(\frac{1}{2}, \frac{1}{2}, 0)$, and indeed, any alterna- tive distribution seems unreasonable. ...

2 min · Xuanqiang 'Angelo' Huang

Multi Variable Derivatives

Multi-variable derivative To the people that are not used to matrix derivatives (like me) it could be useful to see how $$ \frac{ \partial u^{T}Su }{ \partial u } = 2Su $$ First, we note that if you derive with respect to some matrix, the output will be of the same dimension of that matrix. That notation is just deriving every single component independently and then joining them together, so it will be better understood as as $$ \frac{ \partial u^{T}Su }{ \partial u } = \begin{bmatrix} \frac{ \partial u^{T}Su }{ \partial u_{1} } \ \dots \ \frac{ \partial u^{T}Su }{ \partial u_{M} } \ \end{bmatrix} $$ So we can prove each derivative independently, it's just a lot of manual work! We see that $u^{T}Su$ is just a quadratic form, studied in Massimi minimi multi-variabile#Forme quadratiche so it is just computing this: $$ u^{T}Su = \sum_{i, j = 1, 1}^{M} u_{i}u_{j}S_{ij} \implies \frac{ \partial u^{T}Su }{ \partial u_{1} } =2u_{1}S_{11} + \sum_{j \neq 1}^{M}(u_{j}S_{1j} + u_{j}S_{j1}) = 2\left( u_{1}S_{11} + \sum_{j \neq 1}u_{j}S_{1j} \right) = 2(Su)_{1} $$ Last equation is true because $S$ is a symmetric matrix, then we easily see that indeed it’s true that indeed it’s the first row of the $Su$ matrix multiplied by 2. ...

5 min · Xuanqiang 'Angelo' Huang

Optimal Minimax Facility Location

In this note we will briefly present one problem common in operation research. The practical needs that formulated this problem are quite obvious: choosing the best location to build some important services for communities. The optimal minimax facility location refers to the placement of a facility (such as a warehouse, hospital, or service center) in such a way that the maximum distance or cost between the facility and any of the demand points (such as customers, patients, or users) is minimized. This approach is particularly useful when the goal is to ensure that no demand point is too far from the facility, thus providing a form of equity in service delivery. ...

3 min · Xuanqiang 'Angelo' Huang

Structured Query Language

Little bits of history It was invented in 1970 in Almaden (San Jose) by IBM (Don Chamberlin, Raymond Boyce worked on this) for the first relational database, called system R. Then for copyright issues it hasn’t been called SEQUEL, so they branded it as SQL. SQL is a declarative language With declaratives language there is a separation between what I call the intentionality and the actual process. In declarative languages we just say what we want the result to be, and don’t care what the actual implementation is like. This allows queries to be executed and optimized in different ways, even if the query on the surface is the same ...

7 min · Xuanqiang 'Angelo' Huang

Successioni

3.1 Successioni $$ \begin{cases} f: \mathbb{N} \to \mathbb{R} \\ n \to f(n) \\ \{a\}_{n \in \mathbb{N}} \vee a_n \end{cases} $$$$ \left\{ a \right\} _{n \in \mathbb{N}} $$3.1.1 Immagine e successione L’immagine di una successione (l’insieme dei suoi elementi) non è una successione! la successione è anche ordinata. 3.1.2 Limitazioni della successione Come per gli insiemi si può definire se l’insieme è limitato superiormente, inferiormente o entrambi, a seconda di come lo definiamo in questo modo possiamo poi farci altri ragionamenti ...

5 min · Xuanqiang 'Angelo' Huang

Uniform Resource Identifier

URI Sono stata LA vera invenzione di Berners Lee accennati in Storia del web. Il problema è avere un modo per identificare una risorsa in modo univoco sull’internet. Introduzione La risorsa 🟩 Una risorsa è qualunque struttura che sia oggetto di scambio tra applicazioni all’interno del World Wide Web. Ora una risorsa può essere qualunque cosa, non solamente solo un file! Quindi è agnostico rispetto a contenuto oppure metodo di memorizzazione del dato, appare anche in questo ambiente importante vedere quanto siano importanti standard che permettano una comunicazione ...

6 min · Xuanqiang 'Angelo' Huang

Relational Algebra

Introduzione all’algebra relazionale Confronto con relazioni matematiche Le relazioni come le intendiamo in database sono leggermente diverse rispetto a quelle presenti per le relazioni matematiche: Non conta l’ordine Ci sono gli attributi Per il resto se introduciamo questo sistema per tenere conto delle astrazioni, possiamo analizzarle matematicamente, e questo ci fornisce qualche sicurezza in più diciamo. Four types of operations Set operations: union, intersection, difference Filter queries: Projecting or selecting Renaming queries: renames Join: correlare tuple di relazioni diverse Definition of tuples 🟩 Le relazioni sono esattamente quelle definite in matematica, però noi aggiungiamo anche gli attributi, in modo da poter considerare l’ordine delle colonne non importante. ...

8 min · Xuanqiang 'Angelo' Huang

Bloom Filters

How Bloom Filters Work A Bloom filter is a space-efficient probabilistic data structure used to test whether an element is possibly in a set or definitely not in a set. It allows for false positives but never false negatives. One example of application is the membership query in Wide Column Storage, HBase. They make document lookup faster by completely skipping some HFiles. Structure and Initialization A Bloom filter consists of: A bit array of size $m$, initialized to all 0s. $k$ independent hash functions, each mapping an input element to one of the $m$ positions in the bit array. Common operations Insertion of an Element To insert an element $x$: ...

2 min · Xuanqiang 'Angelo' Huang