Added a class TrainModel which takes an optional parameter -avg followed by number of times to train a model to get an avergae model