|
||||||||||
| 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.logPrior.LogPrior
public abstract class LogPrior
The abstract class for any log-prior used e.g. for maximum supervised posterior optimization.
| Field Summary | |
|---|---|
static int |
UNKNOWN
Sometimes the method Function.getDimensionOfScope()
can not return a value. |
| Constructor Summary | |
|---|---|
LogPrior()
|
|
| Method Summary | |
|---|---|
abstract void |
addGradientFor(double[] params,
double[] vector)
Adds the gradient of the log-prior using the current parameters to a given vector. |
double[] |
evaluateGradientOfFunction(double[] params)
Evaluates the gradient of a function at a certain vector (in mathematical sense) x, i.e.,
. |
abstract String |
getInstanceName()
Returns a short instance name. |
abstract LogPrior |
getNewInstance()
This method returns an empty new instance of the current prior. |
void |
set(boolean freeParameters,
ScoringFunction... funs)
Resets all pre-computed values to their initial values using the ScoringFunctions funs. |
abstract StringBuffer |
toXML()
Encodes the prior as an XML representation. |
| Methods inherited from class de.jstacs.algorithms.optimization.DifferentiableFunction |
|---|
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 |
| Field Detail |
|---|
public static final int UNKNOWN
Function.getDimensionOfScope()
can not return a value. In these cases it is recommended to use this
constant.
| Constructor Detail |
|---|
public LogPrior()
| Method Detail |
|---|
public abstract void addGradientFor(double[] params,
double[] vector)
throws EvaluationException
params - the parametersvector - the vector
EvaluationException - if the gradient could not be evaluated
public final double[] evaluateGradientOfFunction(double[] params)
throws EvaluationException
DifferentiableFunctionx, i.e.,
.
evaluateGradientOfFunction in class DifferentiableFunctionparams - the current vector
Function.getDimensionOfScope()
EvaluationException - if there was something wrong during the evaluation of the
gradientFunction.getDimensionOfScope()
public abstract LogPrior getNewInstance()
throws CloneNotSupportedException
ScoringFunction
s that may be inside the instance. The ScoringFunctions must be
set by an invocation of the method
set(boolean, ScoringFunction...).
CloneNotSupportedException - if something went wrong while cloningset(boolean, ScoringFunction...)
public void set(boolean freeParameters,
ScoringFunction... funs)
throws Exception
ScoringFunctions funs.
freeParameters - the switch for using only the free parameters or all
parameters in a ScoringFunctionfuns - the ScoringFunctions for the prior
Exception - if the ScoringFunctions could not be setpublic abstract StringBuffer toXML()
set(boolean, ScoringFunction...)
has to be invoked after decoding.
toXML in interface Storablepublic abstract String getInstanceName()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||