N
- the enum listing the nonterminal symbols for the input grammar.public class SoftADPPathModel<N extends Enum<N>> extends Object implements AlignmentDerivativeAlgorithm
Constructor and Description |
---|
SoftADPPathModel(AlignmentSpecification specification,
Grammar<N> grammar,
double beta,
double approxThreshold,
double distance,
EnumMap<N,double[][]> dpTables,
double[][] compareMatrix,
double[] deletionMatrix,
double[] insertionMatrix,
double[] skipDeletionMatrix,
double[] skipInsertionMatrix,
Sequence leftSequence,
Sequence rightSequence) |
Modifier and Type | Method and Description |
---|---|
<X extends Value,Y> |
calculateParameterDerivative(DerivableComparator<X,Y> comp,
String keyword)
This returns the derivatives for all parameters of the given comparator
according to the implementation.
|
<X extends Value,Y> |
calculateRawParameterDerivative(DerivableComparator<X,Y> comp,
String keyword)
This returns the derivatives for all parameters of the given comparator
according to the implementation.
|
double[] |
calculateWeightDerivative()
Calculates the derivative for each keyword weight.
|
double |
getApproxThreshold()
For more information on the ApproxThreshold have a look at the
Softmin class.
|
double |
getBeta()
Returns the parameter defining the "softness" of the alignment.
|
double[][] |
getCompareMatrix()
Returns the matrix of comparison costs between both input sequences.
|
double[] |
getDeletionMatrix()
Returns the vector of deletion costs.
|
double |
getDistance()
Returns the distance between the two input sequences of this Derivative.
|
EnumMap<N,double[][]> |
getDpTables()
Returns the dynamic programming tables that constitute the soft
alignment of both input sequences.
|
static <N extends Enum<N>> |
getGenericClass(Grammar<N> grammar)
Returns the generic class of a SoftADPPathModel given a grammar.
|
Grammar<N> |
getGrammar()
Returns the ADP grammar that was used to compute this SoftADPPathModel.
|
double[] |
getInsertionMatrix()
Returns the vector of insertion costs.
|
Sequence |
getLeft()
Returns the left sequence of this derivative.
|
Sequence |
getRight()
Returns the right sequence of this derivative.
|
double[] |
getSkipDeletionMatrix()
Returns the vector of skip-deletion costs.
|
double[] |
getSkipInsertionMatrix()
Returns the vector of skip-insertion costs.
|
AlignmentSpecification |
getSpecification()
Returns the AlignmentSpecification that was used to compute this
SoftAffinePathModel.
|
public SoftADPPathModel(AlignmentSpecification specification, Grammar<N> grammar, double beta, double approxThreshold, double distance, EnumMap<N,double[][]> dpTables, double[][] compareMatrix, double[] deletionMatrix, double[] insertionMatrix, double[] skipDeletionMatrix, double[] skipInsertionMatrix, Sequence leftSequence, Sequence rightSequence)
public double getBeta()
public double getApproxThreshold()
public AlignmentSpecification getSpecification()
public Grammar<N> getGrammar()
public Sequence getLeft()
getLeft
in interface AlignmentDerivativeAlgorithm
public Sequence getRight()
getRight
in interface AlignmentDerivativeAlgorithm
public double getDistance()
getDistance
in interface AlignmentDerivativeAlgorithm
public EnumMap<N,double[][]> getDpTables()
public double[][] getCompareMatrix()
public double[] getDeletionMatrix()
public double[] getInsertionMatrix()
public double[] getSkipDeletionMatrix()
public double[] getSkipInsertionMatrix()
public <X extends Value,Y> double[] calculateRawParameterDerivative(DerivableComparator<X,Y> comp, String keyword)
calculateRawParameterDerivative
in interface AlignmentDerivativeAlgorithm
X
- the values the given comparator can compare.comp
- the DerivableComparator that provides functionality to
calculate local derivatives.keyword
- the keyword for which the given comparator was used in
the Alignment.public <X extends Value,Y> Y calculateParameterDerivative(DerivableComparator<X,Y> comp, String keyword)
calculateParameterDerivative
in interface AlignmentDerivativeAlgorithm
X
- the values the given comparator can compare.Y
- the result format for derivatives of the given comparator.comp
- the DerivableComparator that provides functionality to
calculate local derivatives.keyword
- the keyword for which the given comparator was used in
the Alignment.public double[] calculateWeightDerivative()
calculateWeightDerivative
in interface AlignmentDerivativeAlgorithm
public static <N extends Enum<N>> Class<SoftADPPathModel<N>> getGenericClass(Grammar<N> grammar)
N
- the enum class of the nonterminal symbols of the grammar.grammar
- the ADP grammar itself.Copyright (C) 2013-2015 Benjamin Paaßen, Georg Zentgraf, AG Theoretical Computer Science, Centre of Excellence Cognitive Interaction Technology (CITEC), University of Bielefeld, licensed under the AGPL v. 3: http://openresearch.cit-ec.de/projects/tcs . This documentation is licensed under the conditions of CC-BY-SA 4.0: https://creativecommons.org/licenses/by-sa/4.0/