1

I am new to working with java. I wanted to know the requisites and the procedure to use the FANN-1.1 tool library in java to train a set of data.

The code given in https://code.google.com/p/fannj/ is

 Fann fann = new Fann( "/path/to/file" );
    float[] inputs = new float[]{ -1, 1 };
    float[] outputs = fann.run( inputs );
    fann.close();

here what is /path/to/file

Cleber Jorge Amaral
  • 1,316
  • 13
  • 26
  • The best way to start with FANNJ is probably the the test class available in FANNJ github repository. You can use maven "mvn install" to make few tests and check how it works easily. https://github.com/krenfro/fannj/blob/master/src/test/java/com/googlecode/fannj/FannTest.java – Cleber Jorge Amaral Sep 05 '17 at 13:33

1 Answers1

0

According to fann source codes it seems to be a pointer to a configuration file. You probably should use "fann_set_user_data" in your existing ANN in C. It would create a file retrievable by "fann_get_user_data" function and also would be what fannj example is expecting. Fannj implementation has many other function interfaces, so, it is only an example.

Sources: http://leenissen.dk/fann/html/files/fann-h.html#fann_set_user_data https://github.com/krenfro/fannj/blob/master/src/main/java/com/googlecode/fannj/Fann.java

Cleber Jorge Amaral
  • 1,316
  • 13
  • 26