I have a function defined by three parameters (or variables): $f(a,b,c)$ This function is not explicitly defined but is actually a piece of code which returns the result of fitting a curve $g(a,b,c)$ to a set of $(x,y)$ points in a 2D space: O = {$(x_1,y_1,w_1), (x_2,y_2,w_2), ...$}where $w$ are weights associated with each point. The smaller $f$, the better the fit of $g$ with those points. Each one of these points has a weight associated to it.Each of these three parameters can only assume values from a given discrete set:A = {$a_1, a_2, a_3, ..., N_a$}B = {$b_1, b_2, b_3, ..., N_b$}C = {$c_1, c_2, c_3, ..., N_c$}Every set $(a_i,b_j,c_k)$ implies a value for $f(a_i,b_j,c_k)$ and as I said, I need to find the $(a_i,b_j,c_k)$ set that returns the minimum value for $f$.What I do to evaluate $f$ is:Take a set of $(a_i,b_j,c_k)$ values and construct a $g_{ijk} (a_i,b_j,c_k)$ curve in 2D space.For each $(x,y)$ point in $O$, find the point in $g_{ijk}$ that is closest to it (euclidean distance)Multiply that distance by the weight ($0<w<1$) associated to that $(x,y)$ point. This gives me a weighted distance for each point.After processing all points in the $O$ set, sum all weighted distances.The sum obtained above is what I call $f(a_i,b_j,c_k)$, ie: a measure of how good $g_{ijk} (a_i,b_j,c_k)$ fitted $O$.So far I've managed to do this through a brute force approach where I test every possible combination of $a,b,c$ (ie: $N_a*N_b*N_c$ combinations) one after another and at the end I simply isolate the minimum.Is there a better/more efficient algorithm to perform this minimization, given the restrictions on my function and parameters?AddAfter a bit of research it looks like this falls into the category of combinatorial optimization problems for which methods such as Cross-Entropy seem to be the standard approach.
Find a function's minimizing set of parameters
algorithms