public class GaussianMixture extends ScoreCachingSenone
senone
. A simple senone is a set of probability
density functions implemented as a Gaussian mixture.
All scores and weights are maintained in LogMath log base.
Modifier and Type | Field and Description |
---|---|
protected int |
id |
protected LogMath |
logMath |
protected GaussianWeights |
mixtureWeights |
Constructor and Description |
---|
GaussianMixture(GaussianWeights mixtureWeights,
MixtureComponent[] mixtureComponents,
int id)
Creates a new senone from the given components.
|
Modifier and Type | Method and Description |
---|---|
float[] |
calculateComponentScore(Data feature)
Calculates the scores for each component in the senone.
|
float |
calculateScore(Data feature)
Calculates the score for this senone based upon the given feature.
|
int |
dimension() |
void |
dump(java.lang.String msg)
Dumps this senone.
|
boolean |
equals(java.lang.Object o)
Determines if two objects are equal
|
float[] |
getComponentWeights() |
long |
getID()
Gets the ID for this senone
|
float |
getLogComponentWeight(int index) |
float[] |
getLogMixtureWeights() |
MixtureComponent[] |
getMixtureComponents()
Returns the mixture components associated with this Gaussian
|
int |
hashCode()
Returns the hashcode for this object
|
int |
numComponents() |
java.lang.String |
toString()
Retrieves a string form of this object
|
getScore
protected GaussianWeights mixtureWeights
protected int id
protected LogMath logMath
public GaussianMixture(GaussianWeights mixtureWeights, MixtureComponent[] mixtureComponents, int id)
mixtureWeights
- the mixture weights for this senone in LogMath log basemixtureComponents
- the mixture components for this senoneid
- id of the mixturepublic void dump(java.lang.String msg)
msg
- annotation messagepublic boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- the object to compare to this.public int hashCode()
hashCode
in class java.lang.Object
public long getID()
Senone
public java.lang.String toString()
toString
in class java.lang.Object
public float calculateScore(Data feature)
ScoreCachingSenone
calculateScore
in class ScoreCachingSenone
feature
- the feature vector to score this senone againstpublic float[] calculateComponentScore(Data feature)
feature
- the feature to scorepublic MixtureComponent[] getMixtureComponents()
Senone
public int dimension()
public int numComponents()
GaussianMixture
.public float[] getLogMixtureWeights()
public float[] getComponentWeights()
public float getLogComponentWeight(int index)
index
- of the componentindex