|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectScalableGaussianOptimizationFunction
public class ScalableGaussianOptimizationFunction
This class provides an optimizable function for the JPOP framework (http://www5.cs.fau.de/research/software/java-parallel-optimization-package/
or
http://peaks.informatik.uni-erlangen.de/jpop-api/overview-summary.html
.
The goal is to model a given set of values with a sum of three scalable Gaussian functions and optimize the parameters of these Gaussian functions via the sum of squared differences. The following parameters are optimized: Mean (\mu_i), standard deviation (\sigma_i) and scaling factor (\alpha_i) for each Gaussian function.
Formula: Sum of three Gaussians (in latex):
g_s(x) = \sum_{k=1}^{3} \alpha_k \mathcal{N}(x; \mu_k, \sigma_k)
Formula: Optimization function:
h_s(\theta_s) = \sum_{i = 1}^{N} (f(x_i)-g_s(x_i))^2 --> minimum
with \theta_s = (\mu_1, \sigma_1, \mu_2, \sigma_2, \mu_3, \sigma_3, \alpha_1, \alpha_2, \alpha_3)
Except not noted otherwise in the method description, these parameters must have the same order as shown in the line above and will have the same order in the array that contains the final result of the optimization process.
Note and TODO: The parameter indices and their position in the resp. arrays might differ because Java arrays start with 0, but in the notation the indices 1 - 3 are used. The descriptions might not be completely consistent due to this reason.
Constructor Summary | |
---|---|
ScalableGaussianOptimizationFunction()
|
|
ScalableGaussianOptimizationFunction(double[] xvalues,
double[] yvalues)
Constructs a new Optimization function. |
Method Summary | |
---|---|
double |
evaluate(double[] params,
int block)
Evaluates the optimization function h_s (see class description) for the parameters (= at the position) params for the Gaussian functions. |
double |
evaluateBasisFunction(double x,
double[] params)
Evaluates the function g_s (see class description) at position x. |
int |
getNumberOfProcessingBlocks()
returns the number of parallel processing blocks. |
double[] |
gradient(double[] params,
int block)
Computes the Gradient at position x. |
void |
setNumberOfProcessingBlocks(int number)
Sets the number of parallel processing blocks. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ScalableGaussianOptimizationFunction(double[] xvalues, double[] yvalues)
xvalues
- (x_i): Array with the positions where you have corresponding measurements (in yvalues)
- both arrays must have the same length.yvalues
- (f(x_i)): y-values/f(x) values corresponding to the positions in xvalues.public ScalableGaussianOptimizationFunction()
Method Detail |
---|
public void setNumberOfProcessingBlocks(int number)
edu.stanford.rsl.jpop.OptimizableFunction
setNumberOfProcessingBlocks
in interface edu.stanford.rsl.jpop.OptimizableFunction
public int getNumberOfProcessingBlocks()
edu.stanford.rsl.jpop.OptimizableFunction
getNumberOfProcessingBlocks
in interface edu.stanford.rsl.jpop.OptimizableFunction
public double evaluate(double[] params, int block)
evaluate
in interface edu.stanford.rsl.jpop.OptimizableFunction
params
- = {\mu_1, \sigma_1, \mu_2, \sigma_2, \mu_3, \sigma_3, \alpha_1, \alpha_2, \alpha_3}block
- the block identifier. First block is 0. block is < getNumberOfProcessingBlocks().
public double[] gradient(double[] params, int block)
edu.stanford.rsl.jpop.GradientOptimizableFunction
gradient
in interface edu.stanford.rsl.jpop.GradientOptimizableFunction
params
- the positionblock
- the block identifier. First block is 0. block is < getNumberOfProcessingBlocks().
public double evaluateBasisFunction(double x, double[] params)
evaluateBasisFunction
in interface GaussianOptimizationFunction
x
- params
- The parameters for the three Gaussians. params = {\mu_1, \sigma_1, \mu_2, \sigma_2, \mu_3, \sigma_3, \alpha_1, \alpha_2, \alpha_3}
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |