Model Fitting Abstract Class

Model Fitting Abstract Class — Class for implementing fitting methods

Synopsis

enum                NcmFitType;
enum                NcmFitGradType;
void                (*_NcmFitLSJ)                       (NcmFit *fit,
                                                         NcmMatrix *J);
void                (*_NcmFitLSFJ)                      (NcmFit *fit,
                                                         NcmVector *f,
                                                         NcmMatrix *J);
void                (*_NcmFitM2lnLGrad)                 (NcmFit *fit,
                                                         NcmVector *grad);
void                (*_NcmFitM2lnLValGrad)              (NcmFit *fit,
                                                         gdouble *m2lnL,
                                                         NcmVector *grad);
enum                NcmFitRunMsgs;
struct              NcmFit;
struct              NcmFitClass;
struct              NcmFitConstraint;
NcmFitConstraint *  ncm_fit_constraint_new              (NcmFit *fit,
                                                         NcmMSetFunc *func,
                                                         gdouble tot);
NcmFitConstraint *  ncm_fit_constraint_dup              (NcmFitConstraint *fitc);
void                ncm_fit_constraint_free             (NcmFitConstraint *fitc);
NcmFit *            ncm_fit_new                         (NcmFitType ftype,
                                                         gchar *algo_name,
                                                         NcmLikelihood *lh,
                                                         NcmMSet *mset,
                                                         NcmFitGradType gtype);
NcmFit *            ncm_fit_ref                         (NcmFit *fit);
NcmFit *            ncm_fit_copy_new                    (NcmFit *fit,
                                                         NcmLikelihood *lh,
                                                         NcmMSet *mset,
                                                         NcmFitGradType gtype);
NcmFit *            ncm_fit_dup                         (NcmFit *fit,
                                                         NcmSerialize *ser);
void                ncm_fit_free                        (NcmFit *fit);
void                ncm_fit_clear                       (NcmFit **fit);
void                ncm_fit_set_grad_type               (NcmFit *fit,
                                                         NcmFitGradType gtype);
void                ncm_fit_set_maxiter                 (NcmFit *fit,
                                                         guint maxiter);
guint               ncm_fit_get_maxiter                 (NcmFit *fit);
void                ncm_fit_set_m2lnL_reltol            (NcmFit *fit,
                                                         gdouble tol);
gdouble             ncm_fit_get_m2lnL_reltol            (NcmFit *fit);
void                ncm_fit_set_m2lnL_abstol            (NcmFit *fit,
                                                         gdouble tol);
gdouble             ncm_fit_get_m2lnL_abstol            (NcmFit *fit);
void                ncm_fit_set_params_reltol           (NcmFit *fit,
                                                         gdouble tol);
gdouble             ncm_fit_get_params_reltol           (NcmFit *fit);
void                ncm_fit_set_params                  (NcmFit *fit,
                                                         NcmVector *params);
void                ncm_fit_add_equality_constraint     (NcmFit *fit,
                                                         NcmMSetFunc *func,
                                                         gdouble tot);
void                ncm_fit_add_inequality_constraint   (NcmFit *fit,
                                                         NcmMSetFunc *func,
                                                         gdouble tot);
void                ncm_fit_remove_equality_constraints (NcmFit *fit);
void                ncm_fit_remove_inequality_constraints
                                                        (NcmFit *fit);
guint               ncm_fit_has_equality_constraints    (NcmFit *fit);
guint               ncm_fit_has_inequality_constraints  (NcmFit *fit);
gboolean            ncm_fit_is_least_squares            (NcmFit *fit);
const gchar *       ncm_fit_get_desc                    (NcmFit *fit);
void                ncm_fit_log_info                    (NcmFit *fit);
void                ncm_fit_log_covar                   (NcmFit *fit);
void                ncm_fit_log_start                   (NcmFit *fit);
void                ncm_fit_log_state                   (NcmFit *fit);
void                ncm_fit_log_step                    (NcmFit *fit);
void                ncm_fit_log_step_error              (NcmFit *fit,
                                                         const gchar *strerror,
                                                         ...);
void                ncm_fit_log_end                     (NcmFit *fit);
void                ncm_fit_fishermatrix_print          (NcmFit *fit,
                                                         FILE *out,
                                                         gchar *header);
void                ncm_fit_data_m2lnL_val              (NcmFit *fit,
                                                         gdouble *data_m2lnL);
void                ncm_fit_priors_m2lnL_val            (NcmFit *fit,
                                                         gdouble *priors_m2lnL);
void                ncm_fit_m2lnL_val                   (NcmFit *fit,
                                                         gdouble *m2lnL);
