mstep_cond: Conditional maximisation step for Expectation-Maximisation...

Description Usage Arguments Value

View source: R/mstep.R

Description

Conditional maximisation step for Expectation-Maximisation algorithm. Maximising paramters for current batch of data conditional on the parameters from the previous batch.

Usage

1
2
3
mstep_cond(x_A, x_B, mean_A, sigma_AA, sigma_AB = NULL, mean_B = NULL,
  sigma_BB = NULL, pro = NULL, groups, z, likelihood = FALSE,
  method_sigma_AB = c("analytic", "numeric"), updateA = FALSE)

Arguments

x_A

A matrix of data for previous batch.

x_B

A matrix of data for the current batch.

mean_A

The mean vectors for the previous batch (considered fixed).

sigma_AA

The covariance matrices for the previous batch (considered fixed).

sigma_AB

Starting value for the covariance between batches A and B. If NULL, initialised at all zeros.

mean_B

Starting value for the mean vectors for the current batch.

sigma_BB

Starting value for the covariance matrix for the current batch.

pro

Starting value for mixing proportions.

groups

Optional, number of groups in the mixture, inferred from z if not supplied.

z

A matrix of cluster memberships/probabilities.

likelihood

Logical for calculating likelihood of these two batches.

method_sigma_AB

One of "analytic" (default) or "numeric", to choose the method of estimating the between-batch covariance for a cluster.

updateA

Logical for updating the parameters of batch A after estimating the parameters for batch B.

Value

A list of parameter estimates for the mixing proportions, mean vectors, and covariance matrices.


markajoc/MBCbigP documentation built on July 12, 2017, 12:23 a.m.