Contributor - Neural Network module
Description
Provides a Neural Network Toolbox for Scilab.
Ideas
Several libraries exist. From these libraries, two main libraries can be highlighted:
- FANN: a C library which implements classical neurals networks and is actively developped. For the version 3, FANN will integrate recurrent neural networks, several accelerated neural networks (based on blas or on a GPU implementation). This library works on windows, unix, MacOS;
- SNNS: a tool with a graphical interface. This tool implements nearly all the know neural networks (recurrent, SOM, etc...). The big problem with SNNS: it's not anymore supported. The kernel (the neural network library) is compilable on unix, but nothing has been done for windows or MacOS.
- CSIM: a Neural Circuit Simulator. A biology oriented neural network library with a Matlab interface.
Work done
A first version of an interface to FANN has been developped on version fann-2.1.0beta. Every fann functions are interfaced to scilab. Here is an example of a scilab-fann script:
filename = 'abelone.train'; max_epochs = 1000; desired_error = 1e-5; cascade_neurons = 100; UseStandardLearning = %T; UseCascadeLearning = %F; ann_train_data = read_train_from_file(filename); num_input = setup_train_data(ann_train_data,'num_input_train_data'); num_output = setup_train_data(ann_train_data,'num_output_train_data'); td_length = setup_train_data(ann_train_data,'length_train_data'); printf('Filename = %s\n',filename); printf('Number of inputs = %d\n',num_input); printf('Number of outputs = %d\n',num_output); printf('Length of the data set = %d\n',td_length); ann = createfann('sparse',[num_input 2 num_output], 0.8); ann = setup_train_data(ann_train_data,'set_input_scaling_params',ann,-1,1); ann = setup_train_data(ann_train_data,'set_output_scaling_params',ann,-1,1); ann = setparametersfann(ann,'activation_function_hidden','FANN_SIGMOID_SYMMETRIC'); ann = setparametersfann(ann,'activation_function_output','FANN_LINEAR'); ann = setparametersfann(ann,'training_algorithm','FANN_TRAIN_RPROP'); ann = setparametersfann(ann,'train_error_function','FANN_ERRORFUNC_LINEAR'); ann = setparametersfann(ann,'train_stop_function','FANN_STOPFUNC_MSE'); ann = reset_MSE(ann); t_start = getdate(); ann = train_on_data(ann, ann_train_data, max_epochs, desired_error); printf('End of the training phase after %d sec.\n',etime(getdate(),t_start));
Up to now, the fann-toolbox is available on request (send a mail to ycollet et freesurf dot fr) because some parts are lacking:
- the documentation;
- the installation process.
All the sources are hosted at http://code.google.com/p/scifann/.
Links
Links to FANN (Fast Artificial Neural Network)