61 const std::function<
double(
const std::vector<double> &)> &func,
62 const std::vector<double> &initial_point,
64 size_t max_iterations);
75 const std::function<
double(
const std::vector<double> &)> &func,
76 const std::vector<double> &point,
85 std::vector<std::vector<double>>
98 const std::vector<double> &gradient,
99 const std::vector<std::vector<double>> &bhhh_matrix);
112 const std::function<
double(
const std::vector<double> &)> &func,
113 const std::vector<double> &initial_point,
115 size_t max_iterations);
125 const std::vector<double> &gradient,
126 const std::vector<std::vector<double>> &hessian_inverse);
137 line_search(
const std::function<
double(
const std::vector<double> &)> &func,
138 const std::vector<double> ¤t_point,
139 const std::vector<double> &search_direction);
151 const std::vector<double> &search_direction,
164 const std::vector<double> ¤t_point,
165 const std::vector<double> &gradient);
176 const std::vector<std::vector<double>> &hessian_inverse,
177 const std::vector<double> &gradient_difference,
178 const std::vector<double> &search_direction);
188 const std::vector<double> &b);
198 const std::vector<double> &b)
const;
212 std::tuple<std::vector<double>,
double>
213 lbfgs_optimize(
const std::function<
double(
const std::vector<double> &)> &f,
214 const std::vector<double> &initial_point,
215 double tolerance = 1e-4,
216 size_t max_iterations = 100,
217 size_t memory_size = 5);
Class implementing Quasi-Newton optimization methods.
double line_search(const std::function< double(const std::vector< double > &)> &func, const std::vector< double > ¤t_point, const std::vector< double > &search_direction)
Perform line search to find an appropriate step size.
std::vector< double > bhhh_optimize(const std::function< double(const std::vector< double > &)> &func, const std::vector< double > &initial_point, double tolerance, size_t max_iterations)
Optimize a function using the Berndt–Hall–Hall–Hausman (BHHH) algorithm.
std::vector< double > calculate_search_direction(const std::vector< double > &gradient, const std::vector< std::vector< double >> &hessian_inverse)
Calculate the search direction using the BFGS method.
std::vector< std::vector< double > > calculate_bhhh_matrix(const std::vector< double > &gradient)
Calculate the BHHH matrix from the gradient.
std::vector< double > calculate_gradient_difference(const std::vector< double > &next_point, const std::vector< double > ¤t_point, const std::vector< double > &gradient)
Calculate the gradient difference between two points.
double dot_product(const std::vector< double > &a, const std::vector< double > &b)
Calculate the dot product of two vectors.
std::vector< double > calculate_gradient(const std::function< double(const std::vector< double > &)> &func, const std::vector< double > &point, double epsilon)
Calculate the gradient of a function at a given point.
std::vector< double > update_point(const std::vector< double > ¤t_point, const std::vector< double > &gradient, const std::vector< std::vector< double >> &bhhh_matrix)
Update the current point using the BHHH matrix.
std::tuple< std::vector< double >, double > lbfgs_optimize(const std::function< double(const std::vector< double > &)> &f, const std::vector< double > &initial_point, double tolerance=1e-4, size_t max_iterations=100, size_t memory_size=5)
Optimize a function using the Limited-Memory Broyden-Fletcher-Goldfarb-Shanno (L-BFGS) algorithm.
std::vector< double > bfgs_optimize(const std::function< double(const std::vector< double > &)> &func, const std::vector< double > &initial_point, double tolerance, size_t max_iterations)
Optimize a function using the Broyden–Fletcher–Goldfarb–Shanno (BFGS) algorithm.
std::vector< std::vector< double > > update_hessian_inverse(const std::vector< std::vector< double >> &hessian_inverse, const std::vector< double > &gradient_difference, const std::vector< double > &search_direction)
Update the inverse of the Hessian matrix using the BFGS method.
std::vector< double > vector_subtraction(const std::vector< double > &a, const std::vector< double > &b) const
Subtract two vectors element-wise.
The source C++ openGPMP namespace.