void                ncm_fit_ls_f                        (NcmFit *fit,
                                                         NcmVector *f);
void                ncm_fit_m2lnL_grad                  (NcmFit *fit,
                                                         NcmVector *df);
void                ncm_fit_m2lnL_grad_an               (NcmFit *fit,
                                                         NcmVector *df);
void                ncm_fit_m2lnL_grad_nd_fo            (NcmFit *fit,
                                                         NcmVector *grad);
void                ncm_fit_m2lnL_grad_nd_ce            (NcmFit *fit,
                                                         NcmVector *grad);
void                ncm_fit_m2lnL_grad_nd_ac            (NcmFit *fit,
                                                         NcmVector *grad);
void                ncm_fit_m2lnL_val_grad              (NcmFit *fit,
                                                         gdouble *result,
                                                         NcmVector *df);
void                ncm_fit_m2lnL_val_grad_an           (NcmFit *fit,
                                                         gdouble *result,
                                                         NcmVector *df);
void                ncm_fit_m2lnL_val_grad_nd_fo        (NcmFit *fit,
                                                         gdouble *m2lnL,
                                                         NcmVector *grad);
void                ncm_fit_m2lnL_val_grad_nd_ce        (NcmFit *fit,
                                                         gdouble *m2lnL,
                                                         NcmVector *grad);
void                ncm_fit_m2lnL_val_grad_nd_ac        (NcmFit *fit,
                                                         gdouble *m2lnL,
                                                         NcmVector *grad);
void                ncm_fit_ls_J                        (NcmFit *fit,
                                                         NcmMatrix *J);
void                ncm_fit_ls_J_an                     (NcmFit *fit,
                                                         NcmMatrix *J);
void                ncm_fit_ls_J_nd_fo                  (NcmFit *fit,
                                                         NcmMatrix *J);
void                ncm_fit_ls_J_nd_ce                  (NcmFit *fit,
                                                         NcmMatrix *J);
void                ncm_fit_ls_f_J                      (NcmFit *fit,
                                                         NcmVector *f,
                                                         NcmMatrix *J);
void                ncm_fit_ls_f_J_an                   (NcmFit *fit,
                                                         NcmVector *f,
                                                         NcmMatrix *J);
void                ncm_fit_ls_f_J_nd_fo                (NcmFit *fit,
                                                         NcmVector *f,
                                                         NcmMatrix *J);
void                ncm_fit_ls_f_J_nd_ce                (NcmFit *fit,
                                                         NcmVector *f,
                                                         NcmMatrix *J);
void                ncm_fit_numdiff_m2lnL_hessian       (NcmFit *fit,
                                                         NcmMatrix *H);
void                ncm_fit_numdiff_m2lnL_covar         (NcmFit *fit);
void                ncm_fit_ls_covar                    (NcmFit *fit);
gdouble             ncm_fit_covar_var                   (NcmFit *fit,
                                                         NcmModelID mid,
                                                         guint pid);
gdouble             ncm_fit_covar_sd                    (NcmFit *fit,
                                                         NcmModelID mid,
                                                         guint pid);
gdouble             ncm_fit_covar_cov                   (NcmFit *fit,
                                                         NcmModelID mid1,
                                                         guint pid1,
                                                         NcmModelID mid2,
                                                         guint pid2);
gdouble             ncm_fit_covar_cor                   (NcmFit *fit,
                                                         NcmModelID mid1,
                                                         guint pid1,
                                                         NcmModelID mid2,
                                                         guint pid2);
gdouble             ncm_fit_covar_fparam_var            (NcmFit *fit,
                                                         guint fpi);
gdouble             ncm_fit_covar_fparam_sd             (NcmFit *fit,
                                                         guint fpi);
gdouble             ncm_fit_covar_fparam_cov            (NcmFit *fit,
                                                         guint fpi1,
                                                         guint fpi2);
gdouble             ncm_fit_covar_fparam_cor            (NcmFit *fit,
                                                         guint fpi1,
                                                         guint fpi2);
void                ncm_fit_lr_test_range               (NcmFit *fit,
                                                         NcmModelID mid,
                                                         guint pid,
                                                         gdouble start,
                                                         gdouble stop,
                                                         gdouble step);
void                ncm_fit_dprob                       (NcmFit *fit,
                                                         NcmModelID mid,
                                                         guint pid,
                                                         gdouble a,
                                                         gdouble b,
                                                         gdouble step,
                                                         gdouble norm);
gdouble             ncm_fit_lr_test                     (NcmFit *fit,
                                                         NcmModelID mid,
                                                         guint pid,
                                                         gdouble val,
                                                         gint dof);
