de.jstacs.classifier.scoringFunctionBased
Class OptimizableFunction

java.lang.Object
  extended by de.jstacs.algorithms.optimization.DifferentiableFunction
      extended by de.jstacs.classifier.scoringFunctionBased.OptimizableFunction
All Implemented Interfaces:
Function
Direct Known Subclasses:
NormConditionalLogLikelihood

public abstract class OptimizableFunction
extends DifferentiableFunction

This is the main function for the ScoreClassifier.

Author:
Jens Keilwagen
See Also:
Optimizer

Constructor Summary
OptimizableFunction()
           
 
Method Summary
abstract  double[] getClassParams(double[] params)
          Returns from the complete vector of parameters those that are for the classes.
abstract  int getNumberOfStarts()
          Returns the number of starts that should be done for a good optimum.
abstract  double[] getStartParams(boolean plugIn)
          Returns some start parameters.
abstract  void reset(ScoringFunction[] score)
          Resets the scoringFunctions and all precomputed values.
abstract  void setParams(double[] current)
          Sets the current values as parameters
 
Methods inherited from class de.jstacs.algorithms.optimization.DifferentiableFunction
evaluateGradientOfFunction, findOneDimensionalMin
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.jstacs.algorithms.optimization.Function
evaluateFunction, getDimensionOfScope
 

Constructor Detail

OptimizableFunction

public OptimizableFunction()
Method Detail

getNumberOfStarts

public abstract int getNumberOfStarts()
Returns the number of starts that should be done for a good optimum. For concave or convex functions this number should be 1.

Returns:
the number of starts the Optimizer should be started to get a good optimum
See Also:
Optimizer

getClassParams

public abstract double[] getClassParams(double[] params)
Returns from the complete vector of parameters those that are for the classes.

Parameters:
params - the current params
Returns:
the parameters for the classes

getStartParams

public abstract double[] getStartParams(boolean plugIn)
                                 throws Exception
Returns some start parameters.

Parameters:
plugIn - if some special parameters should be used as plug in parameter (e.g. MAP-parameters)
Returns:
some start parameters
Throws:
Exception - if something went wrong

setParams

public abstract void setParams(double[] current)
                        throws DimensionException
Sets the current values as parameters

Parameters:
current - the current values
Throws:
DimensionException - if the dimension of the current values does not match with the internal parameters

reset

public abstract void reset(ScoringFunction[] score)
                    throws Exception
Resets the scoringFunctions and all precomputed values.

Parameters:
score - the array of scoringFunctions
Throws:
Exception - if something went wrong