public static void runWith(DataSet ds, float learningRateRatio, float momentumRatio,
		int[] hydenLayer){
		long startTime = System.currentTimeMillis();
		String hydeStr = "";
		for (int i = 0; i < hydenLayer.length-1; i++) {
			hydeStr+=String.valueOf(hydenLayer[i])+"+";
		}
		System.out.print(String.format("\""+ds.getFileName()+" ("+hydeStr.substring(0, hydeStr.length()-1))+")\", ");
		int epoch;
		// vectores para posteriormente calcular media y desviación
		double[] minErrorValidationAcum = new double[_RUNS];
		double[] minErrorTrainingAcum = new double[_RUNS];
		double[] minErrorTestAcum = new double[_RUNS];
		double[] minTestClassification = new double[_RUNS];
		double[] accuracyError = new double[_RUNS];
		double[] minGl5 = new double [_RUNS];
		int[] relevantEpoch = new int[_RUNS];
		int[] totalEpoch = new int[_RUNS];
		
		for (int itr = 0; itr < _RUNS; itr++) {
			
			double minSqrErrorPercentValidation = Double.MAX_VALUE;
			double minSqrErrorPercentTestClassification = Double.MAX_VALUE;
			double gl5=0;
			
			RNA redNeuronal = new RNA(ds.getNumInputs(), hydenLayer);
			redNeuronal.getLayer(1).setIsSigmoid(false);

			int finalEpoch=0;
			
			for(epoch=0; epoch<_MAX_EPOCHS; epoch++){
				
				double minSqrErrorTraining = Double.MAX_VALUE;
				double sumatoryTrainingError = 0;
				finalEpoch = epoch;
				traing_over_dataset(ds.getTrainingExamplesSize(), redNeuronal, 
						ds.getTrainingExamples(), learningRateRatio, momentumRatio);
				
				if(epoch % _VERIFY_EPOCHS==0 && epoch!=0){
					
					double currentErrorVa = redNeuronal.squaredErrorPercentage(ds.getValidationExamples(),
							ds.getNumOutputs());
					
					double currSqrErrorTraining = redNeuronal.squaredErrorPercentage(ds.getTrainingExamples(), ds.getNumOutputs());
					sumatoryTrainingError += currSqrErrorTraining;
					
					// actualizamos el mínimo error sobre training
					if(currentErrorVa<minSqrErrorTraining){
						minSqrErrorTraining = currentErrorVa;
					}
					
					// comprobamos GL5
					gl5 = 100 * (currentErrorVa / minSqrErrorPercentValidation - (double)1 );
					
					if (currentErrorVa < minSqrErrorPercentValidation){
						minSqrErrorPercentValidation = currentErrorVa;
						relevantEpoch[itr] = epoch;
						minSqrErrorPercentTestClassification = redNeuronal.squaredErrorPercentage(ds.getTestExamples(), ds.getNumOutputs());
					}
					
					// comprobamos si aprende
					double trainingProgressSank = ((sumatoryTrainingError/(5*minSqrErrorTraining))-1)*1000; 
//					if( trainingProgressSank < _PROGRESS_SANK ){
//						break;
//					}
					
					if (gl5 > 5){
						break;
					}
				}
			}
			
			minGl5[itr] = gl5;
			totalEpoch[itr] = finalEpoch;
			
			minTestClassification[itr] = minSqrErrorPercentTestClassification;
			
			// se almacenan los mínimos errores
			minErrorValidationAcum[itr] = minSqrErrorPercentValidation;
			minErrorTrainingAcum[itr] = redNeuronal.squaredErrorPercentage(ds.getTrainingExamples(), 
					ds.getNumOutputs());
			minErrorTestAcum[itr] = redNeuronal.squaredErrorPercentage(ds.getValidationExamples(), 
					ds.getNumOutputs());
			accuracyError[itr] = accuracyOverDataSet(redNeuronal,ds.getTestExamples());
			
		}
		// media y desviación sobre training
		double meanTr = mean(minErrorTrainingAcum);
		double stdTr = standardDeviationMean(minErrorTrainingAcum);
		System.out.print(String.format("\"%.3f\", \"%.3f\", ", meanTr, stdTr));
		
		// media y desviación sobre validation
		double meanVa = mean(minErrorValidationAcum);
		double stdVa = standardDeviationMean(minErrorValidationAcum);
		System.out.print(String.format("\"%.3f\", \"%.3f\", ", meanVa, stdVa));
		
		// media y desviación sobre test
		double meanTest = mean(minErrorTestAcum);
		double stdTest = standardDeviationMean(minErrorTestAcum);
		System.out.print(String.format("\"%.3f\", \"%.3f\", ",meanTest,stdTest));
		
		// media y desviación sobre test classification
		double meanTestClassification = mean(minTestClassification);
		double stdTestClassification = standardDeviationMean(minTestClassification);
		System.out.print(String.format("\"%.3f\", \"%.3f\", ",meanTestClassification,stdTestClassification));
		
		// overfit, el gl5 al final del entrenamiento
		double meanOverfit = mean(minGl5);
		double stdOverfit = standardDeviationMean(minGl5);
		System.out.print(String.format("\"%.3f\", \"%.3f\", ",meanOverfit,stdOverfit));
		
		// media y desviación sobre relevant epoch
		double meanTotalEpoch = mean(totalEpoch);
		double stdTotalEpoch = standardDeviationMean(totalEpoch);
		System.out.print(String.format("\"%.0f\", \"%.0f\", ", meanTotalEpoch, stdTotalEpoch));
		
		// media y desviación sobre relevant epoch
		double meanEpoch = mean(relevantEpoch);
		double stdEpoch = standardDeviationMean(relevantEpoch);
		System.out.println(String.format("\"%.0f\", \"%.0f\" ", meanEpoch, stdEpoch));
		
		//System.out.println(String.format("Porcentaje de error en clasificación medio en las iteraciones es %.4f", mean(accuracyError)));
		
		
		long totalTime = (System.currentTimeMillis()-startTime)/1000;
		//System.out.println("Tiempo empleado: "+totalTime+" segundos\n\n");
		
	}