NcmFitLevmar

NcmFitLevmar — Best-fit finder -- Levenberg-Marquardt nonlinear least squares algorithm library.

Functions

Properties

NcmFitLevmarAlgos algorithm Read / Write / Construct

Types and Values

Object Hierarchy

    GEnum
    ╰── NcmFitLevmarAlgos
    GObject
    ╰── NcmFit
        ╰── NcmFitLevmar

Description

This object serves as an implementation of a best-fit finder utilizing the Levenberg-Marquardt nonlinear least squares algorithm library. It is designed as a subclass of NcmFit and operates as a wrapper for the levmar library. It's important to note that the NcmLevMar object can only be effectively employed when all NcmData within the NcmDataset are of Gaussian type, and all priors defined in NcmLikelihood are of Gaussian type as well.

Levenberg-Marquardt Algorithm:

The Levenberg-Marquardt algorithm is a widely recognized approach for solving nonlinear least squares problems. Its particular strength lies in its suitability for solving problems with a substantial number of variables, especially when gradient methods prove impractical.

Functions

ncm_fit_levmar_new ()

NcmFit *
ncm_fit_levmar_new (NcmLikelihood *lh,
                    NcmMSet *mset,
                    NcmFitGradType gtype,
                    NcmFitLevmarAlgos algo);

Creates a new NcmFitLevmar object from the given likelihood, model set, gradient type and algorithm.

Parameters

lh

a NcmLikelihood

 

mset

a NcmMSet

 

gtype

a NcmFitGradType

 

algo

a NcmFitLevmarAlgos

 

Returns

a NcmFitLevmar.


ncm_fit_levmar_new_default ()

NcmFit *
ncm_fit_levmar_new_default (NcmLikelihood *lh,
                            NcmMSet *mset,
                            NcmFitGradType gtype);

Creates a new NcmFitLevmar object from the given likelihood, model set and gradient type. The algorithm used is the default one (NCM_FIT_LEVMAR_DIF).

Parameters

lh

a NcmLikelihood

 

mset

a NcmMSet

 

gtype

a NcmFitGradType

 

Returns

a NcmFitLevmar.


ncm_fit_levmar_new_by_name ()

NcmFit *
ncm_fit_levmar_new_by_name (NcmLikelihood *lh,
                            NcmMSet *mset,
                            NcmFitGradType gtype,
                            gchar *algo_name);

Creates a new NcmFitLevmar object from the given likelihood, model set, gradient type and algorithm name. If the algorithm name is NULL, the default one (NCM_FIT_LEVMAR_DIF) is used.

Parameters

lh

a NcmLikelihood

 

mset

a NcmMSet

 

gtype

a NcmFitGradType

 

algo_name

a string containing the name of the algorithm to be used

 

Returns

a NcmFitLevmar.


ncm_fit_levmar_set_algo ()

void
ncm_fit_levmar_set_algo (NcmFitLevmar *fit_levmar,
                         NcmFitLevmarAlgos algo);

Sets the algorithm to be used by the given NcmFitLevmar.

Parameters

fit_levmar

a NcmFitLevmar.

 

algo

a levmar_algorithm.

 

Types and Values

NCM_TYPE_FIT_LEVMAR

#define NCM_TYPE_FIT_LEVMAR (ncm_fit_levmar_get_type ())

enum NcmFitLevmarAlgos

Levmar algorithms.

Members

NCM_FIT_LEVMAR_DER

with external derivatives.

 

NCM_FIT_LEVMAR_DIF

with internal derivatives (inside levmar).

 

NCM_FIT_LEVMAR_BC_DER

with box constraints and external derivatives.

 

NCM_FIT_LEVMAR_BC_DIF

with box constraints and internal derivatives (inside levmar).

 

NcmFitLevmar

typedef struct _NcmFitLevmar NcmFitLevmar;

Property Details

The “algorithm” property

  “algorithm”                NcmFitLevmarAlgos

Levmar least squares library algorithm.

Owner: NcmFitLevmar

Flags: Read / Write / Construct

Default value: NCM_FIT_LEVMAR_DIF