AI-NeuralNet-Kohonen-Visual
view release on metacpan or search on metacpan
t/AI-NeuralNet-Kohonen-Visual.t view on Meta::CPAN
",
);
isa_ok( $net->{input}, 'ARRAY');
is( $net->{input}->[0]->{values}->[0],1);
is( $net->{input}->[0]->{values}->[1],0);
is( $net->{input}->[0]->{values}->[2],0);
is( $net->{weight_dim}, 2);
$net->train;
diag "Will automatically destroy this window in $delay seconds";
$net->{_mw}->after($delay*1000, sub{ $net->{_mw}->destroy } );
$net->main_loop;
pass;
diag "# Test 2 ... this is *slow*, sorry\n";
$net = AI::NeuralNet::Kohonen::Visual->new(
display => 'hex',
map_dim => 39,
t/AI-NeuralNet-Kohonen-Visual.t view on Meta::CPAN
# Create an empty map
# and populate with training data
diag "# Plotting results\n";
foreach my $bmu ($net->get_results){
$net->label_map(@$bmu->[1],@$bmu->[2],"+".@$bmu->[3]);
}
diag "Will automatically destroy this window in $delay seconds";
$net->{_mw}->after($delay*1000, sub{ $net->{_mw}->destroy } );
$net->plot_map;
$net->main_loop;
diag "# Done\n";
# $net->main_loop;
__END__
( run in 0.533 second using v1.01-cache-2.11-cpan-39bf76dae61 )