WDFEMGMM

object WDFEMGMM

Weighted-data Gaussian mixture model (WDF-GMM) with Fixed weight implementation. https://team.inria.fr/perception/research/wdgmm/ Gebru, I. D., Alameda-Pineda, X., Forbes, F., & Horaud, R. (2016). EM Algorithms for Weighted-Data Clustering with Application to Audio-Visual Scene Analysis. IEEE Transactions on Pattern Analysis and Machine Intelligence, 38(12), 2402–2415. doi:10.1109/tpami.2016.2522425

class Object
trait Matchable
class Any

Type members

Classlikes

object Clustering

Value members

Concrete methods

def compute_log_likelihood(x: DenseMatrix[Double], dataWeights: DenseVector[Double], means: DenseMatrix[Double], covariances: Array[DenseMatrix[Double]], weights: DenseVector[Double]): Try[DenseMatrix[Double]]

Compute the log likelihood (used for e step).

Compute the log likelihood (used for e step).

Value Params
covariances

covariances of the components (clusters)

means

means of the components (clusters)

weights

weights of the components (clusters)

x

data points

def cov(x: DenseMatrix[Double]): DenseMatrix[Double]

Estimate a covariance matrix, given data.

Estimate a covariance matrix, given data.

Value Params
x

data points

def cov(x: DenseMatrix[Double], mean: DenseVector[Double]): DenseMatrix[Double]

Estimate a covariance matrix, given data.

Estimate a covariance matrix, given data.

Value Params
x

data points

def dilate(gmm: GMM, f: Double): GMM
def dot(A: Array[Array[Double]], B: Array[Array[Double]]): Array[Array[Double]]

2d matrix dot product.

2d matrix dot product.

Value Params
A

matrix A

B

matrix B

def eStep(x: Array[Array[Double]], dataWeights: Array[Double], means: Array[Array[Double]], covariances: Array[Array[Array[Double]]], weights: Array[Double]): Try[(Double, Array[Array[Double]])]

E-step: compute responsibilities, update resp matrix so that resp[j, k] is the responsibility of cluster k for data point j, to compute likelihood of seeing data point j given cluster k.

E-step: compute responsibilities, update resp matrix so that resp[j, k] is the responsibility of cluster k for data point j, to compute likelihood of seeing data point j given cluster k.

Value Params
covariances

covariances of the components (clusters)

means

means of the components (clusters)

weights

weights of the components (clusters)

x

data points

@tailrec
def fit(x: Array[Array[Double]], dataWeights: Array[Double], gmm: GMM, iterations: Int, tolerance: Double, logLikelihood: Double, trace: Seq[Double]): Try[(GMM, Seq[Double])]
def initializeAndFit(iterations: Int, tolerance: Double, x: Array[Array[Double]], dataWeights: Option[Array[Double]], minClusterSize: Int, random: Random): Try[(GMM, Seq[Double])]

Full covariance Gaussian Mixture Model, trained using Expectation Maximization.

Full covariance Gaussian Mixture Model, trained using Expectation Maximization.

Value Params
x

data points

def mStep(x: Array[Array[Double]], dataWeights: Array[Double], resp: Array[Array[Double]], components: Int): GMM

M-step, update parameters.

M-step, update parameters.

Value Params
X

data points

def toDenseMatrix(rows: Int, cols: Int, array: Array[Array[Double]]): DenseMatrix[Double]
def toDistribution(gmm: GMM, random: Random): MixtureMultivariateNormalDistribution