|
||||||||||
| 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 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 function at a certain vector (in mathematical sense) x |
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
| Constructor Detail |
|---|
public LogPrior()
| Method Detail |
|---|
public abstract void addGradientFor(double[] params,
double[] vector)
throws EvaluationException
params - the parametersvector - the vector
EvaluationException - is thrown if the gradient could not be evaluated
public final double[] evaluateGradientOfFunction(double[] params)
throws EvaluationException
DifferentiableFunctionx
evaluateGradientOfFunction in class DifferentiableFunctionparams - the current vector
getDimensionOfScope()
EvaluationException - if there was a mistake in evaluating the gradientFunction.getDimensionOfScope()
public abstract LogPrior getNewInstance()
throws CloneNotSupportedException
ScoringFunctions that may be inside the instance. The ScoringFunctions must be set by an invocation of the method set(boolean, ScoringFunction...).
CloneNotSupportedExceptionset(boolean, ScoringFunction[])
public void set(boolean freeParameters,
ScoringFunction... funs)
throws Exception
ScoringFunctions funs
freeParameters - if true, only the free parameters are usedfuns - the ScoringFunctions for the prior
Exception - is thrown if the ScoringFunctions could not be setpublic abstract StringBuffer toXML()
set 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 | |||||||||