|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.cmu.sphinx.linguist.acoustic.tiedstate.MixtureComponent
public class MixtureComponent
Defines the set of shared elements for a GaussianMixture. Since these elements are potentially
shared by a number of GaussianMixtures
, these elements should not be
written to. The GaussianMixture defines a single probability density function along with a set of
adaptation parameters.
Field Summary | |
---|---|
static float |
DEFAULT_DIST_FLOOR
|
static float |
DEFAULT_VAR_FLOOR
|
Constructor Summary | |
---|---|
MixtureComponent(LogMath logMath,
float[] mean,
float[] variance)
Create a MixtureComponent with the given sub components. |
|
MixtureComponent(LogMath logMath,
float[] mean,
float[][] meanTransformationMatrix,
float[] meanTransformationVector,
float[] variance,
float[][] varianceTransformationMatrix,
float[] varianceTransformationVector)
Create a MixtureComponent with the given sub components. |
|
MixtureComponent(LogMath logMath,
float[] mean,
float[][] meanTransformationMatrix,
float[] meanTransformationVector,
float[] variance,
float[][] varianceTransformationMatrix,
float[] varianceTransformationVector,
float distFloor,
float varianceFloor)
Create a MixtureComponent with the given sub components. |
Method Summary | |
---|---|
java.lang.Object |
clone()
|
float[] |
getMean()
Returns the mean for this component. |
float |
getScore(float[] feature)
Calculate the score for this mixture against the given feature. |
float |
getScore(FloatData feature)
Calculate the score for this mixture against the given feature. |
float[] |
getVariance()
Returns the variance for this component. |
float |
precomputeDistance()
Pre-compute factors for the Mahalanobis distance. |
java.lang.String |
toString()
|
void |
transformStats()
Applies transformations to means and variances. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final float DEFAULT_VAR_FLOOR
public static final float DEFAULT_DIST_FLOOR
Constructor Detail |
---|
public MixtureComponent(LogMath logMath, float[] mean, float[] variance)
logMath
- the log math to usemean
- the mean vector for this PDFvariance
- the variance for this PDFpublic MixtureComponent(LogMath logMath, float[] mean, float[][] meanTransformationMatrix, float[] meanTransformationVector, float[] variance, float[][] varianceTransformationMatrix, float[] varianceTransformationVector)
logMath
- the log math to usemean
- the mean vector for this PDFmeanTransformationMatrix
- transformation matrix for this pdfmeanTransformationVector
- transform vector for this PDFvariance
- the variance for this PDFvarianceTransformationMatrix
- var. transform matrix for this PDFvarianceTransformationVector
- var. transform vector for this PDFpublic MixtureComponent(LogMath logMath, float[] mean, float[][] meanTransformationMatrix, float[] meanTransformationVector, float[] variance, float[][] varianceTransformationMatrix, float[] varianceTransformationVector, float distFloor, float varianceFloor)
logMath
- the log math to usemean
- the mean vector for this PDFmeanTransformationMatrix
- transformation matrix for this pdfmeanTransformationVector
- transform vector for this PDFvariance
- the variance for this PDFvarianceTransformationMatrix
- var. transform matrix for this PDFvarianceTransformationVector
- var. transform vector for this PDFdistFloor
- the lowest score value (in linear domain)varianceFloor
- the lowest value for the varianceMethod Detail |
---|
public float[] getMean()
public float[] getVariance()
public float getScore(FloatData feature)
DoubleData
-features would require an array conversion to
float[]. Because getScore might be invoked with very high frequency, features are restricted
to be FloatData
s.
feature
- the feature to score
public float getScore(float[] feature)
Normal(x) = exp{-0.5 * (x-m)' * inv(Var) * (x-m)} / {sqrt((2 * PI) ^ N) * det(Var))}
where x and m are the incoming cepstra and mean vector respectivally, Var is the Covariance matrix, det() is the determinant of a matrix, inv() is its inverse, exp is the exponential operator, x' is the transposed vector of x and N is the dimension of the vectors x and m.
feature
- the feature to score
public float precomputeDistance()
{sqrt((2 * PI) ^ N) * det(Var))}
public void transformStats()
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |