Class SimpleGaussianOptimizationFunction

java.lang.Object
  extended by ScalableGaussianOptimizationFunction
      extended by SimpleGaussianOptimizationFunction
All Implemented Interfaces:
edu.stanford.rsl.jpop.GradientOptimizableFunction, edu.stanford.rsl.jpop.OptimizableFunction, GaussianOptimizationFunction

public class SimpleGaussianOptimizationFunction
extends ScalableGaussianOptimizationFunction

This class provides an optimization 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 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).

Formula: Sum of three Gaussians (in latex):
g(x) = \sum_{k=1}^{3} \mathcal{N}(x; \mu_k, \sigma_k)
Formula: Optimization function:
h(\theta) = \sum_{i = 1}^{N} (f(x_i)-g_s(x_i))^2 --> minimum
with \theta = (\mu_1, \sigma_1, \mu_2, \sigma_2, \mu_3, \sigma_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: For further information please refer to the superclass ScalableGaussianOptimizationFunction. This implementation is strongly based on the superclass - for the variable scaling factors a constant value of 1 is passed.


Constructor Summary
SimpleGaussianOptimizationFunction(double[] xvalues, double[] yvalues)
           
 
Method Summary
 double evaluate(double[] params, int block)
          Unscaled version.
 double evaluateBasisFunction(double x, double[] params)
          Evaluates the function g_s (see class description) at position x.
 double[] gradient(double[] params, int block)
          Computes the Gradient at position x.
 
Methods inherited from class ScalableGaussianOptimizationFunction
getNumberOfProcessingBlocks, setNumberOfProcessingBlocks
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleGaussianOptimizationFunction

public SimpleGaussianOptimizationFunction(double[] xvalues,
                                          double[] yvalues)
See Also:
ScalableGaussianOptimizationFunction
Method Detail

evaluate

public double evaluate(double[] params,
                       int block)
Unscaled version.

Specified by:
evaluate in interface edu.stanford.rsl.jpop.OptimizableFunction
Overrides:
evaluate in class ScalableGaussianOptimizationFunction
Parameters:
params - = {\mu_1, \sigma_1, \mu_2, \sigma_2, \mu_3, \sigma_3}
block -
Returns:
the function value at x

gradient

public double[] gradient(double[] params,
                         int block)
Description copied from interface: edu.stanford.rsl.jpop.GradientOptimizableFunction
Computes the Gradient at position x. (Note that x is a Fortran Array which starts at 1.)

Specified by:
gradient in interface edu.stanford.rsl.jpop.GradientOptimizableFunction
Overrides:
gradient in class ScalableGaussianOptimizationFunction
Parameters:
params - the position
block - the block identifier. First block is 0. block is < getNumberOfProcessingBlocks().
Returns:
the gradient at x. (In Fortran Style)

evaluateBasisFunction

public double evaluateBasisFunction(double x,
                                    double[] params)
Description copied from class: ScalableGaussianOptimizationFunction
Evaluates the function g_s (see class description) at position x.

Specified by:
evaluateBasisFunction in interface GaussianOptimizationFunction
Overrides:
evaluateBasisFunction in class ScalableGaussianOptimizationFunction
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}