Orange Forum • View topic - A Port of FANN Neural Network Library to Orange

A Port of FANN Neural Network Library to Orange

General discussions about Orange and with Orange connected things (data mining, machine learning, bioinformatics...).

A Port of FANN Neural Network Library to Orange

Postby JoeM » Tue Dec 18, 2012 17:05

Hey,

since I was not happy with the simple Orange.classification.neural, I've decided to wrap the FANN Neural Network Library into an Orange Learner (and Classifier). FANN library has a lot of functionality (apart from basic things like RPROP, it has cascade training, a lot of activation functions, sparse topologies, etc), so I thought this could be useful.

http://leenissen.dk/fann/wp/

The port requires pyfann package (python-pyfann here in ubuntu). It supports classification (both normal and the "multilabel") and reggression. The reggression is however limited to domain range <-1, 1>, resp to the domain range of output activation function of the network. I plan to improve this by some scaling in the future.

I have seen some attempts (like the gsoc, etc in the forum) but neither is finished as far as I am concerned. If I am mistaken and I am doing redundant work, please let me know.

In case anyone is interested, I've put it here
http://www.j2m.cz/~jm/fann_neural.py

Please notice that the wrap is not really production ready, I finished this just today :-), if you have any comments, please let me know. Since the api of the FANN is procedural, It is quite painful to set all the parameters in a nice way, so one has to look to the proper functions into the FANN documentation. There are quite some examples in the bottom and more will come.

I'd like to ask how is it with the hg repo? Would it be possible to get account so that I can maintain the code, or should I develop it separately?

Regards,
JM

Re: A Port of FANN Neural Network Library to Orange

Postby Ales » Thu Dec 27, 2012 19:28

JoeM wrote:If I am mistaken and I am doing redundant work, please let me know.
As far as I know, you are not doing any redundant work.
JoeM wrote:I'd like to ask how is it with the hg repo? Would it be possible to get account so that I can maintain the code, or should I develop it separately?
I think it would be best if you develop it separately. I don't think we can afford to introduce dependency on FANN and pyfann into the core library.

Re: A Port of FANN Neural Network Library to Orange

Postby jurezb » Sun Dec 30, 2012 11:31

Currently the only implementation of neural networks in Orange is Orange.classification.neural, which is a feedforward neural network with a single hidden layer trained by the backpropagation algorithm. Neural networks were also a topic in this year's Google Summer of Code project, but unfortunately, due to visa issues, we did not even get a chance start the project. Implementing the interface to FANN would not replicate any work we have done.

I have to agree with Aleš. Orange core would not be a good place to introduce new dependencies. You are best off creating an addon for Orange. I don't know if we have good documentation for building new addons, I'll have to get back to you on this one. The easiest way would be to modify one of the simpler addons (e.g. Orange-Multitarget).

Re: A Port of FANN Neural Network Library to Orange

Postby JoeM » Wed Jan 30, 2013 14:29

Hello,

I have extended the wrapper so that it has option autoscale_output, which allows for reggression
outside the domain of the output neurons transmission function (usually <-1,1>). This works by
linearly scaling the train data outputs onto <-1,1> before and rescaling outputs from reggression back. The min of the training data outputs is mapped to -1, max to 1, see comment for details.

http://www.j2m.cz/~jm/orange_hacks


Regards,
JM


Return to General Discussions