AI-NNFlex
view release on metacpan or search on metacpan
lib/AI/NNFlex/Backprop.pm view on Meta::CPAN
$network->add_layer(nodes=>x,activationfunction=>'function');
$network->init();
use AI::NNFlex::Dataset;
my $dataset = AI::NNFlex::Dataset->new([
[INPUTARRAY],[TARGETOUTPUT],
[INPUTARRAY],[TARGETOUTPUT]]);
my $sqrError = 10;
while ($sqrError >0.01)
{
$sqrError = $dataset->learn($network);
}
lib/AI/NNFlex/Backprop.pm view on Meta::CPAN
If randomweights is not specified the network will default to a random value from 0 to 1.
If momentum is not specified the network will default to vanilla (non momentum) backprop.
The Fahlman constant modifies the slope of the error curve. 0.1 is the standard value for everything, and speeds the network up immensely. If no Fahlman constant is set, the network will default to 0.1
=head2 AI::NNFlex::Dataset
new ( [[INPUT VALUES],[OUTPUT VALUES],
[INPUT VALUES],[OUTPUT VALUES],..])
=head2 INPUT VALUES
These should be comma separated values. They can be applied to the network with ::run or ::learn
=head2 OUTPUT VALUES
These are the intended or target output values. Comma separated. These will be used by ::learn
=head1 METHODS
This is a short list of the main methods implemented in AI::NNFlex::Backprop.
=head2 AI::NNFlex::Backprop
lib/AI/NNFlex/Dataset.pm view on Meta::CPAN
$dataset->save(filename=>'test.pat');
$dataset->load(filename=>'test.pat');
=head1 DESCRIPTION
This module allows you to construct, load, save and maintain datasets for use with neural nets implemented using the AI::NNFlex classes. The dataset consists of an array of references to arrays of data. Items may be added in pairs (useful for feedfor...
=head1 CONSTRUCTOR
=head2 AI::NNFlex::Dataset->new([[INPUT],[TARGET]]);
Parameters:
The constructor takes an (optional) reference to an array of one or more arrays. For convenience you can specify two values at a time (for INPUT and OUTPUT values) or a single value at a time. You can also leave the parameters blank, in which case th...
The return value is an AI::NNFlex::Dataset object.
=head1 METHODS
This is a short list of the main methods implemented in AI::NNFlex::Dataset
=head2 add
Syntax:
$dataset->add([[INPUT],[OUTPUT]]);
or
$dataset->add([VALUE]);
This method adds new values to the end of the dataset. You can specify the values as pairs or individually.
=head2 load
Syntax:
lib/AI/NNFlex/Hopfield.pm view on Meta::CPAN
$network->add_layer(nodes=>x);
$network->init();
use AI::NNFlex::Dataset;
my $dataset = AI::NNFlex::Dataset->new([
[INPUTARRAY],
[INPUTARRAY]]);
$network->learn($dataset);
my $outputsRef = $dataset->run($network);
my $outputsRef = $network->output();
=head1 DESCRIPTION
AI::NNFlex::Hopfield is a Hopfield network simulator derived from the AI::NNFlex class. THIS IS THE FIRST ALPHA CUT OF THIS MODULE! Any problems, let me know and I'll fix them.
lib/AI/NNFlex/Hopfield.pm view on Meta::CPAN
Hopfield networks differ from feedforward networks in that they are effectively a single layer, with all nodes connected to all other nodes (except themselves), and are trained in a single operation. They are particularly useful for recognising corru...
Full documentation for AI::NNFlex::Dataset can be found in the modules own perldoc. It's documented here for convenience only.
=head1 CONSTRUCTOR
=head2 AI::NNFlex::Hopfield->new();
=head2 AI::NNFlex::Dataset
new ( [[INPUT VALUES],[INPUT VALUES],
[INPUT VALUES],[INPUT VALUES],..])
=head2 INPUT VALUES
These should be comma separated values. They can be applied to the network with ::run or ::learn
=head2 OUTPUT VALUES
These are the intended or target output values. Comma separated. These will be used by ::learn
=head1 METHODS
This is a short list of the main methods implemented in AI::NNFlex::Hopfield.
=head2 AI::NNFlex::Hopfield
lib/AI/NNFlex/Reinforce.pm view on Meta::CPAN
$network->add_layer(nodes=>x,activationfunction=>'function');
$network->init();
use AI::NNFlex::Dataset;
my $dataset = AI::NNFlex::Dataset->new([
[INPUTARRAY],[TARGETOUTPUT],
[INPUTARRAY],[TARGETOUTPUT]]);
my $sqrError = 10;
for (1..100)
{
$dataset->learn($network);
}
( run in 0.649 second using v1.01-cache-2.11-cpan-4e96b696675 )