|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.jstacs.algorithms.optimization.DifferentiableFunction
de.jstacs.classifier.scoringFunctionBased.OptimizableFunction
public abstract class OptimizableFunction
This is the main function for the ScoreClassifier
.
Optimizer
Nested Class Summary | |
---|---|
static class |
OptimizableFunction.KindOfParameter
This enum defines the kinds of parameters that can be
returned by the method
getParameters(KindOfParameter) . |
Constructor Summary | |
---|---|
OptimizableFunction()
|
Method Summary | |
---|---|
abstract void |
addTermToClassParameter(int classIndex,
double term)
This method adds the term to the class parameter of the
class with index classIndex . |
abstract double[] |
getClassParams(double[] params)
Returns from the complete vector of parameters those that are for the classes. |
abstract Sample[] |
getData()
Returns the data for each class used in this OptimizableFunction . |
abstract int |
getNumberOfStarts()
Returns the number of starts that should be done for a good optimum. |
abstract double[] |
getParameters(OptimizableFunction.KindOfParameter kind)
Returns some parameters that can be used for instance as start parameters. |
abstract double[][] |
getSequenceWeights()
Returns the weights for each Sequence for each
class used in this OptimizableFunction . |
abstract void |
reset(ScoringFunction[] score)
Resets the ScoringFunction s and all pre-computed 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 |
---|
public OptimizableFunction()
Method Detail |
---|
public abstract int getNumberOfStarts()
Optimizer
should be
started to get a good optimumOptimizer
public abstract double[] getClassParams(double[] params)
params
- the current parameters
public abstract double[] getParameters(OptimizableFunction.KindOfParameter kind) throws Exception
kind
- the kind of the class parameters that will be returned
Exception
- if something went wrongpublic abstract void setParams(double[] current) throws DimensionException
current
- the current values
DimensionException
- if the dimension of the current values does not match with
the dimension of the internal parameterspublic abstract void reset(ScoringFunction[] score) throws Exception
ScoringFunction
s and all pre-computed values.
score
- the array of ScoringFunction
s
Exception
- if something went wrongpublic abstract void addTermToClassParameter(int classIndex, double term)
term
to the class parameter of the
class with index classIndex
.
classIndex
- the index of the classterm
- the term to be added to the class parameterpublic abstract Sample[] getData()
OptimizableFunction
.
getSequenceWeights()
public abstract double[][] getSequenceWeights()
Sequence
for each
class used in this OptimizableFunction
.
Sequence
and each
classgetData()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |