least_squares Module

Least squares, linear and non linear


Uses

  • module~~least_squares~~UsesGraph module~least_squares least_squares module~cholesky cholesky module~least_squares->module~cholesky module~data_arch data_arch module~least_squares->module~data_arch module~cholesky->module~data_arch iso_fortran_env iso_fortran_env module~data_arch->iso_fortran_env

Used by

  • module~~least_squares~~UsedByGraph module~least_squares least_squares module~tchebychev tchebychev module~tchebychev->module~least_squares program~test_least test_least program~test_least->module~least_squares program~test_tchebychev test_tchebychev program~test_tchebychev->module~tchebychev

Variables

Type Visibility Attributes Name Initial
logical(kind=I4), private, parameter :: verbose = .false.

Subroutines

public subroutine moindres_carres(nb_var, nb_pts, hij, vec_xy, beta, f, df, typ, eps, relax, nb_var_der, info)

Function that returns the parameters of a function that approximates a data set. The parameters determination is achieved by non linear least squares approximation.

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=I4), intent(in) :: nb_var

number of parameters to be determined

integer(kind=I4), intent(in) :: nb_pts

number of points for function evaluation

real(kind=R8), intent(in), dimension(1:nb_pts) :: hij

vector of evaluation points

real(kind=R8), intent(in), dimension(1:nb_pts, 1:2) :: vec_xy

x and y coordinates of evaluation points

real(kind=R8), intent(inout), dimension(1:nb_var) :: beta

parameters vector

private function f(xi, yi, var, nb_var, typ)
Arguments
Type IntentOptional Attributes Name
real(kind=R8), intent(in) :: xi
real(kind=R8), intent(in) :: yi
real(kind=R8), intent(inout), dimension(1:nb_var) :: var
integer(kind=I4), intent(in) :: nb_var
character(len=*), intent(in) :: typ
Return Value real(kind=r8)
private function df(xi, yi, var, nb_var, ivar, typ)
Arguments
Type IntentOptional Attributes Name
real(kind=R8), intent(in) :: xi
real(kind=R8), intent(in) :: yi
real(kind=R8), intent(inout), dimension(1:nb_var) :: var
integer(kind=I4), intent(in) :: nb_var
integer(kind=I4), intent(in) :: ivar
character(len=*), intent(in) :: typ
Return Value real(kind=r8)
character(len=*), intent(in) :: typ

kind of function used

real(kind=R8), intent(in) :: eps

stop criterion

real(kind=R8), intent(in) :: relax

relaxation parameter

integer(kind=I4), intent(in) :: nb_var_der

number of derivatives

integer(kind=I4), intent(out) :: info

information from Cholesky resolution

public subroutine moindres_carres_lineaire(nb_var, nb_pts, hij, beta, Jf)

Function that returns the parameters of a function that approximates a data set. The parameters determination is achieved by linear least squares approximation.

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=I4), intent(in) :: nb_var

number of parameters to be determined

integer(kind=I4), intent(in) :: nb_pts

number of points for function evaluation

real(kind=R8), intent(in), dimension(1:nb_pts) :: hij

vector of evaluation points

real(kind=R8), intent(out), dimension(1:nb_var) :: beta

parameters vector

real(kind=R8), intent(in), dimension(1:nb_pts, 1:nb_var) :: Jf

Jacobian