Pseudo-labelling in Semi-Supervised Learning: from theory to algorithms