public class SoftAffinePathModel extends Object implements AlignmentDerivativeAlgorithm
Constructor and Description |
---|
SoftAffinePathModel(double beta,
AlignmentSpecification specification,
int minMiddleSkips,
double distance,
EnumMap<AbstractAffineAlignmentAlgorithm.Recurrence,double[][]> dp_tables,
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 |
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<AbstractAffineAlignmentAlgorithm.Recurrence,double[][]> |
getDp_tables()
Returns the dynamic programming tables that constitute the (soft) affine
alignment of both input sequences.
|
double[] |
getInsertionMatrix()
Returns the vector of insertion costs.
|
Sequence |
getLeft()
Returns the left sequence of this derivative.
|
int |
getMinMiddleSkips()
The minimum number of skips that have to be done in the middle
of an alignment.
|
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 SoftAffinePathModel(double beta, AlignmentSpecification specification, int minMiddleSkips, double distance, EnumMap<AbstractAffineAlignmentAlgorithm.Recurrence,double[][]> dp_tables, double[][] compareMatrix, double[] deletionMatrix, double[] insertionMatrix, double[] skipDeletionMatrix, double[] skipInsertionMatrix, Sequence leftSequence, Sequence rightSequence)
public double getBeta()
public AlignmentSpecification getSpecification()
public int getMinMiddleSkips()
public EnumMap<AbstractAffineAlignmentAlgorithm.Recurrence,double[][]> getDp_tables()
public double[][] getCompareMatrix()
public double[] getDeletionMatrix()
public double[] getInsertionMatrix()
public double[] getSkipDeletionMatrix()
public double[] getSkipInsertionMatrix()
public double getDistance()
getDistance
in interface AlignmentDerivativeAlgorithm
public Sequence getLeft()
getLeft
in interface AlignmentDerivativeAlgorithm
public Sequence getRight()
getRight
in interface AlignmentDerivativeAlgorithm
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
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/