Project details for Nen

Screenshot Nen 1

by pascal - February 1, 2012, 20:08:41 CET [ Project Homepage BibTeX Download ]

view (5 today), download ( 0 today ), 1 subscription



Neural Network Implementation in Java

3-layer neural network for regression with sigmoid activation function and command line interface inspired by LibSVM.

Quick Start: "java -jar nen.jar"

Data Format:

Nen reads and writes LibSVM datasets.


 java -jar nen.jar scale abalone abalone_scaled
 java -jar nen.jar split abalone_scaled abalone_train abalone_test
 java -jar nen.jar train abalone_train abalone_model
 java -jar nen.jar predict abalone_test abalone_model abalone_predictions


 Usage for Training:    java -jar nen.jar train [options] train_file model_file
 -t model_type : set type of model (default 1)
    1 -- Regression
    2 -- Classification (not yet implemented)
 -h hidden : set number of hidden units (default 4)
 -n steps : set number of iterations (default 10000)
 -lrstart l : set start-value of learnrate (default 0.005)
 -lrend   l : set end-value of learnrate (default 0.0000001)

 Usage for Prediction:  java -jar nen.jar predict test_file model_file output_file

 Usage for Scaling: java -jar nen.jar scale [options] input_file output_file
 -t type : set scaling-type (default 1)
    1 -- Scale both X and Y (for Regression problems)
    2 -- Scale only X (for Classification problems)

 Usage for Split:   java -jar nen.jar split [options] input_file train_outputfile test_outputfile
 -t data_type : set type of data (default 1)
    1 -- Regression
    2 -- Classification (not yet implemented)
 -r seed : set seed for split (default 0)
 -p train_percentage : set trainsize in % (default 80)


 // Create data (1000 data points, 8 attributes)
 float[][] x=new float[1000][8];
 float[][] y=new float[1000][1];

 // Fill your data:

 // Create an 8x16x1 regression network:
 Nen nen=new Nen(Type.Regression,8,16,1);

 // Train network 10000 steps, learnrate 0.005..0.0000001, not quiet:

 // Get Predictions for training set (true for threadsafe):
 float[][] p=nen.get(x,true);

 // Get Training Error (Mean-Squared)
 float e=nen.getError(p,y);
Changes to previous version:

Initial Announcement on

BibTeX Entry: Download
URL: Project Homepage
Supported Operating Systems: Platform Independent
Data Formats: Libsvm
Tags: Neural Networks
Archive: download here

Other available revisons

Version Changelog Date

Initial Announcement on

February 19, 2012, 00:31:34
- alpha -

Initial Announcement on

February 1, 2012, 20:23:49

Initial Announcement on

February 1, 2012, 20:08:41


No one has posted any comments yet. Perhaps you'd like to be the first?

Leave a comment

You must be logged in to post comments.