gdouble             ncm_fit_prob                        (NcmFit *fit,
                                                         NcmModelID mid,
                                                         guint pid,
                                                         gdouble a,
                                                         gdouble b);
gdouble             ncm_fit_chisq_test                  (NcmFit *fit,
                                                         size_t bins);
void                ncm_fit_reset                       (NcmFit *fit);
gboolean            ncm_fit_run                         (NcmFit *fit,
                                                         NcmFitRunMsgs mtype);
gdouble             ncm_fit_type_constrain_error        (NcmFit *fit,
                                                         gdouble p,
                                                         gint nu,
                                                         gdouble dir,
                                                         NcmMSetFunc *func,
                                                         gdouble z,
                                                         gboolean walk);
void                ncm_fit_function_error              (NcmFit *fit,
                                                         NcmMSetFunc *func,
                                                         gdouble *x,
                                                         gboolean pretty_print,
                                                         gdouble *f,
                                                         gdouble *sigma_f);
gdouble             ncm_fit_function_cov                (NcmFit *fit,
                                                         NcmMSetFunc *func1,
                                                         gdouble z1,
                                                         NcmMSetFunc *func2,
                                                         gdouble z2,
                                                         gboolean pretty_print);
#define             NCM_FIT_NPARAM                      (fit)
#define             NCM_FIT_DEFAULT_M2LNL_RELTOL
#define             NCM_FIT_DEFAULT_M2LNL_ABSTOL
#define             NCM_FIT_DEFAULT_PARAMS_RELTOL
#define             NCM_FIT_DEFAULT_MAXITER

Object Hierarchy

  GEnum
   +----NcmFitType
  GEnum
   +----NcmFitGradType
  GEnum
   +----NcmFitRunMsgs
  GObject
   +----NcmFit
         +----NcmFitGSLLS
         +----NcmFitGSLMM
         +----NcmFitGSLMMS
         +----NcmFitLevmar
         +----NcmFitNLOpt
  GBoxed
   +----NcmFitConstraint

Properties

  "equality-constraints"     gint                  : Read / Write
  "grad-type"                NcmFitGradType        : Read / Write / Construct
  "inequality-constraints"   gint                  : Read / Write
  "likelihood"               NcmLikelihood*        : Read / Write / Construct Only
  "m2lnL-abstol"             gdouble               : Read / Write / Construct
  "m2lnL-reltol"             gdouble               : Read / Write / Construct
  "maxiter"                  guint                 : Read / Write / Construct
  "mset"                     NcmMSet*              : Read / Write / Construct Only
  "params-reltol"            gdouble               : Read / Write / Construct
  "state"                    NcmFitState*          : Read / Write / Construct Only

Description

FIXME

Details

enum NcmFitType

typedef enum {
  NCM_FIT_TYPE_GSL_LS = 0,
  NCM_FIT_TYPE_GSL_MM,
  NCM_FIT_TYPE_GSL_MMS,
  NCM_FIT_TYPE_LEVMAR,
  NCM_FIT_TYPE_NLOPT,
} NcmFitType;

FIXME

NCM_FIT_TYPE_GSL_LS

GSL Least Squares

NCM_FIT_TYPE_GSL_MM

GSL Multidimensional Minimization

NCM_FIT_TYPE_GSL_MMS

GSL Multidimensional Minimization (simplex)

NCM_FIT_TYPE_LEVMAR

Levmar Least Squares Library

NCM_FIT_TYPE_NLOPT

Non Linear Optimization (NLOpt)

enum NcmFitGradType

typedef enum {
  NCM_FIT_GRAD_ANALYTICAL = 0,
  NCM_FIT_GRAD_NUMDIFF_FORWARD,
  NCM_FIT_GRAD_NUMDIFF_CENTRAL,
  NCM_FIT_GRAD_NUMDIFF_ACCURATE,
} NcmFitGradType;

FIXME

NCM_FIT_GRAD_ANALYTICAL

FIXME

NCM_FIT_GRAD_NUMDIFF_FORWARD

FIXME

NCM_FIT_GRAD_NUMDIFF_CENTRAL

FIXME

NCM_FIT_GRAD_NUMDIFF_ACCURATE

FIXME

_NcmFitLSJ ()

void                (*_NcmFitLSJ)                       (NcmFit *fit,
                                                         NcmMatrix *J);

_NcmFitLSFJ ()

void                (*_NcmFitLSFJ)                      (NcmFit *fit,
                                                         NcmVector *f,
                                                         NcmMatrix *J);

_NcmFitM2lnLGrad ()

void                (*_NcmFitM2lnLGrad)                 (NcmFit *fit,
                                                         NcmVector *grad);

_NcmFitM2lnLValGrad ()

