Mixture

class mixture.Mixture(mixtureFileName='', mixtureFileFormat='pickle', name='empty')[source]

A class for Gaussian Mixture Model storage. For more details about Gaussian Mixture Models (GMM) you can refer to [Bimbot04].

Attr w:array of weight parameters
Attr mu:ndarray of mean parameters, each line is one distribution
Attr invcov:ndarray of inverse co-variance parameters, 2-dimensional for diagonal co-variance distribution 3-dimensional for full co-variance
Attr invchol:3-dimensional ndarray containing lower cholesky decomposition of the inverse co-variance matrices
Attr cst:array of constant computed for each distribution
Attr det:array of determinant for each distribution
EM_split(cep, distrib_nb, iterations=[1, 2, 2, 4, 4, 4, 4, 8, 8, 8, 8, 8, 8], numThread=1, llk_gain=0.01)[source]

Expectation-Maximization estimation of the Mixture parameters.

Parameters:
  • cep – set of feature frames to consider
  • distrib_nb – final number of distributions to reach
  • iterations – a list of number of iterations to perform before spliting the distributions.
  • numThread – number of thread to launch for parallel computing
Return llk:

a list of log-likelihoods obtained after each iteration

EM_uniform(cep, distribNb, iteration_min=3, iteration_max=10, llk_gain=0.01, do_init=True)[source]

Expectation-Maximization estimation of the Mixture parameters.

Parameters:
  • cep – set of feature frames to consider
  • distribNb – number of distributions
  • iteration – number of iterations to perform.
  • numThread – number of thread to launch for parallel computing
Return llk:

a list of log-likelihoods obtained after each iteration

compute_log_posterior_probabilities(cep, mu=None)[source]

Compute log posterior probabilities for a set of feature frames.

Parameters:
  • cep – a set of feature frames in a ndarray, one feature per row
  • mu – a mean super-vector to replace the ubm’s one. If it is an empty vector, use the UBM
Returns:

A ndarray of log-posterior probabilities corresponding to the input feature set.

dim()[source]

Return the dimension of distributions of the Mixture

Returns:an integer, size of the acoustic vectors
distrib_nb()[source]

Return the number of distribution of the Mixture

Returns:the number of distribution in the Mixture
get_invcov_super_vector()[source]

Return Inverse covariance super-vector

Returns:an array, super-vector of the inverse co-variance coefficients
get_mean_super_vector()[source]

Return mean super-vector

Returns:an array, super-vector of the mean coefficients
read_alize(mixtureFileName)[source]

Read a Mixture in alize raw format

Parameters:mixtureFileName – name of the file to read from
read_htk(mixtureFileName, beginHmm=False, state2=False)[source]

Read a Mixture in HTK format

Parameters:
  • mixtureFileName – name of the file to read from
  • beginHmm – boolean
  • state2 – boolean
read_pickle(input_filename)[source]

Read IdMap in PICKLE format.

Parameters:inputFileName – name of the file to read from
save_alize(mixtureFileName)[source]

Save a mixture in alize raw format

Parameters:mixtureFileName – name of the file to write in
save_htk(mixtureFileName)[source]

Save a Mixture in HTK format

Parameters:mixtureFileName – the name of the file to write in
save_pickle(outputFileName)[source]

Save Ndx in PICKLE format. Convert all data into float32 before saving, note that the conversion doesn’t apply in Python 2.X

Parameters:outputFilename – name of the file to write to
sv_size()[source]

Return the dimension of the super-vector

Returns:an integer, size of the mean super-vector
validate()[source]

Verify the format of the Mixture

Returns:a boolean giving the status of the Mixture
varianceControl(cov, flooring, ceiling, cov_ctl)[source]

varianceControl for Mixture (florring and ceiling)

Parameters:
  • flooring – float, florring value
  • ceiling – float, ceiling value
  • covSignal – co-variance to consider for flooring and ceiling

Previous topic

FeaturesServer

Next topic

StatServer

This Page