Project details for Nen

Screenshot Nen 1

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

view ( today), download ( today ), 0 subscriptions

Description:

Nen

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.

Command-Line-Examples:

 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

Command-Line-Parameters:

 Usage for Training:    java -jar nen.jar train [options] train_file model_file
 Options:
 -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
 Options:
 -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
 Options:
 -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)

Java-Example:

 // 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:
 nen.train(x,y,10000,0.005f,0.0000001f,false);

 // 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 mloss.org.

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

Comments

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.