void                (*_NcmFitM2lnLValGrad)              (NcmFit *fit,
                                                         gdouble *m2lnL,
                                                         NcmVector *grad);

enum NcmFitRunMsgs

typedef enum {
  NCM_FIT_RUN_MSGS_NONE = 0,
  NCM_FIT_RUN_MSGS_SIMPLE,
  NCM_FIT_RUN_MSGS_FULL,
} NcmFitRunMsgs;

FIXME

NCM_FIT_RUN_MSGS_NONE

FIXME

NCM_FIT_RUN_MSGS_SIMPLE

FIXME

NCM_FIT_RUN_MSGS_FULL

FIXME

struct NcmFit

struct NcmFit;

struct NcmFitClass

struct NcmFitClass {
};

struct NcmFitConstraint

struct NcmFitConstraint {
};

ncm_fit_constraint_new ()

NcmFitConstraint *  ncm_fit_constraint_new              (NcmFit *fit,
                                                         NcmMSetFunc *func,
                                                         gdouble tot);

FIXME

fit :

FIXME

func :

FIXME

tot :

FIXME

Returns :

FIXME. [transfer full]

ncm_fit_constraint_dup ()

NcmFitConstraint *  ncm_fit_constraint_dup              (NcmFitConstraint *fitc);

FIXME

fitc :

FIXME

Returns :

FIXME. [transfer full]

ncm_fit_constraint_free ()

void                ncm_fit_constraint_free             (NcmFitConstraint *fitc);

FIXME

fitc :

FIXME

ncm_fit_new ()

NcmFit *            ncm_fit_new                         (NcmFitType ftype,
                                                         gchar *algo_name,
                                                         NcmLikelihood *lh,
                                                         NcmMSet *mset,
                                                         NcmFitGradType gtype);

FIXME

ftype :

a NcmFitType

algo_name :

name of the algorithm to be used

lh :

a NcmLikelihood

mset :

a NcmMSet

gtype :

a NcmFitGradType

Returns :

FIXME

ncm_fit_ref ()

NcmFit *            ncm_fit_ref                         (NcmFit *fit);

FIXME

fit :

a NcmFit.

Returns :

FIXME. [transfer full]

ncm_fit_copy_new ()

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

Duplicates the NcmFit object with new references for its contents.

fit :

a NcmFit

lh :

a NcmLikelihood

mset :

a NcmMSet

gtype :

a NcmFitGradType

Returns :

FIXME. [transfer full]

ncm_fit_dup ()

NcmFit *            ncm_fit_dup                         (NcmFit *fit,
                                                         NcmSerialize *ser);

Duplicates the NcmFit object duplicating all its contents.

fit :

a NcmFit

ser :

a NcmSerialize

Returns :

FIXME. [transfer full]

ncm_fit_free ()

void                ncm_fit_free                        (NcmFit *fit);

FIXME

fit :

a NcmFit.

ncm_fit_clear ()

void                ncm_fit_clear                       (NcmFit **fit);

FIXME

fit :

a NcmFit.

ncm_fit_set_grad_type ()

void                ncm_fit_set_grad_type               (NcmFit *fit,
                                                         NcmFitGradType gtype);

FIXME

fit :

a NcmLikelihood.

gtype :

a NcmFitGradType.

ncm_fit_set_maxiter ()

void                ncm_fit_set_maxiter                 (NcmFit *fit,
                                                         guint maxiter);

FIXME

fit :

a NcmFit.

maxiter :

FIXME.

ncm_fit_get_maxiter ()

guint               ncm_fit_get_maxiter                 (NcmFit *fit);

FIXME

fit :

a NcmFit.

Returns :

FIXME

ncm_fit_set_m2lnL_reltol ()

void                ncm_fit_set_m2lnL_reltol            (NcmFit *fit,
                                                         gdouble tol);

FIXME

fit :

a NcmFit.

tol :

FIXME.

ncm_fit_get_m2lnL_reltol ()

gdouble             ncm_fit_get_m2lnL_reltol            (NcmFit *fit);

FIXME

fit :

a NcmFit.

Returns :

FIXME

ncm_fit_set_m2lnL_abstol ()

void                ncm_fit_set_m2lnL_abstol            (NcmFit *fit,
                                                         gdouble tol);

FIXME

fit :

a NcmFit.

tol :

FIXME.

ncm_fit_get_m2lnL_abstol ()

gdouble             ncm_fit_get_m2lnL_abstol            (NcmFit *fit);

FIXME

fit :

a NcmFit.

Returns :

FIXME

ncm_fit_set_params_reltol ()

void                ncm_fit_set_params_reltol           (NcmFit *fit,
                                                         gdouble tol);

FIXME

