06/06/2015

Les maths mais c'est très simple

Les deux principales difficultées des mathématiques sont:
- de décrypter les notations mathématiques pour en extraitre les notions sous jacentes, d'une simplicité souvent déconcertante
- de comprendre la raison de l'utilisation d'une approche plutot qu'une autre, et donc l'objectif visé. Le contexte est une aide très puissante.

J'essaye dans la suite d'expliquer en quoi certaines notions mathématiques apparement complexes font en fait appel à des principes très simples.

* Mesurer la similarité de deux series temporelles (comprendre: suitre ordonée de nombres):

Si il y avait un seul nombre dans la série, on calculerait leur différence, en ignorant le signe. Plus la différence est grand, moins similaire sont les deux nombres.

En pratique:
- on fait la somme de la différence des éléments respectifs,
- on considère non pas leur différence directement mais une fonction caluclée à partir de leur différences

* Mesurer la diversité des élements dans une suite de nombres

On pourait vouloir comparer la somme de leur difference paire à paire.
Et pourquoi pas? Probablement par ce qu'il est necessaire de considérer n ² nombre pour une liste initiale de n nombres, ce qui n'est pas efficace et n'a pas necessairement de plus value.

en pratique:
On va mesurer la différence de chacun de ces élements par rapport à une valuer de réference, en l'occurence la moyenne.
On fait la somme de ces différences.

* Calculer la décomposition en fréquence d'un signal (comprendre: une suite ordonée de chiffre mesurée par un équipement électronique)

calcule la difference entre le signal et tout un ensemble de signaux généré pour des fréquence fixes et connues: la proximité avec chacun de signaux dit à quel point ce signal fixe contribu à la génération du signal.

le signal d'origine peut etre reconstitué par uen combinaison linéaire des coefficients

Dans le monde de tous les jours:
les fichier mp3 et autres formats compresés stockent la musique sous forme d'un suite de decomposition en fréquence à l'aide des contributions les plus significatives. chaque decomposition est fait pour un échantillon de temps donné. Il cela prends moins de place de stocker les coefficient pour un signal de 1 s, que le signal de 1 s.
les analyseur de frequence sur les joeurs de musique fonctionnent pareil, avec un nombre très restreint de frequences.

* maximiser deux fonctions à la fois

par exemple on veut maximiser à la fois le cout et la durée d'un trajet

le cas le plus courant:
maximiser la somme de ces fonctions... ou plus exactement un combinaison linéaire de celles ci.

* l'intégrale d'une fonction... qu'est ce que c'est?

C'est la somme de toutes les valeurs d'une fonction entre deux points A et B, multiplié par la distance entre A et B.

=> on intégère dans une seule dimension à la fois, i.e. pour un seul parametre de la fonction

à garder dans un coin:
Une intégrale d'une fonction donnant à une dimension donne une aire
Une intégrale d'une fonction à deux dimension donne un volume
etc.

* la derivée d'une fonction... qu'est ce que c'est?

C'est définir analytiquement comment se comporte une fonction autour d'un point

=> quand on dérive selon une seule dimension à la fois, i.e. pour un seul parametre de la fonction, on note l'opérateur donnant la dérivée d/di, d car on dérive, di car 1) c'est l'unique dimension selon laquelle on dérive et 2) c'est ce qui permet de retrouve la variation de la fonction à partir de son intégrale sur i

=> si une fonction à plusieurs parametre, sa derivée est l'ensemble des dérivées selon chacune de ces dimensions (ce qui se représente bien avec un vecteur, ie un tableau à une dimension).

=> si on considère la dérivée d'une fonction à deux dimension selon deux dimensions à la fois, on note d/dij, l'ensemble des dérivées se représente bien avec une matrice (ie un tableau à deux dimensions)

entre un point A et B la la difference entre f(A) et f(B) est égale à la somme de la fonction dérivée de f entre A et B pour l'ensemble des points qui s'y trouvent.

=> c'est donc égale à l'intégrale de la dérivée, divisié par la distance entre A et B.

* une fonction... qu'est ce que c'est?

La fonction est le verbe mathématique, elle est composée d'opérations primitives comme l'addition ou  la multiplication, ou peut avoir une définition fixée par une table, comme la fonction logarithme.

Une fonction transforme un ensemble une donnée en une autre donnée

* un vecteur... qu'est ce que c'est?

c'est un tableau à une dimension

qui à la particularité d'etre une ligne ou une colone

la multiplication de deux vector n'est possible que si celui de gauche est ligne et celui de droite colonne. (=> d'ou l'utilisation fréquente de l'opération transposition)
! cette opération fait deux chose à la fois: la multiplication de chaque couple d'élement, et la somme du résultat de ces opérations !

utilisation:
- si un des vecteur est un vecteur de scalaire et l'autre un vecteur de fonction, on peut ainsi représenter/noter une combinaison linéaire
- une série temporelle est un vecteur


* une matrice... qu'est ce que c'est?

c'est un tableau à deux dimensions

pour lequel l'opération de multiplication est définie d'une facon particulière

c'est une strucure de donnée générique: le lien sémantique définit par la celule à une position particulière est totallement dépendant du contexte.

Une utilisation importante des matrice est la représentation d'unc ensemle de fonction linéaire. Dans ce cas, chaque ligne de la matrice (si elle est à gauche de l'opérande, ou colonne si elle est à droite) represent le vecteur d'une combinaison linéaire.


---

idées à placer:

Un site web permettant d'expliquer en termes simple sle charabia d'une équation mathématique serait très utiles. On perd un de ces temps à décrypter des notations... C'est comme le sens conventionel du courant en éléctricité, une source inutile de confusion et une grande perte de temps qui se chiffre en centaines de milliers d'heures.
Je pense que si on était obligé d'écrire ses équations dans un éditeur d'équation ca aiderai déjà à y voir plus clair nous meme.


