Learn R Programming

SSLfmm (version 0.1.0)

unpack_theta: Unpack FMM Parameter Vector

Description

Unpacks mixture weights, means, and covariance(s) from a parameter vector.

Usage

unpack_theta(theta, g, p, ncov = 1)

Value

A list with:

pi

Mixture weights (length g).

mu

List of g mean vectors.

sigma

Shared covariance matrix (ncov=1) or list of g covariance matrices (ncov=2).

Arguments

theta

Numeric vector as returned by pack_theta().

g

Integer: number of components.

p

Integer: dimension.

ncov

Integer: covariance structure; 1 for shared covariance, 2 for class-specific.