Fast Artificial Neural Network Library

Steffen Nissen

Evan Nemerson


Table of Contents
1. Introduction
1.1. Getting FANN
1.2. Installation
1.2.1. RPMs
1.2.2. DEBs
1.2.3. Windows
1.2.4. Compiling from source
1.3. Getting Started
1.3.1. Training
1.3.2. Execution
1.4. Getting Help
2. Advanced Usage
2.1. Adjusting Parameters
2.2. Network Design
2.3. Understanding the Error Value
2.4. Training and Testing
2.5. Avoid Over-Fitting
2.6. Adjusting Parameters During Training
3. Fixed Point Usage
3.1. Training a Fixed Point ANN
3.2. Running a Fixed Point ANN
3.3. Precision of a Fixed Point ANN
4. Neural Network Theory
4.1. Neural Networks
4.2. Artificial Neural Networks
4.3. Training an ANN
5. API Reference
5.1. Creation, Destruction, and Execution
fann_create -- Create a new artificial neural network, and return a pointer to it.
fann_create_array -- Create a new artificial neural network, and return a pointer to it.
fann_create_shortcut -- Create a new artificial neural network with shortcut connections, and return a pointer to it.
fann_create_shortcut_array -- Create a new artificial neural network with shortcut connections, and return a pointer to it.
fann_destroy -- Destroy an ANN.
fann_run -- Run (execute) an ANN.
fann_randomize_weights -- Give each connection a random weight.
fann_init_weights -- Initialize the weight of each connection.
fann_print_connections -- Prints the connections of an ann.
5.2. Input/Output
fann_save -- Save an ANN to a file.
fann_save_to_fixed -- Save an ANN to a fixed-point file.
fann_create_from_file -- Load an ANN from a file.
5.3. Training
fann_train -- Train an ANN.
fann_test -- Tests an ANN.
fann_get_MSE -- Return the mean square error of an ANN.
fann_reset_MSE -- Reset the mean square error of an ANN.
5.4. Training Data
fann_read_train_from_file -- Read training data from a file.
fann_save_train -- Save training data.
fann_save_train_to_fixed -- Save training data as fixed point.
fann_destroy_train -- Destroy training data.
fann_train_epoch -- Trains one epoch.
fann_test_data -- Calculates the mean square error for a set of data.
fann_train_on_data -- Train an ANN.
fann_train_on_data_callback -- Train an ANN.
fann_train_on_file -- Train an ANN.
fann_train_on_file_callback -- Train an ANN.
fann_shuffle_train_data -- Shuffle the training data.
fann_merge_train_data -- Merge two sets of training data.
fann_duplicate_train_data -- Copies a set of training data.
5.5. Options
fann_print_parameters -- Prints all of the parameters and options of the ANN.
fann_get_training_algorithm -- Retrieve training algorithm from a network.
fann_set_training_algorithm -- Set a network's training algorithm.
fann_get_learning_rate -- Retrieve learning rate from a network.
fann_set_learning_rate -- Set a network's learning rate.
fann_get_activation_function_hidden -- Get the activation function used in the hidden layers.
fann_set_activation_function_hidden -- Set the activation function for the hidden layers.
fann_get_activation_function_output -- Get the activation function of the output layer.
fann_set_activation_function_output -- Set the activation function for the output layer.
fann_get_activation_steepness_hidden -- Retrieve the steepness of the activation function of the hidden layers.
fann_set_activation_steepness_hidden -- Set the steepness of the activation function of the hidden layers.
fann_get_activation_steepness_output -- Retrieve the steepness of the activation function of the output layer.
fann_set_activation_steepness_output -- Set the steepness of the activation function of the output layer.
fann_set_train_error_function -- Sets the training error function to be used.
fann_get_train_error_function -- Gets the training error function to be used.
fann_get_quickprop_decay -- Get the decay parameter used by the quickprop training.
fann_set_quickprop_decay -- Set the decay parameter used by the quickprop training.
fann_get_quickprop_mu -- Get the mu factor used by quickprop training.
fann_set_quickprop_mu -- Set the mu factor used by quickprop training.
fann_get_rprop_increase_factor -- Get the increase factor used by RPROP training.
fann_set_rprop_increase_factor -- Get the increase factor used by RPROP training.
fann_get_rprop_decrease_factor -- Get the decrease factor used by RPROP training.
fann_set_rprop_decrease_factor -- Set the decrease factor used by RPROP training.
fann_get_rprop_delta_min -- Get the minimum step-size used by RPROP training.
fann_set_rprop_delta_min -- Set the minimum step-size used by RPROP training.
fann_get_rprop_delta_max -- Get the maximum step-size used by RPROP training.
fann_set_rprop_delta_max -- Set the maximum step-size used by RPROP training.
fann_get_num_input -- Get the number of neurons in the input layer.
fann_get_num_output -- Get number of neurons in the output layer.
fann_get_total_neurons -- Get the total number of neurons in a network.
fann_get_total_connections -- Get the total number of connections in a network.
fann_get_decimal_point -- Get the position of the decimal point.
fann_get_multiplier -- Get the multiplier.
5.6. Error Handling
fann_get_errno -- Return the numerical representation of the last error.
fann_get_errstr -- Return the last error.
fann_reset_errno -- Reset the last error number.
fann_reset_errstr -- Reset the last error string.
fann_set_error_log -- Set the error log to a file descriptor.
fann_print_error -- Print the last error to the error log.
5.7. Data Structures
struct fann -- Describes a neural network.
struct fann_train_data -- Describes a set of training data.
struct fann_error -- Describes an error.
struct fann_neuron -- Describes an individual neuron.
struct fann_layer -- Describes a layer in a network.
5.8. Constants
Training algorithms -- Constants representing training algorithms.
Activation Functions -- Constants representing activation functions.
Training Error Functions -- Constants representing errors functions.
Error Codes -- Constants representing errors.
5.9. Internal Functions
5.9.1. Creation And Destruction
5.9.2. Input/Output
5.9.3. Training Data
5.9.4. Error Handling
5.9.5. Options
5.10. Deprecated Functions
5.10.1. Mean Square Error
5.10.2. Get and set activation function steepness.
6. PHP Extension
6.1. Installation
6.1.1. Using PEAR
6.1.2. Compiling into PHP
6.2. API Reference
fann_create -- Creates an artificial neural network.
fann_train -- Train an artificial neural network.
fann_save -- Save an artificial neural network to a file.
fann_run -- Run an artificial neural network.
fann_randomize_weights -- Randomize the weights of the neurons in the network.
fann_init_weights -- Initialize the weight of each connection.
fann_get_MSE -- Get the mean squared error.
fann_get_num_input -- Get the number of input neurons.
fann_get_num_output -- Get the number of output neurons.
fann_get_total_neurons -- Get the total number of neurons.
fann_get_total_connections -- Get the total number of connections.
fann_get_learning_rate -- Get the learning rate.
fann_get_activation_function_hidden -- Get the activation function of the hidden neurons.
fann_get_activation_function_output -- Get the activation function of the output neurons.
fann_get_activation_steepness_hidden -- Get the steepness of the activation function for the hidden neurons.
fann_get_activation_steepness_output -- Get the steepness of the activation function for the output neurons.
fann_set_learning_rate -- Set the learning rate.
fann_set_activation_function_hidden -- Set the activation function for the hidden neurons.
fann_set_activation_function_output -- Set the activation function for the output neurons.
fann_set_activation_steepness_hidden -- Set the steepness of the activation function for the hidden neurons.
fann_set_activation_steepness_output -- Set the steepness of the activation function for the output neurons.
7. Python Bindings
7.1. Python Install
8. Delphi Bindings
8.1. Delphi Install
8.2. TFannNetwork
8.3. Known Problems
Bibliography
List of Examples
1-1. Simple training example
1-2. Simple execution example
2-1. The internals of the fann_train_on_file function, without writing the status line.
2-2. Test all of the data in a file and calculates the mean square error.
3-1. An example of a program written to support training in both fixed point and floating point numbers
3-2. An example of a program written to support both fixed point and floating point numbers
5-1. fann_create_array example
6-1. fann_create from scratch
6-2. fann_create loading from a file
6-1. fann_create from training data
6-1. fann_runExample

SourceForge.net Logo