fit :

a NcmFit.

tol :

FIXME.

ncm_fit_get_params_reltol ()

gdouble             ncm_fit_get_params_reltol           (NcmFit *fit);

FIXME

fit :

a NcmFit.

Returns :

FIXME

ncm_fit_set_params ()

void                ncm_fit_set_params                  (NcmFit *fit,
                                                         NcmVector *params);

FIXME

fit :

a NcmFit.

params :

FIXME

ncm_fit_add_equality_constraint ()

void                ncm_fit_add_equality_constraint     (NcmFit *fit,
                                                         NcmMSetFunc *func,
                                                         gdouble tot);

FIXME

fit :

a NcmFit.

func :

FIXME

tot :

FIXME

ncm_fit_add_inequality_constraint ()

void                ncm_fit_add_inequality_constraint   (NcmFit *fit,
                                                         NcmMSetFunc *func,
                                                         gdouble tot);

FIXME

fit :

a NcmFit.

func :

FIXME

tot :

FIXME

ncm_fit_remove_equality_constraints ()

void                ncm_fit_remove_equality_constraints (NcmFit *fit);

FIXME

fit :

a NcmFit.

ncm_fit_remove_inequality_constraints ()

void                ncm_fit_remove_inequality_constraints
                                                        (NcmFit *fit);

FIXME

fit :

a NcmFit.

ncm_fit_has_equality_constraints ()

guint               ncm_fit_has_equality_constraints    (NcmFit *fit);

FIXME

fit :

a NcmFit.

Returns :

FIXME

ncm_fit_has_inequality_constraints ()

guint               ncm_fit_has_inequality_constraints  (NcmFit *fit);

FIXME

fit :

a NcmFit.

Returns :

FIXME

ncm_fit_is_least_squares ()

gboolean            ncm_fit_is_least_squares            (NcmFit *fit);

FIXME

fit :

a NcmFit

Returns :

whenever the fit object use a least squares method.

ncm_fit_get_desc ()

const gchar *       ncm_fit_get_desc                    (NcmFit *fit);

FIXME

fit :

a NcmFit

Returns :

fit object description. [transfer none]

ncm_fit_log_info ()

void                ncm_fit_log_info                    (NcmFit *fit);

FIXME

fit :

a NcmFit

ncm_fit_log_covar ()

void                ncm_fit_log_covar                   (NcmFit *fit);

FIXME

fit :

a NcmFit

ncm_fit_log_start ()

void                ncm_fit_log_start                   (NcmFit *fit);

FIXME

fit :

a NcmFit

ncm_fit_log_state ()

void                ncm_fit_log_state                   (NcmFit *fit);

This function prints in the log the current state.

fit :

a NcmFit

ncm_fit_log_step ()

void                ncm_fit_log_step                    (NcmFit *fit);

FIXME

fit :

a NcmFit

ncm_fit_log_step_error ()

void                ncm_fit_log_step_error              (NcmFit *fit,
                                                         const gchar *strerror,
                                                         ...);

FIXME

fit :

a NcmFit

strerror :

FIXME

... :

FIXME

ncm_fit_log_end ()

void                ncm_fit_log_end                     (NcmFit *fit);

This function prints in the log the precision with which the best-fit was found.

fit :

a NcmFit

ncm_fit_fishermatrix_print ()

void                ncm_fit_fishermatrix_print          (NcmFit *fit,
                                                         FILE *out,
                                                         gchar *header);

ncm_fit_data_m2lnL_val ()

void                ncm_fit_data_m2lnL_val              (NcmFit *fit,
                                                         gdouble *data_m2lnL);

This function computes minus two times the logarithm base e of the likelihood using only the data set and not considering any prior. The result is set on data_m2lnL.

fit :

a NcmFit

data_m2lnL :

minus two times the logarithm base e of the likelihood. [out]

ncm_fit_priors_m2lnL_val ()

void                ncm_fit_priors_m2lnL_val            (NcmFit *fit,
                                                         gdouble *priors_m2lnL);

This function computes minus two times the logarithm base e of the likelihood using the data set and taking into account the assumed priors. The result is set on priors_m2lnL.

fit :

a NcmFit

priors_m2lnL :

minus two times the logarithm base e of the likelihood. [out]

ncm_fit_m2lnL_val ()

void                ncm_fit_m2lnL_val                   (NcmFit *fit,
                                                         gdouble *m2lnL);

FIXME

fit :

a NcmFit

m2lnL :

minus two times the logarithm base e of the likelihood. [out]

ncm_fit_ls_f ()

void                ncm_fit_ls_f                        (NcmFit *fit,
                                                         NcmVector *f);

FIXME

fit :

