AI-Perceptron

 view release on metacpan or  search on metacpan

lib/AI/Perceptron.pm  view on Meta::CPAN


use strict;
use accessors qw( num_inputs learning_rate _weights threshold
		  training_examples max_iterations );

our $VERSION = '1.0';
our $Debug   = 0;

sub new {
    my $class = shift;
    my $self  = bless {}, $class;
    return $self->init( @_ );
}

sub init {
    my $self = shift;
    my %args = @_;

    $self->num_inputs( $args{Inputs} || 1 )
         ->learning_rate( $args{N} || 0.05 )
	 ->max_iterations( -1 )



( run in 0.534 second using v1.01-cache-2.11-cpan-de7293f3b23 )