15/02/2015

De what we all want at work

Spoiler: whatever is our trade, we all crave for novelty and complexity: to do it if possible, to study it otherwise. But we almost never get to do it.

Immunovirologists are interested in working the deadliest virus on Earth, yet they likely get a job working on allergies.

Architects are interested in building the crazyest building, yet they likely get a job designing the most boring building.

Artificial intelligence scientists want to create confusingly smart algorithms, yet they get to do teaching or project management first and software engineering second.

Computer security experts are interest in studying and attacking the hardest networks, yet they got to do consulting selling useless product and services to clueless consumers.

Software engineers are interested in doing some algorithmics, yet they got to do just simple and boring coding.

14/02/2015

De how to invest in R&D

Money is the nerve of war - imperial wars.
Motivation is the nerve of war - partisan wars.

Same applies to economy, the real economy.

Large companies have the power to invest swaths of money and get little for it. 
Small companies led by passionate people could with little money create real value.

The issue are that:
- large company have too much money and not enough ideas -> they tend to invest in many wrong (because unsuccessful) directions, hopping for the best, i.e. that what they were working on takes off almost inexplicably.
- small companies, even individual, have more motivation than means -> they tend to work in one unique direction, the one they hardcore believe in, and as such are not rational. However, they might strike gold, because they are actually doing.

Both act irrationally, but there is a way to combine rationaly both: for large companies to buy small companies or individual and give them means.

And that's what happens.

I don't speak about buying sucesful startups like youtube, flickr, snapchat.

I speak about buying unknown companies or individuals that have little to show for.

There is a whole business in that. But this works properly not microcredit styles. It works strong backing style. If you put too much pressure on paying bills, you'll burn the usefull effort and time of people in useless stuff. If you want a solid product, you have to give a solid backing, without conditions. Just empower people by giving them the responsabilites of working for themselves - not a picky manager.

Because, at the end of the day, large companies manage many bullshit products most of which die, and real work gets done by passionate people that have their feet on the ground, project and management of little to do with it. The only thing that is needed in a project is the cash to develop something.

Same with individuals and small companies: you only do go work when you believe in what you do. And individual know more closely than large companies what works: because they are end users they know their needs. They don't need market studies, they are the market. Layers of hierarchy is an hindrance.

So for R&D tasks, hire normally talented and widely passionate people, they do the real stuff. You'll get much more from them than from people who work for money - and they are in much greater availability than highly talented ones. Work is about money only when you have no interest in what you do, otherwise you could do it for free.

Give R&D staff cash an freedom, and they'll do great stuff. Better invest 1 million in 8 yp than in 1 preventive patent.

Climbing the hierarchy ladder gives you more money, but also there it is mainly for the pleasure of being in command (to say the least) that drives people. That's why CEO guys for whom work is a passion can not understand regular employees for whom work is a hassle.

Anyway, the more money you pay an employee, the less life looks like a script and the more life looks like a game where you have the upper hand over it, therefore the more enjoying it is, and an happy employee is a productive one. So raise the salaries to raise the profits.








06/02/2015

Mathematical Notations are Hell

The problem with mathematics is simple: notations. It make everything hard. Specially for the student that freshly joins the university and has to deal with a lot of similar yet incompatible notations and corresponding way of thinking. There are a lot of loosely defined conventions (when not an article's author ones) that make understanding mathematical text .

For instance:
f: is it a function, is it a scalar?
a: is it a function, is it a scalar?

What a strange notation system where letter of item of the same set have implictly different type, unless explicitly stated otherwise.

For instance:
f: should be a function
a: should be a scalar, or a vector
m : shoud be an integer index

if the value of the character is so important to its type then why changing case, changes types, but in unrelated and incompatible ways?

For instance:

F: integral of f
F: set named F
F: function named F
A : matrix
A : vector
A : set
M : matrix (and only a matrix)

What a strange notation system, where a space and lack of it have a signification?

For instance:
aa = a*a
a a = a*a

What a strange notation system where symbols have very different meanings:

For instance, what do you read here?

f(a) : apply the function f with the parameter a
f(a) : multiply the scalar f with scalar a
f(a) : multiply scalar f with vector a

f^a : scalar f to the power a
f^a : function f in a set of family of functions indexed by a?
f^a : scalar noted f^a

What a strange language where the semantics of operation can change:

For instance:

f(a) : apply the function f with argument a
f(a) : declare a predicate f for argument a
f(a) = : define the value of f for a variable called a (unbound variable, ie generic)
f(a) = : define the value of f for a value called a (bound variable, ie given)

Maths are hard to understand because mathematical notation are notation, they are not a language. Which means that with every field, subfield and individual research paper tou have to learn from scratch what the scrible you read mean.

In a sens they are a spreceise a writing "todo: buy stuff" on piece of paper: when you'll read it you'll have to struggle a lot to understand what the author meant.

That's too bad to crush the opportunity of the masses to understand an use mathematics on the whim of using notations. Like the dreadful conventional direction of current in electrical engineering... which is like calling a fish a pig an then trying to understand how do pig swim.


A great source of confusion come from the fact that sometimes letter denote vectors rather than scalar, and operations apply differently to them. Because summation and combination operations are implicit, it makes it more difficult to understand. For instance when considering matrices, it is important to know it it is a product or a tensorial product that is applied.

When multiplying two letters, possibly:
- we multiply a vector by a scalar which yields a vector,
- we multiply a line vector by a column vector, which yields a scalar
- we multiply a column vector by a line vector, which is an error
- we multiply a matrix and a vectors,  or a matrix and a scalar, etc.