AI-NeuralNet-FastSOM

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

	- fixed couple of instances of calling back to perl to get
	  stuff from c structs
	- reworked Storable support

0.07  Sat Jul 25 14:18:03 2009
	- clean up things a bit
	- now using Atol() instead of atoi()
	- now using Drand01() instead of rand()
	- now using seedDrand01() instead of srand()
	- fixed problem with not using all training vectors, or some twice
	- removed non-core Data::Dumper from tests
	- added tests for store/retrieve via Storable
	- first public release

0.06  Wed Jul 22 12:07:25 2009
	- removed AI::NN::FSOM::ARRAY, ::MAP, and ::VECTOR modules
	- removed Inline::C code from remaining modules
	- removed dependence on non-core parent.pm
	- removed remaining Inline::C macros and INLINE.h
	- moved train() into C
	- now parsing input_ and output_dim parameters (finally!)

examples/eigenvector_initialization.pl  view on Meta::CPAN

use strict;
use Data::Dumper;

use AI::NeuralNet::FastSOM::Rect;

my @vs  = ([ 3, 2, 4 ], [ -1, -1, -1 ], [ 0, 4, -3]);
my $dim = 3;

#my @vs  = ([1,-0.5],    [0,1]);
#my $dim = 2;

my $epsilon = 0.001;

examples/load_save.pl  view on Meta::CPAN

use strict;
use Data::Dumper;

use AI::NeuralNet::FastSOM::Rect;

{
    my $nn = new AI::NeuralNet::FastSOM::Rect (output_dim => "5x6",
					   input_dim  => 3);
    $nn->initialize;
    $nn->train (400, ([ 3, 2, 4 ], [ -1, -1, -1 ], [ 0, 4, -3]));

    # now we freeze the thing

t/orig/hexa.t  view on Meta::CPAN

#########################

# change 'tests => 1' to 'tests => last_test_to_print';

use Test::More qw(no_plan);
BEGIN { use_ok('AI::NeuralNet::FastSOM::Hexa') };

######
#use Data::Dumper;

{
    my $nn = new AI::NeuralNet::FastSOM::Hexa (output_dim => 6,
					   input_dim  => 3);
    ok ($nn->isa ('AI::NeuralNet::FastSOM::Hexa'), 'class');
    is ($nn->{_R}, 3, 'R');
    is ($nn->radius, 3, 'radius');
}

{

t/orig/rect.t  view on Meta::CPAN

#########################

# change 'tests => 1' to 'tests => last_test_to_print';

use Test::More qw(no_plan);
BEGIN { use_ok('AI::NeuralNet::FastSOM::Rect') };

######
#use Data::Dumper;

{
    my $nn = new AI::NeuralNet::FastSOM::Rect (output_dim => "5x6",
					   input_dim  => 3);
    ok ($nn->isa ('AI::NeuralNet::FastSOM::Rect'), 'class');
    is ($nn->{_X}, 5, 'X');
    is ($nn->{_Y}, 6, 'Y');
    is ($nn->{_Z}, 3, 'Z');
    is ($nn->radius, 2.5, 'radius');
    is ($nn->output_dim, "5x6", 'output dim');

t/orig/som.t  view on Meta::CPAN

#########################

# Change 'tests => 1' to 'tests => last_test_to_print';

use Test::More qw(no_plan);
BEGIN { use_ok('AI::NeuralNet::FastSOM') };

######
#use Data::Dumper;

{
    use AI::NeuralNet::FastSOM::Rect;    # any non-abstract subclass should do
    my $nn = new AI::NeuralNet::FastSOM::Rect (output_dim => "5x6",
					   input_dim  => 3,
					   );
    $nn->value ( 1, 1, [ 1, 1, 1 ] );
    ok (eq_array ($nn->value ( 1, 1),
		  [ 1, 1, 1 ]), 'value set/get');
    $nn->label ( 1, 1, 'rumsti' );

t/orig/torus.t  view on Meta::CPAN

#########################

# change 'tests => 1' to 'tests => last_test_to_print';

use Test::More qw(no_plan);
BEGIN { use_ok('AI::NeuralNet::FastSOM::Torus') };

######
#use Data::Dumper;

{
    my $nn = new AI::NeuralNet::FastSOM::Torus (output_dim => "5x6",
					    input_dim  => 3);
    ok ($nn->isa ('AI::NeuralNet::FastSOM::Torus'), 'class');
    is ($nn->{_X}, 5, 'X');
    is ($nn->{_Y}, 6, 'Y');
    is ($nn->{_Z}, 3, 'Z');
    is ($nn->radius, 2.5, 'radius');
    is ($nn->output_dim, "5x6", 'output dim');

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 1.399 second using v1.00-cache-2.02-grep-82fe00e-cpan-c30982ac1bc3 )