Situation:
I am currently developing a Java application based on rules. Every rule has 3 numeric parameters to influence a database communication. I am measuring a value, that is affected by this rules and calculate the standard deviation of the measured values. The standard deviation should be as small as possible.
Question:
I am wondering if it is possible to do this automated? I can already start a test scenario automatically and I can calculate the standard deviation automatically. So, now I am looking for mechanism to adjust the parameters according to the measured values. Any ideas?
Thanx.
PS: I know, it’s a very general question…
As Peter says, you have to minimize a function
f(a,b,c). There are a lot of elaborate methods for well behaving functions. Eg for functions which can be differentiated, or for so called convex functions. In your case you have a function where we do not know very much about. So f could have different local minima which kills many established minimization methods.If a simple evaluation of a parameter set
a,b,cis fast, you can try some kind of coordinate descent. This is not the best method, brute force but easy for you to implement. I will name the standard deviation achieved by(a,b,c)ass(a,b,c):I give you some python style pseudo code, which should be easy to read:
You have to start with some values
(a,b,c)and this function should give you a new triple(a,b,c)which leads to less variation. Now you can apply this step as often as you want.Maybe you have to adapt
eps, that depends on how fasts(a,b,c)changes if you make little modifications ona,b, orc.This is not the best solution, but an easy to try hands-on approach.