Create training_algo.m

The training algorithm