a NcmFit

f :

a NcmVector

ncm_fit_m2lnL_grad ()

void                ncm_fit_m2lnL_grad                  (NcmFit *fit,
                                                         NcmVector *df);

FIXME

fit :

a NcmFit

df :

a NcmVector

ncm_fit_m2lnL_grad_an ()

void                ncm_fit_m2lnL_grad_an               (NcmFit *fit,
                                                         NcmVector *df);

Analytical gradient.

fit :

a NcmFit

df :

a NcmVector

ncm_fit_m2lnL_grad_nd_fo ()

void                ncm_fit_m2lnL_grad_nd_fo            (NcmFit *fit,
                                                         NcmVector *grad);

Numerical differentiation (forward).

fit :

a NcmFit

grad :

a NcmVector

ncm_fit_m2lnL_grad_nd_ce ()

void                ncm_fit_m2lnL_grad_nd_ce            (NcmFit *fit,
                                                         NcmVector *grad);

Numerical differentiation (central).

fit :

a NcmFit

grad :

a NcmVector

ncm_fit_m2lnL_grad_nd_ac ()

void                ncm_fit_m2lnL_grad_nd_ac            (NcmFit *fit,
                                                         NcmVector *grad);

Numerical differentiation (accurate).

fit :

a NcmFit

grad :

a NcmVector

ncm_fit_m2lnL_val_grad ()

void                ncm_fit_m2lnL_val_grad              (NcmFit *fit,
                                                         gdouble *result,
                                                         NcmVector *df);

FIXME

fit :

a NcmFit

result :

FIXME. [out]

df :

a NcmVector

ncm_fit_m2lnL_val_grad_an ()

void                ncm_fit_m2lnL_val_grad_an           (NcmFit *fit,
                                                         gdouble *result,
                                                         NcmVector *df);

FIXME

fit :

a NcmFit

result :

FIXME. [out]

df :

a NcmVector

ncm_fit_m2lnL_val_grad_nd_fo ()

void                ncm_fit_m2lnL_val_grad_nd_fo        (NcmFit *fit,
                                                         gdouble *m2lnL,
                                                         NcmVector *grad);

FIXME

fit :

a NcmFit

m2lnL :

minus two times the logarithm base e of the likelihood. [out]

grad :

a NcmVector

ncm_fit_m2lnL_val_grad_nd_ce ()

void                ncm_fit_m2lnL_val_grad_nd_ce        (NcmFit *fit,
                                                         gdouble *m2lnL,
                                                         NcmVector *grad);

FIXME

fit :

a NcmFit

m2lnL :

minus two times the logarithm base e of the likelihood.

grad :

a NcmVector

ncm_fit_m2lnL_val_grad_nd_ac ()

void                ncm_fit_m2lnL_val_grad_nd_ac        (NcmFit *fit,
                                                         gdouble *m2lnL,
                                                         NcmVector *grad);

FIXME

fit :

a NcmFit

m2lnL :

minus two times the logarithm base e of the likelihood. [out]

grad :

a NcmVector

ncm_fit_ls_J ()

void                ncm_fit_ls_J                        (NcmFit *fit,
                                                         NcmMatrix *J);

FIXME

fit :

a NcmFit

J :

a NcmMatrix

ncm_fit_ls_J_an ()

void                ncm_fit_ls_J_an                     (NcmFit *fit,
                                                         NcmMatrix *J);

FIXME

fit :

a NcmFit

J :

a NcmMatrix

ncm_fit_ls_J_nd_fo ()

void                ncm_fit_ls_J_nd_fo                  (NcmFit *fit,
                                                         NcmMatrix *J);

FIXME

fit :

a NcmFit

J :

a NcmMatrix

ncm_fit_ls_J_nd_ce ()

void                ncm_fit_ls_J_nd_ce                  (NcmFit *fit,
                                                         NcmMatrix *J);

FIXME

fit :

a NcmFit

J :

a NcmMatrix

ncm_fit_ls_f_J ()

void                ncm_fit_ls_f_J                      (NcmFit *fit,
                                                         NcmVector *f,
                                                         NcmMatrix *J);

FIXME

fit :

a NcmFit

f :

a NcmVector

J :

a NcmMatrix

ncm_fit_ls_f_J_an ()

void                ncm_fit_ls_f_J_an                   (NcmFit *fit,
                                                         NcmVector *f,
                                                         NcmMatrix *J);

FIXME

fit :

a NcmFit

f :

a NcmVector

J :

a NcmMatrix

ncm_fit_ls_f_J_nd_fo ()

void                ncm_fit_ls_f_J_nd_fo                (NcmFit *fit,
                                                         NcmVector *f,
                                                         NcmMatrix *J);

