public abstract class SeparateLogPrior extends LogPrior implements Cloneable
SeparateGaussianLogPrior or the
SeparateLaplaceLogPrior.| Modifier and Type | Field and Description |
|---|---|
protected double[] |
classMus
The means for the class parameters, as specified by the user.
|
protected double[] |
classVars
The variances for the class parameters, as specified by the user.
|
protected boolean |
freeParameters
Indicates, if only free parameters shall be used and hence penalized.
|
protected DifferentiableStatisticalModel[] |
funs
The
DifferentiableSequenceScores using the parameters that shall be
penalized. |
protected double[] |
vars
The base variances for the parameters of the
DifferentiableSequenceScores of
each class, the means of the non-class parameters should be 0. |
| Constructor and Description |
|---|
SeparateLogPrior(double[] vars,
double[] classVars,
double[] classMus)
Creates a new
SeparateLogPrior using the class-specific base
variances vars, the variances classVars and the
means classMus for the class parameters. |
SeparateLogPrior(StringBuffer xml)
The standard constructor for the interface
Storable. |
| Modifier and Type | Method and Description |
|---|---|
SeparateLogPrior |
getNewInstance()
This method returns an empty new instance of the current prior.
|
void |
set(boolean freeParameters,
DifferentiableSequenceScore... funs)
Resets all pre-computed values to their initial values using the
DifferentiableSequenceScores funs. |
StringBuffer |
toXML()
Encodes the prior as an XML representation.
|
protected abstract void |
unset()
Resets all internally pre-computed values, e.g.
|
addGradientFor, evaluateGradientOfFunction, getInstanceNamefindOneDimensionalMinclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitevaluateFunction, getDimensionOfScopeprotected DifferentiableStatisticalModel[] funs
DifferentiableSequenceScores using the parameters that shall be
penalized.protected double[] vars
DifferentiableSequenceScores of
each class, the means of the non-class parameters should be 0.protected double[] classVars
protected double[] classMus
protected boolean freeParameters
public SeparateLogPrior(double[] vars,
double[] classVars,
double[] classMus)
SeparateLogPrior using the class-specific base
variances vars, the variances classVars and the
means classMus for the class parameters.vars - the base variances for each classclassVars - the variances for the class parametersclassMus - the means for the class parameterspublic SeparateLogPrior(StringBuffer xml) throws NonParsableException
Storable.
Creates a new SeparateLogPrior out of its XML representation.xml - the XML representation as StringBufferNonParsableException - if the SeparateLogPrior could not be reconstructed
out of the XML representation (the StringBuffer could
not be parsed)Storablepublic void set(boolean freeParameters,
DifferentiableSequenceScore... funs)
throws Exception
LogPriorDifferentiableSequenceScores funs.set in class LogPriorfreeParameters - the switch for using only the free parameters or all
parameters in a DifferentiableSequenceScorefuns - the DifferentiableSequenceScores for the priorException - if the DifferentiableSequenceScores could not be setprotected abstract void unset()
public SeparateLogPrior getNewInstance() throws CloneNotSupportedException
LogPriorDifferentiableSequenceScore
s that may be inside the instance. The DifferentiableSequenceScores must be
set by an invocation of the method
LogPrior.set(boolean, DifferentiableSequenceScore...).getNewInstance in class LogPriorCloneNotSupportedException - if something went wrong while cloningLogPrior.set(boolean, DifferentiableSequenceScore...)public StringBuffer toXML()
LogPriorLogPrior.set(boolean, DifferentiableSequenceScore...)
has to be invoked after decoding.