initialize {mtlgmm}R Documentation

Initialize the estimators of GMM parameters on each task.

Description

Initialize the estimators of GMM parameters on each task.

Usage

initialize(x, method = c("kmeans", "EM"))

Arguments

x

design matrices from multiple data sets. Should be a list, of which each component is a matrix or data.frame object, representing the design matrix from each task.

method

initialization method. This indicates the method to initialize the estimates of GMM parameters for each data set. Can be either "EM" or "kmeans". Default: "EM".

  • EM: the initial estimates of GMM parameters will be generated from the single-task EM algorithm. Will call Mclust function in mclust package.

  • kmeans: the initial estimates of GMM parameters will be generated from the single-task k-means algorithm. Will call kmeans function in stats package.

Value

A list with the following components.

w

the estimate of mixture proportion in GMMs for each task. Will be a vector.

mu1

the estimate of Gaussian mean in the first cluster of GMMs for each task. Will be a matrix, where each column represents the estimate for a task.

mu2

the estimate of Gaussian mean in the second cluster of GMMs for each task. Will be a matrix, where each column represents the estimate for a task.

beta

the estimate of the discriminant coefficient for each task. Will be a matrix, where each column represents the estimate for a task.

Sigma

the estimate of the common covariance matrix for each task. Will be a list, where each component represents the estimate for a task.

See Also

mtlgmm, tlgmm, predict_gmm, data_generation, alignment, alignment_swap, estimation_error, misclustering_error.

Examples

set.seed(0, kind = "L'Ecuyer-CMRG")
## Consider a 5-task multi-task learning problem in the setting "MTL-1"
data_list <- data_generation(K = 5, outlier_K = 1, simulation_no = "MTL-1", h_w = 0.1,
h_mu = 1, n = 50)  # generate the data
fit <- mtlgmm(x = data_list$data$x, C1_w = 0.05, C1_mu = 0.2, C1_beta = 0.2,
C2_w = 0.05, C2_mu = 0.2, C2_beta = 0.2, kappa = 1/3, initial_method = "EM",
trim = 0.1, lambda_choice = "fixed", step_size = "lipschitz")

## Initialize the estimators of GMM parameters on each task.
fitted_values_EM <- initialize(data_list$data$x,
"EM")  # initilize the estimates by single-task EM algorithm
fitted_values_kmeans <- initialize(data_list$data$x,
"EM")  # initilize the estimates by single-task k-means

[Package mtlgmm version 0.1.0 Index]