gmm

package
v0.0.0-...-6d3268d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 31, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GMM

type GMM struct {
	Frames      int         // number of total frames
	FeatureData [][]float32 // feature buffer

	VectorSize int // Vector size											1
	Mixtures   int // Mixtures of the GMM	 								1

	MixtureWeight []float64   // weight of each mixture[mixture]						1
	Mean          [][]float64 // mean vector [mixture,dimension]						1
	Covar         [][]float64 // covariance (diagonal) [mixture,dimension]			1
	// contains filtered or unexported fields
}

func NewGMM

func NewGMM() *GMM

func (*GMM) Copy

func (g *GMM) Copy(gmm *GMM)

func (*GMM) CopyFeatureData

func (g *GMM) CopyFeatureData(gmm *GMM) error

func (*GMM) DupModel

func (g *GMM) DupModel(gmm *GMM)

func (*GMM) EM

func (g *GMM) EM(mixtures int) (int, error)

func (*GMM) LMixProb

func (g *GMM) LMixProb(buffer []float32, mixIndex int) float64

Return the log likelihood of the given vector to the given mixture (the score should be multiplied with the mixture weight). FeatureData : pointer to the feature vector in float MixIndex : Mixture index Return Value: The log-likelihood in float64

func (*GMM) LProb

func (g *GMM) LProb(featureBuf [][]float32, start, length int64) float64

func (*GMM) LoadModel

func (g *GMM) LoadModel(filename string) error

func (*GMM) LogAdd

func (g *GMM) LogAdd(lvar1 float64, lvar2 float64) float64

Routine for adding two log-values in a linear scale, return the log result in double

func (*GMM) SaveModel

func (g *GMM) SaveModel(filename string) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL