AI-Perceptron-Simple
view release on metacpan or search on metacpan
lib/AI/Perceptron/Simple.pm view on Meta::CPAN
These subroutines can be imported using the C<:portable_data> tag.
The file type currently supported is YAML. Please be careful with the data as you won't want the nerve data accidentally modified.
=head2 preserve_as_yaml ( ... )
The parameters and usage are the same as C<save_perceptron_yaml>. See the next subroutine.
=head2 save_perceptron_yaml ( $nerve, $yaml_nerve_file )
Saves the C<AI::Perceptron::Simple> object into a C<YAML> file.
=cut
sub preserve_as_yaml {
save_perceptron_yaml( @_ );
}
sub save_perceptron_yaml {
my $self = shift;
my $nerve_file = shift;
use YAML;
YAML::DumpFile( $nerve_file, $self );
no YAML;
}
=head2 revive_from_yaml (...)
The parameters and usage are the same as C<load_perceptron>. See the next subroutine.
=head2 load_perceptron_yaml ( $yaml_nerve_file )
Loads the YAML data and turns it into a C<AI::Perceptron::Simple> object as the return value.
=cut
sub revive_from_yaml {
load_perceptron_yaml( @_ );
}
sub load_perceptron_yaml {
my $nerve_file_to_load = shift;
use YAML;
local $YAML::LoadBlessed = 1;
my $loaded_nerve = YAML::LoadFile( $nerve_file_to_load );
no YAML;
$loaded_nerve;
}
=head1 TO DO
These are the to-do's that B<MIGHT> be done in the future. Don't put too much hope in them please :)
=over 4
=item * Clean up and refactor source codes
=item * Add more useful data for confusion matrix
=item * Implement shuffling data feature
=item * Implement fast/smart training feature
=item * Write a tutorial or something for this module
=item * and something yet to be known...
=back
=head1 KNOWN ISSUES
=head2 Portability of Nerve Data
Take note that the C<Storable> nerve data is not compatible across different versions.
If you really need to send the nerve data to different computers with different versions of C<Storable> module, see the docs of the following subroutines:
=over 4
=item * C<&preserve_as_yaml> or C<&save_perceptron_yaml> for storing data.
=item * C<&revive_from_yaml> or C<&load_perceptron_yaml> for retrieving the data.
=back
=head1 AUTHOR
Raphael Jong Jun Jie, C<< <ellednera at cpan.org> >>
=head1 BUGS
Please report any bugs or feature requests to C<bug-ai-perceptron-simple at rt.cpan.org>, or through
the web interface at L<https://rt.cpan.org/NoAuth/ReportBug.html?Queue=AI-Perceptron-Simple>. I will be notified, and then you'll
automatically be notified of progress on your bug as I make changes.
=head1 SUPPORT
You can find documentation for this module with the perldoc command.
perldoc AI::Perceptron::Simple
You can also look for information at:
=over 4
=item * RT: CPAN's request tracker (report bugs here)
L<https://rt.cpan.org/NoAuth/Bugs.html?Dist=AI-Perceptron-Simple>
=item * CPAN Ratings
L<https://cpanratings.perl.org/d/AI-Perceptron-Simple>
=item * Search CPAN
L<https://metacpan.org/release/AI-Perceptron-Simple>
=back
=head1 ACKNOWLEDGEMENTS
Besiyata d'shmaya, Wikipedia
=head1 SEE ALSO
AI::Perceptron, Text::Matrix, YAML
=head1 LICENSE AND COPYRIGHT
This software is Copyright (c) 2021 by Raphael Jong Jun Jie.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)
=cut
1; # End of AI::Perceptron::Simple
( run in 2.025 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )