Makhfi.com  
Fascinating World of Neural Nets  
add to favorites   tell a friend
Home
Introduction to KCM
Why Neural Nets?
Introduction to ANN
ANN in Real World
Tools & Utilities
Blog Articles
Discussion Board
Resources
Experts
News
Events
Contact
NNDef Toolkit
Knowledge Models
nBank Project
 

NNDef ToolKit


 

Download:
Command line execution:

NNDef can be executed from commandline as followed:

Java -jar NNDefRun.jar

Above command will prompt the user for XML file name.
NNDefRun will then parse the file and prompt the user for all inputs required for processing selected model. Finally it will display the result as computed.

This mode is recommended for testing and integration with non-java based application.

To enable debugging information use the -log parameter as followed:

Java -jar NNDefRun.jar -log
 

Library binding:


Following sample code shows the integration method of NNDef into a java application:

import java.io.IOException;
import com.makhfi.NN.NNDefRun;

public class test{

  public static void main(String args[]){
        String XMLFName = "nndef_sample.xml";
        double[] inputs={0.25, 0.7, 0.5};

        NNDefRun r = new NNDefRun(XMLFName);
        r.setInputs(inputs);

        try{
            r.execute();
        }catch (Exception e){
            System.out.println("Exception in execute() Message: "+e.toString());
            return;
        }

        double[] outputs = r.getOutputs();
        String[] outputNames = r.getOutputNames();

        for (int i=0; i<outputs.length; i++){
            System.out.println("Output "+outputNames[i]+" has value "+outputs[i]);
        }

    }//main

}//test


As Alternative to NNDefRun.execute() you may use NNDefRun.start() which will run the model in a separate thread. Multithreaded version could be desirable for computational intensive models.
 

Public Methods:


public NNDefRun()

public NNDefRun(String XMLFile)

public NNDefRun(String XMLFile, double[] inputs)

public void setInputs(double[] inputs)

public double[] getOutputs()

public String[] getInputNames()

public String[] getOutputNames()

public void setXMLFile(String XMLFName)

public void setLogging(boolean logging, String logFName)

public double[] execute() throws IOException

public void start()
 

 
Stay tuned for release of C++ and Perl version
 


Last Update: 01/02/2004