public void trainNetwork(String csvfile, String outputfile) throws IOException {
        		File f = new File(csvfile);
        		if (f.isFile()) {
        			MLDataSet trainingD = getTrainingData("training.csv");
        			final ResilientPropagation train = new ResilientPropagation(getRbfnet(),trainingD);
        			
        			train.iteration();
        			System.out.println(train.getError());
        			int epoch = 1;
        			int epochSave = 1;
        			while (train.getError() > 0.001) {
                        train.iteration();
                        System.out.println("Iteration: " + epoch + " Error: "+train.getError());
                        epoch++;
                        if ((epoch - epochSave)> 15) {
                                saveNetwork(outputfile);
                                epochSave = epoch;
                        }
        			}
        		}
        			saveNetwork(outputfile);
        }