public class GMMDiag
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected float[][] |
covar |
protected float[] |
loglikes |
LogMath |
logMath |
protected float[][] |
means |
java.lang.String |
nom |
int |
nT |
protected float[] |
weights |
Modifier and Type | Method and Description |
---|---|
void |
computeLogLikes(float[] data) |
GMMDiag |
getGauss(int i)
extracts ONE gaussian from the GMM
|
float |
getLogLike()
Calculate log probability of the observation
must be called AFTER next() !
|
GMMDiag |
getMarginal(boolean[] mask) |
float |
getMean(int i,
int j) |
int |
getNcoefs() |
int |
getNgauss() |
float |
getVar(int i,
int j) |
float |
getWeight(int i) |
int |
getWinningGauss()
must be called AFTER next()
|
boolean |
isEqual(GMMDiag g)
2 GMMs are considered to be equal when all of their parameters do not
differ from more than 1%
|
void |
load(java.lang.String name)
Load from text proprietary format
|
void |
loadHTK(java.lang.String nom) |
void |
loadScaleKMeans(java.lang.String nom) |
GMMDiag |
merge(GMMDiag g,
float w1) |
void |
precomputeDistance() |
void |
save(java.lang.String name)
Saves in proprietary format
|
void |
saveHTK(java.lang.String nomFich,
java.lang.String nomHMM) |
void |
saveHTK(java.lang.String nomFich,
java.lang.String nomHMM,
java.lang.String parmKind) |
java.io.PrintWriter |
saveHTKheader(java.lang.String nomFich,
java.lang.String parmKind) |
void |
saveHTKState(java.io.PrintWriter fout) |
void |
saveHTKtailer(int nstates,
java.io.PrintWriter fout) |
void |
setMean(int i,
int j,
float v) |
void |
setNom(java.lang.String s) |
void |
setVar(int i,
int j,
float v) |
void |
setWeight(int i,
float w) |
java.lang.String |
toString() |
public int nT
public java.lang.String nom
public LogMath logMath
protected float[] weights
protected float[][] means
protected float[][] covar
protected float[] loglikes
public int getNgauss()
public float getWeight(int i)
public float getVar(int i, int j)
public void setWeight(int i, float w)
public void setVar(int i, int j, float v)
public void setMean(int i, int j, float v)
public float getMean(int i, int j)
public void save(java.lang.String name)
name
- name of file to savepublic void load(java.lang.String name)
name
- filename to load frompublic void saveHTK(java.lang.String nomFich, java.lang.String nomHMM)
public java.io.PrintWriter saveHTKheader(java.lang.String nomFich, java.lang.String parmKind)
public void saveHTKState(java.io.PrintWriter fout)
public void saveHTKtailer(int nstates, java.io.PrintWriter fout)
public void saveHTK(java.lang.String nomFich, java.lang.String nomHMM, java.lang.String parmKind)
public void loadHTK(java.lang.String nom)
public void loadScaleKMeans(java.lang.String nom)
public void precomputeDistance()
public void computeLogLikes(float[] data)
public float getLogLike()
public int getWinningGauss()
public int getNcoefs()
public GMMDiag getMarginal(boolean[] mask)
public GMMDiag merge(GMMDiag g, float w1)
g
- second GMM for the mergew1
- weight of the first GMM for the mergepublic GMMDiag getGauss(int i)
i
- positionpublic void setNom(java.lang.String s)
public boolean isEqual(GMMDiag g)
g
- second gmm to compare topublic java.lang.String toString()
toString
in class java.lang.Object