parse parameters and realise the expected function (create training set / index / categorise)