|
Unfit
3.1.1
Data fitting and optimization software
|
Public Member Functions | |
| void | AccessFindJacobian (GenericCostFunction &cost_function, const std::vector< double > &residuals, const std::vector< double > &variables, bool one_sided_difference=true) |
| void | AccessBroydenUpdate (const std::vector< double > &residuals_new, const std::vector< double > &residuals, const std::vector< double > &hlm, Matrix &jacobianT) |
| Matrix | AccessJacobian () |
| std::vector< double > | AccessGetSolution () |
| void | SetDimensions (std::size_t dimensions) |
| std::size_t | GetDimensions () const |
| void | SetObservationSize (std::size_t obs_size) |
| std::size_t | GetObservationSize () const |
Public Member Functions inherited from Unfit::LevenbergMarquardt | |
| LevenbergMarquardt () | |
| virtual | ~LevenbergMarquardt () |
| int | FindMin (GenericCostFunction &cost_function, std::vector< double > &coordinates) override |
| Implements the Levenberd-Marquardt optimization method. More... | |
| void | Reset () override |
Public Member Functions inherited from Unfit::GenericOptimizer | |
| GenericOptimizer () | |
| virtual | ~GenericOptimizer () |
| void | ResetGenericOptimizer () |
| virtual double | GetCost (std::size_t index=0) const noexcept |
| virtual bool | GetIsPopulationBased () const noexcept |
| virtual std::size_t | GetNumberOfIterations () const noexcept |
| virtual std::size_t | GetNumberOfFunctionEvaluations () const noexcept |
| virtual std::vector< std::vector< double > > | GetPopulation () const |
| virtual std::vector< double > | GetSolution (std::size_t index=0) const |
| virtual void | SetPopulation (const std::vector< std::vector< double >> &population) |
Additional Inherited Members | |
Public Attributes inherited from Unfit::GenericOptimizer | |
| Unfit::Bounds | bounds |
| Unfit::Options | options |
Protected Member Functions inherited from Unfit::GenericOptimizer | |
| virtual bool | CalculateCost (GenericCostFunction &CostFunction, std::vector< double > &x) |
| void | GeneratePopulation (GenericCostFunction &CostFunction, std::size_t dimensions) |
| void | GenerateRandomEngines () |
| virtual bool | IsConverged (const std::vector< double > &best_member, std::size_t truncated_index=0) const |
| Checks to see if the population has converged. More... | |
| virtual void | PrintInitialOutput (double best_cost) const |
| virtual void | PrintIterationOutput (double best_cost) const |
| virtual void | PrintFinalOutput () const |
| virtual void | SortPopulation () noexcept |
Protected Attributes inherited from Unfit::GenericOptimizer | |
| std::vector< std::vector< double > > | population_ |
| std::vector< std::mt19937 > | random_engines_ |
| std::atomic< std::size_t > | function_evaluations_ |
| std::atomic< std::size_t > | iterations_ |
| bool | is_population_based_ |
This class is designed solely to provide the functionality to access the private methods and member variables of the LevenbergMarquardt class.
|
inline |
A function to access the private method (BroydenUpdate) in the LevenbergMarquardt class.
| residuals_new | residual vector from the candidate solution |
| residuals | residual vector from the current solution |
| hlm | vector containing the step between the current and new solutions |
| jacobianT | transpose of the Jacobian matrix |
|
inline |
A function to access the private method (FindJacobian) in the LevenbergMarquardt class.
| cost_function | sample functions to be tested |
| residuals | a vector of residuals at the current guess. Only used for one-sided differencing; can be empty for two-sided differencing. |
| variables | vector of the coefficients of the function |
| one_sided_difference | select between one sided (forward) and two sided finite different approximations for the Jacobian calculation |
|
inline |
A function to access the private method (GetSolution) in the LevenbergMarquardt class.
|
inline |
A function to access the private member variable (jacobian_) in the LevenbergMarquardt class.
|
inline |
A function to get the private member variable (dimensions_) in the LevenbergMarquardt class. This is the number of variables to be fitted.
|
inline |
A function to get the private member variable (observation_size_) in the LevenbergMarquardt class. This is the number of data points in the fit.
|
inline |
A function to set the private member variable (dimensions_) in the LevenbergMarquardt class. This is the number of variables to be fitted.
| dimensions | the number of variables in the problem |
|
inline |
A function to set the private member variable (observation_size_) in the LevenbergMarquardt class. This is the number of data points in the fit.
| obs_size | the number of data points to be fitted |
1.8.13