Click here to Skip to main content
15,879,535 members
Articles / Programming Languages / Java

Benchmarking and Comparing Encog, Neuroph and JOONE Neural Networks

Rate me:
Please Sign up or sign in to vote.
4.89/5 (8 votes)
3 Jun 2010LGPL38 min read 68.4K   971   14  
I compare the performance of Encog, Neuroph and JOONE
import org.encog.util.logging.Logging;

public class Benchmark {

	public static final int INPUT_COUNT = 10;
	public static final int HIDDEN_COUNT = 20;
	public static final int OUTPUT_COUNT = 10;
	public static final int TRAINING_SIZE = 10000;

	public static final double LEARNING_RATE = 0.7;
	public static final double MOMENTUM = 0.7;
	public static final int ITERATIONS = 50;

	public static void performBenchmark(Benchmarkable benchmark)
	{
		GenerateData data = new GenerateData();
		data.generate(10000, Benchmark.INPUT_COUNT, Benchmark.OUTPUT_COUNT, -1, 1);
		double[][] input = data.getInput();
		double[][] ideal = data.getIdeal();
		benchmark.prepareBenchmark(input, ideal);
	}

	public static void main(String args[])
	{
		Logging.stopConsoleLogging();


		if( "encog".equalsIgnoreCase(args[0]))
		{
			Stopwatch.time("Encog", new BenchmarkEncog(0));
		}
		else if( "encog1".equalsIgnoreCase(args[0]))
		{
			Stopwatch.time("Encog", new BenchmarkEncog(1));
		}
		else if( "neuroph".equalsIgnoreCase(args[0]))
		{
			Stopwatch.time("Neuroph", new BenchmarkNeuroph());
		}
		else if( "joone".equalsIgnoreCase(args[0]))
		{
			Stopwatch.time("JOONE", new BenchmarkJOONE(false));
		}
		else if( "joone1".equalsIgnoreCase(args[0]))
		{
			Stopwatch.time("JOONE1", new BenchmarkJOONE(true));
		}

		System.exit(0);
	}
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The GNU Lesser General Public License (LGPLv3)


Written By
Other Rutgers University
United States United States
Hello, I am a student at Rutgers University. I am in computer science and am learning about machine learning and AI.

Comments and Discussions