AI-FANN
view release on metacpan or search on metacpan
lib/AI/FANN.pm view on Meta::CPAN
=head2 AI::FANN
Wraps C C<struct fann> types and provides the following methods
(consult the C documentation for a full description of their usage):
=over 4
=item AI::FANN->new_standard(@layer_sizes)
-
=item AI::FANN->new_sparse($connection_rate, @layer_sizes)
-
=item AI::FANN->new_shortcut(@layer_sizes)
-
=item AI::FANN->new_from_file($filename)
-
=item $ann->save($filename)
-
=item $ann->run($input)
C<input> is an array with the input values.
returns an array with the values on the output layer.
$out = $ann->run([1, 0.6]);
print "@$out\n";
=item $ann->randomize_weights($min_weight, $max_weight)
=item $ann->train($input, $desired_output)
C<$input> and C<$desired_output> are arrays.
=item $ann->test($input, $desired_output)
C<$input> and C<$desired_output> are arrays.
It returns an array with the values of the output layer.
=item $ann->reset_MSE
-
=item $ann->train_on_file($filename, $max_epochs, $epochs_between_reports, $desired_error)
-
=item $ann->train_on_data($train_data, $max_epochs, $epochs_between_reports, $desired_error)
C<$train_data> is a AI::FANN::TrainData object.
=item $ann->cascadetrain_on_file($filename, $max_neurons, $neurons_between_reports, $desired_error)
-
=item $ann->cascadetrain_on_data($train_data, $max_neurons, $neurons_between_reports, $desired_error)
C<$train_data> is a AI::FANN::TrainData object.
=item $ann->train_epoch($train_data)
C<$train_data> is a AI::FANN::TrainData object.
=item $ann->print_connections
-
=item $ann->print_parameters
-
=item $ann->cascade_activation_functions()
returns a list of the activation functions used for cascade training.
=item $ann->cascade_activation_functions(@activation_functions)
sets the list of activation function to use for cascade training.
=item $ann->cascade_activation_steepnesses()
returns a list of the activation steepnesses used for cascade training.
=item $ann->cascade_activation_steepnesses(@activation_steepnesses)
sets the list of activation steepnesses to use for cascade training.
=item $ann->training_algorithm
=item $ann->training_algorithm($training_algorithm)
-
=item $ann->train_error_function
=item $ann->train_error_function($error_function)
-
=item $ann->train_stop_function
=item $ann->train_stop_function($stop_function)
-
=item $ann->learning_rate
=item $ann->learning_rate($rate)
-
=item $ann->learning_momentum
=item $ann->learning_momentum($momentun)
-
=item $ann->bit_fail_limit
=item $ann->bit_fail_limit($bfl)
-
=item $ann->quickprop_decay
=item $ann->quickprop_decay($qpd)
-
=item $ann->quickprop_mu
=item $ann->quickprop_mu($qpmu)
-
=item $ann->rprop_increase_factor
=item $ann->rprop_increase_factor($factor)
-
=item $ann->rprop_decrease_factor
=item $ann->rprop_decrease_factor($factor)
-
=item $ann->rprop_delta_min
=item $ann->rprop_delta_min($min)
-
=item $ann->rprop_delta_max
=item $ann->rprop_delta_max($max)
-
=item $ann->num_inputs
-
=item $ann->num_outputs
-
=item $ann->total_neurons
-
=item $ann->total_connections
-
=item $ann->MSE
-
=item $ann->bit_fail
-
=item cascade_output_change_fraction
=item cascade_output_change_fraction($fraction)
-
=item $ann->cascade_output_stagnation_epochs
=item $ann->cascade_output_stagnation_epochs($epochs)
-
=item $ann->cascade_candidate_change_fraction
=item $ann->cascade_candidate_change_fraction($fraction)
-
=item $ann->cascade_candidate_stagnation_epochs
=item $ann->cascade_candidate_stagnation_epochs($epochs)
-
=item $ann->cascade_weight_multiplier
=item $ann->cascade_weight_multiplier($multiplier)
-
=item $ann->cascade_candidate_limit
=item $ann->cascade_candidate_limit($limit)
-
=item $ann->cascade_max_out_epochs
=item $ann->cascade_max_out_epochs($epochs)
-
=item $ann->cascade_max_cand_epochs
=item $ann->cascade_max_cand_epochs($epochs)
-
=item $ann->cascade_num_candidates
-
=item $ann->cascade_num_candidate_groups
=item $ann->cascade_num_candidate_groups($groups)
-
=item $ann->neuron_activation_function($layer_index, $neuron_index)
=item $ann->neuron_activation_function($layer_index, $neuron_index, $activation_function)
-
=item $ann->layer_activation_function($layer_index, $activation_function)
-
=item $ann->hidden_activation_function($layer_index, $activation_function)
-
=item $ann->output_activation_function($layer_index, $activation_function)
-
=item $ann->neuron_activation_steepness($layer_index, $neuron_index)
=item $ann->neuron_activation_steepness($layer_index, $neuron_index, $activation_steepness)
-
=item $ann->layer_activation_steepness($layer_index, $activation_steepness)
-
=item $ann->hidden_activation_steepness($layer_index, $activation_steepness)
-
=item $ann->output_activation_steepness($layer_index, $activation_steepness)
-
=item $ann->num_layers
returns the number of layers on the ANN
=item $ann->layer_num_neurons($layer_index)
return the number of neurons on layer C<$layer_index>.
=item $ann->num_neurons
return a list with the number of neurons on every layer
=back
=head2 AI::FANN::TrainData
Wraps C C<struct fann_train_data> and provides the following method:
=over 4
=item AI::FANN::TrainData->new_from_file($filename)
( run in 1.383 second using v1.01-cache-2.11-cpan-39bf76dae61 )