added functions

added gerErrorFigure functions
changed plotError to accommodate both train and test plot