add: training from file, the read data from file function has been adapted to meet the new record file function