LevMarqFitting Struct Reference
LibRPA
|
LIBRPA::utils::LevMarqFitting Struct Reference
Non-linear fitting using the Levenberg-Marquardt algorithm. More...
#include <fitting.h>
Public Member Functions | |
LevMarqFitting (const LevMarqFitting &s)=delete | |
LevMarqFitting (LevMarqFitting &&s)=delete | |
LevMarqFitting & | operator= (const LevMarqFitting &s)=delete |
LevMarqFitting & | operator= (LevMarqFitting &&s)=delete |
void | fit (std::vector< double > &pars, const std::vector< double > &xs, const std::vector< double > &ys, const std::function< double(double, const std::vector< double > &)> &func, const std::function< void(std::vector< double > &, double, const std::vector< double > &)> &grad) |
perform the fitting More... | |
std::vector< double > | fit_eval (std::vector< double > &pars, const std::vector< double > &xs, const std::vector< double > &ys, const std::function< double(double, const std::vector< double > &)> &func, const std::function< void(std::vector< double > &, double, const std::vector< double > &)> &grad, const std::vector< double > &xs_eval) |
perform the fitting and evaluate the functin on a set of abscissa points | |
Public Attributes | |
int | d_maxiter |
Maximal number of iterations. | |
double | d_init_lambda |
double | d_up_factor |
double | d_down_factor |
double | d_target_derr |
Target difference betwee errors of adjacent parameters estimate. | |
int | d_final_it |
double | d_final_err |
double | d_final_derr |
Detailed Description
Non-linear fitting using the Levenberg-Marquardt algorithm.
Member Function Documentation
◆ fit()
void LIBRPA::utils::LevMarqFitting::fit | ( | std::vector< double > & | pars, |
const std::vector< double > & | xs, | ||
const std::vector< double > & | ys, | ||
const std::function< double(double, const std::vector< double > &)> & | func, | ||
const std::function< void(std::vector< double > &, double, const std::vector< double > &)> & | grad | ||
) |
perform the fitting
- Parameters
-
[in,out] pars initial parameters array, optimized after fitting [in] xs abscissa [in] ys values [in] func function to fit the data against [in] grad gradient with respect to parameters
Here is the call graph for this function:
Here is the caller graph for this function:
The documentation for this struct was generated from the following files:
- fitting.h
- fitting.cpp
Generated by