Learning totally implemented.

TODO:
Document better the functions with some tricks to sweep the decision
function space.