FIXME

fit :

a NcmFit

f :

a NcmVector

J :

a NcmMatrix

ncm_fit_ls_f_J_nd_ce ()

void                ncm_fit_ls_f_J_nd_ce                (NcmFit *fit,
                                                         NcmVector *f,
                                                         NcmMatrix *J);

FIXME

fit :

a NcmFit

f :

a NcmVector

J :

a NcmMatrix

ncm_fit_numdiff_m2lnL_hessian ()

void                ncm_fit_numdiff_m2lnL_hessian       (NcmFit *fit,
                                                         NcmMatrix *H);

FIXME

fit :

a NcmFit

H :

a NcmMatrix

ncm_fit_numdiff_m2lnL_covar ()

void                ncm_fit_numdiff_m2lnL_covar         (NcmFit *fit);

FIXME

fit :

a NcmFit

ncm_fit_ls_covar ()

void                ncm_fit_ls_covar                    (NcmFit *fit);

FIXME

fit :

a NcmFit.

ncm_fit_covar_var ()

gdouble             ncm_fit_covar_var                   (NcmFit *fit,
                                                         NcmModelID mid,
                                                         guint pid);

FIXME

fit :

a NcmFit.

mid :

a NcmModelID.

pid :

FIXME

Returns :

FIXME

ncm_fit_covar_sd ()

gdouble             ncm_fit_covar_sd                    (NcmFit *fit,
                                                         NcmModelID mid,
                                                         guint pid);

FIXME

fit :

a NcmFit.

mid :

a NcmModelID.

pid :

FIXME

Returns :

FIXME

ncm_fit_covar_cov ()

gdouble             ncm_fit_covar_cov                   (NcmFit *fit,
                                                         NcmModelID mid1,
                                                         guint pid1,
                                                         NcmModelID mid2,
                                                         guint pid2);

FIXME

fit :

a NcmFit

mid1 :

a NcmModelID.

pid1 :

FIXME

mid2 :

a NcmModelID.

pid2 :

FIXME

Returns :

FIXME

ncm_fit_covar_cor ()

gdouble             ncm_fit_covar_cor                   (NcmFit *fit,
                                                         NcmModelID mid1,
                                                         guint pid1,
                                                         NcmModelID mid2,
                                                         guint pid2);

FIXME

fit :

a NcmFit

mid1 :

a NcmModelID.

pid1 :

FIXME

mid2 :

a NcmModelID.

pid2 :

FIXME

Returns :

FIXME

ncm_fit_covar_fparam_var ()

gdouble             ncm_fit_covar_fparam_var            (NcmFit *fit,
                                                         guint fpi);

FIXME

fit :

a NcmFit.

fpi :

FIXME

Returns :

FIXME

ncm_fit_covar_fparam_sd ()

gdouble             ncm_fit_covar_fparam_sd             (NcmFit *fit,
                                                         guint fpi);

FIXME

fit :

a NcmFit.

fpi :

FIXME

Returns :

FIXME

ncm_fit_covar_fparam_cov ()

gdouble             ncm_fit_covar_fparam_cov            (NcmFit *fit,
                                                         guint fpi1,
                                                         guint fpi2);

FIXME

fit :

a NcmFit.

fpi1 :

FIXME

fpi2 :

FIXME

Returns :

FIXME

ncm_fit_covar_fparam_cor ()

gdouble             ncm_fit_covar_fparam_cor            (NcmFit *fit,
                                                         guint fpi1,
                                                         guint fpi2);

FIXME

fit :

a NcmFit.

fpi1 :

FIXME

fpi2 :

FIXME

Returns :

FIXME

ncm_fit_lr_test_range ()

void                ncm_fit_lr_test_range               (NcmFit *fit,
                                                         NcmModelID mid,
                                                         guint pid,
                                                         gdouble start,
                                                         gdouble stop,
                                                         gdouble step);

FIXME

fit :

a NcmFit

mid :

a NcmModelID.

pid :

FIXME

start :

FIXME

stop :

FIXME

step :

FIXME

ncm_fit_dprob ()

void                ncm_fit_dprob                       (NcmFit *fit,
                                                         NcmModelID mid,
                                                         guint pid,
                                                         gdouble a,
                                                         gdouble b,
                                                         gdouble step,
                                                         gdouble norm);

FIXME

fit :

a NcmFit.

mid :

a NcmModelID.

pid :

FIXME

a :

FIXME

b :

FIXME

step :

FIXME

norm :

FIXME

Returns :

FIXME

ncm_fit_lr_test ()

gdouble             ncm_fit_lr_test                     (NcmFit *fit,
                                                         NcmModelID mid,
                                                         guint pid,
                                                         gdouble val,
                                                         gint dof);

