A class for statistic storage and processing
Attr modelset: | list of model IDs for each session as an array of strings |
---|---|
Attr segset: | the list of session IDs as an array of strings |
Attr start: | index of the first frame of the segment |
Attr stop: | index of the last frame of the segment |
Attr stat0: | a ndarray of float64. Each line contains 0-order statistics from the corresponding session |
Attr stat1: | a ndarray of float64. Each line contains 1-order statistics from the corresponding session |
Parameters: |
|
---|
Parameters: |
|
---|
Parameters: |
|
---|---|
Returns: | a StatServer with 1 as stat0 and the MAP adapted super-vectors as stat1 |
Parameters: |
|
---|---|
Returns: | a StatServer with 1 as stat0 and the MAP adapted super-vectors as stat1 |
Parameters: | modelList – ndarray of strings, list of models to match |
---|
Parameters: | segmentList – ndarray of strings, list of segments to match |
---|
Estimate the factor loading matrix for the between class covariance
Parameters: |
|
---|---|
Returns: | the within class factor loading matrix |
Assume that the statistics have been whitened and the matrix U and V have been multiplied by the squarre root of the inverse of the covariance
Parameters: |
|
---|---|
Returns: | the MAP covariance matrix into a vector as it is diagonal |
in [Bousquet11]
Can be used to perform Eigen Factor Radial or Spherical Nuisance Normalization. Default behavior is equivalent to Length Norm as described in [Garcia-Romero11]
Statistics are transformed while the meta-parameters are estimated.
Parameters: |
|
---|---|
Returns: | a tupple of two lists: - a list of mean vectors - a list of co-variance matrices as ndarrays |
Estimate the factor loading matrix for the within class covariance
Parameters: |
|
---|---|
Returns: | the within class factor loading matrix |
Parameters: |
|
---|---|
Returns: | three matrices, the between class factor loading matrix, the within class factor loading matrix the diagonal MAP matrix (as a vector) and the residual covariance matrix |
Returns: | the between-class co-variance matrix of the first-order statistics as a ndarray. |
---|
Parameters: | rank – integer, rank of the LDA matrix to return |
---|---|
Returns: | the LDA matrix of rank “rank” as a ndarray |
Compute and return Mahalanobis matrix of first-order statistics.
Returns: | the mahalanobis matrix computed on the first-order statistics as a ndarray |
---|
Return the mean of first order statistics
return: the mean array of the first order statistics.
Return the list of segments belonging to model modID
Parameters: | modID – string, ID of the model which belonging segments will be returned |
---|---|
Returns: | a list of segments belonging to the model |
Return the list of segments belonging to model number modIDX
Parameters: | modIDX – index of the model which list of segments will be returned |
---|---|
Returns: | a list of segments belonging to the model |
Return zero-order statistics of a given model
Parameters: | modID – ID of the model which stat0 will be returned |
---|---|
Returns: | a matrix of zero-order statistics as a ndarray |
Return zero-order statistics of model number modIDX
Parameters: | modIdx – integer, index of the unique model which stat0 will be returned |
---|---|
Returns: | a matrix of zero-order statistics as a ndarray |
Return first-order statistics of a given model
Parameters: | modID – string, ID of the model which stat1 will be returned |
---|---|
Returns: | a matrix of first-order statistics as a ndarray |
Return first-order statistics of model number modIDX
Parameters: | modIdx – integer, index of the unique model which stat1 will be returned |
---|---|
Returns: | a matrix of first-order statistics as a ndarray |
Parameters: | coRank – co-rank of the Nuisance Attribute Projection matrix |
---|---|
Returns: | the NAP matrix of rank “coRank” |
Return zero-order statistics of segment which ID is segID
Parameters: | segID – string, ID of the segment which stat0 will be returned |
---|---|
Returns: | a matrix of zero-order statistics as a ndarray |
Return zero-order statistics of segment number segIDX
Parameters: | segIDX – integer, index of the unique segment which stat0 will be returned |
---|---|
Returns: | a matrix of zero-order statistics as a ndarray |
Return first-order statistics of segment which ID is segID
Parameters: | segID – string, ID of the segment which stat1 will be returned |
---|---|
Returns: | a matrix of first-order statistics as a ndarray |
Return first-order statistics of segment number segIDX
Parameters: | segIDX – integer, index of the unique segment which stat1 will be returned |
---|---|
Returns: | a matrix of first-order statistics as a ndarray |
Returns: | the total co-variance matrix of the first-order statistics as a ndarray. |
---|
Returns: | the lower Choleski decomposition of the WCCN matrix as a ndarray |
---|
Returns: | the within-class co-variance matrix of the first-order statistics as a ndarray. |
---|
Parameters: |
|
---|---|
Returns: | a StatServer which zero-order statistics are 1 and first-order statistics are approximated i-vectors. |
For more information, refers to:
Glembeck, O.; Burget, L.; Matejka, P.; Karafiat, M. & Kenny, P. “Simplification and optimization of I-Vector extraction,” in IEEE International Conference on Acoustics, Speech, and Signal Processing, ICASSP, 2011, 4516-4519
Parameters: |
|
---|---|
Returns: | a StatServer which zero-order statistics are 1 and first-order statistics are approximated i-vectors. |
Parameters: | statserverFileName – name of the file to read from |
---|
Average the zero- and first-order statistics per model and store them in a new StatServer.
Returns: | a StatServer with the statistics summed per model |
---|
Returns: | the impostor part of the SVM Graam matrix as a ndarray |
---|
Read StatServer in PICKLE format.
Parameters: | inputFileName – name of the file to read from |
---|
Rotate first-order statistics by a right-product.
Parameters: | R – ndarray, matrix to use for right product on the first order statistics. |
---|
Save StatServer in PICKLE format. In Python > 3.3, statistics are converted into float32 to save space
Parameters: | outputFilename – name of the file to write to |
---|
See more details in [Bousquet11]
The number of iterations performed is equal to the length of the input lists.
Parameters: |
|
---|
Subtract the stat1 from from the sts StatServer to the stat1 of the current StatServer after multiplying by the zero-order statistics from the current statserver
Parameters: | sts – a StatServer |
---|---|
Returns: | a new StatServer |
Sum the zero- and first-order statistics per model and store them in a new StatServer.
Returns: | a StatServer with the statistics summed per model |
---|
Validate the structure and content of the StatServer. Check consistency between the different attributes of the StatServer: - dimension of the modelset - dimension of the segset - length of the modelset and segset - consistency of stat0 and stat1
Parameters: | warn – bollean optional, if True, display possible warning |
---|