AI-ML
view release on metacpan or search on metacpan
lib/AI/ML.pm view on Meta::CPAN
# ABSTRACT: Perl interface to ML
use strict;
use warnings;
package AI::ML;
use parent 'DynaLoader';
use Math::Lapack;
bootstrap AI::ML;
#sub dl_load_flags { 1 }
1;
lib/AI/ML/Expr.pm view on Meta::CPAN
use strict;
use warnings;
use Chart::Gnuplot;
use Scalar::Util 'blessed';
use AI::ML;
use Math::Lapack;
use aliased 'Math::Lapack::Matrix' => 'M';
use parent 'Exporter';
use parent 'Math::Lapack::Expr';
our @EXPORT = qw(mini_batch tanh sigmoid relu lrelu d_sigmoid d_relu d_lrelu d_tanh softmax sigmoid_cost plot plot_cost);
use Math::Lapack::Expr;
sub _bless {
my $matrix = shift;
return bless { _matrix => $matrix, type => 'matrix' } => "Math::Lapack::Matrix";
}
=head2 sigmoid
lib/AI/ML/LinearRegression.pm view on Meta::CPAN
# ABSTRACT: turns baubles into trinkets
package AI::ML::LinearRegression;
use strict;
use warnings;
use Scalar::Util 'blessed';
use aliased 'Math::Lapack::Matrix' => 'M';
use Math::Lapack::Expr;
use parent 'AI::ML::Expr';
use Data::Dumper;
=head2 new
=cut
sub new {
my ($self, %opts) = @_;
$self = bless {} => 'AI::ML::LinearRegression';
lib/AI/ML/LogisticRegression.pm view on Meta::CPAN
# ABSTRACT: turns baubles into trinketsA
package AI::ML::LogisticRegression;
use strict;
use warnings;
use Scalar::Util 'blessed';
use aliased 'Math::Lapack::Matrix' => 'M';
use Math::Lapack::Expr;
use AI::ML::Expr;
use parent 'AI::ML::Expr';
use Data::Dumper;
=head2 new
=cut
sub new {
my ($self, %opts) = @_;
$self = bless {} => 'AI::ML::LogisticRegression';
lib/AI/ML/NeuralNetwork.pm view on Meta::CPAN
# ABSTRACT: turns baubles into trinkets
package AI::ML::NeuralNetwork;
use strict;
use warnings;
use Scalar::Util 'blessed';
use Math::Lapack::Matrix;
use Math::Lapack::Expr;
use parent 'AI::ML::Expr';
my $functions = {
sigmoid => \&AI::ML::Expr::sigmoid,
relu => \&AI::ML::Expr::relu,
lrelu => \&AI::ML::Expr::lrelu,
softmax => \&AI::ML::Expr::softmax,
tanh => \&AI::ML::Expr::tanh,
dsigmoid => \&AI::ML::Expr::d_sigmoid,
drelu => \&AI::ML::Expr::d_relu,
dlrelu => \&AI::ML::Expr::d_lrelu,
( run in 0.601 second using v1.01-cache-2.11-cpan-a5abf4f5562 )