FIXME

fit :

a NcmFit.

mid :

a NcmModelID.

pid :

FIXME

val :

FIXME

dof :

FIXME

Returns :

FIXME

ncm_fit_prob ()

gdouble             ncm_fit_prob                        (NcmFit *fit,
                                                         NcmModelID mid,
                                                         guint pid,
                                                         gdouble a,
                                                         gdouble b);

FIXME

fit :

a NcmFit.

mid :

a NcmModelID.

pid :

FIXME

a :

FIXME

b :

FIXME

Returns :

FIXME

ncm_fit_chisq_test ()

gdouble             ncm_fit_chisq_test                  (NcmFit *fit,
                                                         size_t bins);

ncm_fit_reset ()

void                ncm_fit_reset                       (NcmFit *fit);

FIXME

fit :

a NcmFit

ncm_fit_run ()

gboolean            ncm_fit_run                         (NcmFit *fit,
                                                         NcmFitRunMsgs mtype);

FIXME

fit :

a NcmFit

mtype :

a NcmFitRunMsgs

Returns :

FIXME

ncm_fit_type_constrain_error ()

gdouble             ncm_fit_type_constrain_error        (NcmFit *fit,
                                                         gdouble p,
                                                         gint nu,
                                                         gdouble dir,
                                                         NcmMSetFunc *func,
                                                         gdouble z,
                                                         gboolean walk);

ncm_fit_function_error ()

void                ncm_fit_function_error              (NcmFit *fit,
                                                         NcmMSetFunc *func,
                                                         gdouble *x,
                                                         gboolean pretty_print,
                                                         gdouble *f,
                                                         gdouble *sigma_f);

FIXME

fit :

a NcmFit

func :

a NcmMSetFunc

x :

FIXME

pretty_print :

FIXME

f :

FIXME. [out]

sigma_f :

FIXME. [out]

ncm_fit_function_cov ()

gdouble             ncm_fit_function_cov                (NcmFit *fit,
                                                         NcmMSetFunc *func1,
                                                         gdouble z1,
                                                         NcmMSetFunc *func2,
                                                         gdouble z2,
                                                         gboolean pretty_print);

FIXME

fit :

a NcmFit

func1 :

a NcmMSetFunc

z1 :

FIXME

func2 :

a NcmMSetFunc

z2 :

FIXME

pretty_print :

FIXME

Returns :

FIXME

NCM_FIT_NPARAM()

#define NCM_FIT_NPARAM(fit) ((fit)->pt->nfree)

NCM_FIT_DEFAULT_M2LNL_RELTOL

#define NCM_FIT_DEFAULT_M2LNL_RELTOL (1e-8)

NCM_FIT_DEFAULT_M2LNL_ABSTOL

#define NCM_FIT_DEFAULT_M2LNL_ABSTOL (0.0)

NCM_FIT_DEFAULT_PARAMS_RELTOL

#define NCM_FIT_DEFAULT_PARAMS_RELTOL (1e-8)

NCM_FIT_DEFAULT_MAXITER

#define NCM_FIT_DEFAULT_MAXITER 10000

Property Details

The "equality-constraints" property

  "equality-constraints"     gint                  : Read / Write

Equality constraints pointer.

Default value: 0


The "grad-type" property

  "grad-type"                NcmFitGradType        : Read / Write / Construct

Differentiation method.

Default value: NCM_FIT_GRAD_NUMDIFF_FORWARD


The "inequality-constraints" property

  "inequality-constraints"   gint                  : Read / Write

Inequality constraints pointer.

Default value: 0


The "likelihood" property

  "likelihood"               NcmLikelihood*        : Read / Write / Construct Only

Likelihood object.


The "m2lnL-abstol" property

  "m2lnL-abstol"             gdouble               : Read / Write / Construct

Absolute tolarence in m2lnL.

Allowed values: >= 0

Default value: 0


The "m2lnL-reltol" property

  "m2lnL-reltol"             gdouble               : Read / Write / Construct

Relative tolarence in m2lnL.

Allowed values: >= 0

Default value: 1e-08


The "maxiter" property

  "maxiter"                  guint                 : Read / Write / Construct

Maximum number of interations.

Default value: 10000


The "mset" property

  "mset"                     NcmMSet*              : Read / Write / Construct Only

Model set object.


The "params-reltol" property

  "params-reltol"            gdouble               : Read / Write / Construct

Relative tolarence in fitted parameters.

Allowed values: >= 0

Default value: 1e-08


The "state" property

  "state"                    NcmFitState*          : Read / Write / Construct Only

Fit state object.