Math-GSL

 view release on metacpan or  search on metacpan

pm/Math/GSL/Multilarge.pm.2.1  view on Meta::CPAN

               gsl_multifit_linear_residuals
               gsl_multifit_gradient
               gsl_multifit_covar
               gsl_multifit_fsolver_alloc
               gsl_multifit_fsolver_free
               gsl_multifit_fsolver_set
               gsl_multifit_fsolver_iterate
               gsl_multifit_fsolver_name
               gsl_multifit_fsolver_position
               gsl_multifit_fdfsolver_alloc
               gsl_multifit_fdfsolver_set
               gsl_multifit_fdfsolver_iterate
               gsl_multifit_fdfsolver_free
               gsl_multifit_fdfsolver_name
               gsl_multifit_fdfsolver_position
               gsl_multifit_test_delta
               gsl_multifit_test_gradient
               $gsl_multifit_fdfsolver_lmder
               $gsl_multifit_fdfsolver_lmsder;
             /;
%EXPORT_TAGS = ( all => [ @EXPORT_OK ] );

__END__

=encoding utf8

=head1 NAME

Math::GSL::Multifit - Least-squares functions for a general linear model with multiple parameters

=head1 SYNOPSIS

    use Math::GSL::Multifit qw /:all/;

=head1 DESCRIPTION

NOTE: This module requires GSL 2.1 or higher.

The functions in this module perform least-squares fits to a general linear model, y = X c where y is a vector of n observations, X is an n by p matrix of predictor variables, and the elements of the vector c are the p unknown best-fit parameters whi...

Here is a list of all the functions in this module :

=over

=item C<gsl_multifit_linear_alloc($n, $p)> - This function allocates a workspace for fitting a model to $n observations using $p parameters.

=item C<gsl_multifit_linear_free($work)> - This function frees the memory associated with the workspace w.

=item C<gsl_multifit_linear($X, $y, $c, $cov, $work)> - This function computes the best-fit parameters vector $c of the model y = X c for the observations vector $y and the matrix of predictor variables $X. The variance-covariance matrix of the model...

=item C<gsl_multifit_linear_svd($X, $y, $tol, $c, $cov, $work)> - This function computes the best-fit parameters c of the model y = X c for the observations vector $y and the matrix of predictor variables $X. The variance-covariance matrix of the mod...

=item C<gsl_multifit_wlinear($X, $w, $y, $c, $cov, $work> - This function computes the best-fit parameters vector $c of the weighted model y = X c for the observations y with weights $w and the matrix of predictor variables $X. The covariance matrix ...

=item C<gsl_multifit_wlinear_svd($X, $w, $y, $tol, $rank, $c, $cov, $work) > This function computes the best-fit parameters vector $c of the weighted model y = X c for the observations y with weights $w and the matrix of predictor variables $X. The c...

=item C<gsl_multifit_linear_est($x, $c, $cov)> - This function uses the best-fit multilinear regression coefficients vector $c and their covariance matrix $cov to compute the fitted function value $y and its standard deviation $y_err for the model y ...

=item C<gsl_multifit_linear_residuals($X, $y, $c, $r)> - This function computes the vector of residuals r = y - X c for the observations vector $y, coefficients vector $c and matrix of predictor variables $X. $r is also a vector.

=item C<gsl_multifit_gradient($J, $f, $g)> - This function computes the gradient $g of \Phi(x) = (1/2) ||F(x)||^2 from the Jacobian matrix $J and the function values $f, using the formula $g = $J^T $f. $g and $f are vectors.

=item C<gsl_multifit_test_gradient($g, $epsabas)> - This function tests the residual gradient vector $g against the absolute error bound $epsabs. Mathematically, the gradient should be exactly zero at the minimum. The test returns $GSL_SUCCESS if the...

=item C<gsl_multifit_test_delta($dx, $x, $epsabs, $epsrel)> - This function tests for the convergence of the sequence by comparing the last step vector $dx with the absolute error $epsabs and relative error $epsrel to the current position x. The test...

=back

The following functions are not yet implemented. Patches Welcome!

=over

=item C<gsl_multifit_covar >

=item C<gsl_multifit_fsolver_alloc($T, $n, $p)>

=item C<gsl_multifit_fsolver_free >

=item C<gsl_multifit_fsolver_set >

=item C<gsl_multifit_fsolver_iterate >

=item C<gsl_multifit_fsolver_name >

=item C<gsl_multifit_fsolver_position >

=item C<gsl_multifit_fdfsolver_alloc >

=item C<gsl_multifit_fdfsolver_set >

=item C<gsl_multifit_fdfsolver_iterate >

=item C<gsl_multifit_fdfsolver_free >

=item C<gsl_multifit_fdfsolver_name >

=item C<gsl_multifit_fdfsolver_position >


=back

For more informations on the functions, we refer you to the GSL official
documentation: L<http://www.gnu.org/software/gsl/manual/html_node/>



=head1 EXAMPLES



=head1 AUTHORS

Jonathan "Duke" Leto <jonathan@leto.net> and Thierry Moisan <thierry.moisan@gmail.com>

=head1 COPYRIGHT AND LICENSE

Copyright (C) 2008-2024 Jonathan "Duke" Leto and Thierry Moisan

This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.



( run in 0.541 second using v1.01-cache-2.11-cpan-39bf76dae61 )