Step by Step: How to use Intro to Neural Networks in NetBeans (Edition2, Java) Examples

jeffheaton's picture

In this tutorial I will show you how to download, install, and execute the examples for “Introduction to Neural Networks for Java, 2nd Edition”. This example shows how to use the NetBeans IDE. If you would like to use Eclipse, this is covered in a separate tutorial.

The first step is to download the book’s examples. These can be found at the following URL:

http://www.heatonresearch.com/download

The file you should download is named.

IntroNeuralJavaExampesEdition2.zip

You should download it to your computer and unzip it. This archive unzips to a folder of the same name. For this example, I am going to unzip it to the following path:

c:\JavaIntroNeuralNetworkEdition2

It can be unzipped to any directory you choose. Notice a folder named “dist”? It is very important that you delete this folder, for NetBeans to operate properly. You can see the unzipped files here, with the “dist” folder still present.

You are now ready to start NetBeans. Once NetBeans is launched you should see something similar to the following. Your output window will likely have a different name.

You can create your workspace anywhere you like. Usually it is best to accept the default location that Eclipse suggests. Choose to create a “New Project” from the file menu. This will launch a wizard, similar to the following.

Choose to create a new “Java Project with Existing Sources”. Choose Next. This will reveal the following window.

On this wizard window you should the folder that you unzipped the examples into. You should also give your project a name. This name will be displayed in NetBeans to help you identify this project later. Choose “Next” to continue. You will now see the following wizard window.

This window allows you to choose the source folder. The source folder is named “src”. Click the “Add Folder” button and you will see a window similar to the following.

Here you can see your project folders. Choose the “src” folder. Once the folder has been selected, click “Open”. This will take you back to the previous window. From this window choose “Next”, and you will see the following Wizard Window.

This window displays the includes and excludes. There is nothing to do here. Simply click “Finish”. You will now see your imported project. This will look similar to the following.

Navigate to the Chapter 5, XOR example. You can see this example here.

Right-click the XOR example and choose “Run File”. You will now see the output from the XOR example. This example should look something like the following.

You have now run your first example. As you work through the book, you can post any questions to the forums at our website.

http://www.heatonresearch.com/forum


Copyright 2005 - 2012 by Heaton Research, Inc.. Heaton Research™ and Encog™ are trademarks of Heaton Research. Click here for copyright, license and trademark information.