Learn R Programming

multiviewtest (version 2.0.1)

optimize_over_Pi: Exponentiated gradient descent for estimating Pi

Description

Implements the optimization algorithm for solving equation (2.8) in Section 2.3.2 of Gao et al. (2019) "Are Clusterings of Multiple Data Views Independent?" Derivation of the algorithm is given in Appendix B.

Usage

optimize_over_Pi(
  logphi1,
  logphi2,
  row,
  col,
  max.iter = 1000,
  stepsz = 0.001,
  Pi.init = NULL
)

Arguments

logphi1

log(phi1), where the n x K1 matrix phi1 is defined in equation (2.9)

logphi2

log(phi1), where the n x K2 matrix phi2 is defined in equation (2.9)

row

K1-vector containing the estimated View 1 mixture component probabilities

col

K2-vector containing the estimated View 2 mixture component probabilities

max.iter

Maximum number of iterations to be run.

stepsz

Fixed step size to be used in the optimization; see Appendix B for details.

Pi.init

Initializes the optimization algorithm with Pi.init. (Optional)

Value

List of:

Pi.est

Estimate of Pi; maximizes the log-likelihood function of X1 and X2.

obj

The log-likelihood function evaluated at Pi.est.

References

Gao, L.L., Bien, J., Witten, D. (2019) Are Clusterings of Multiple Data Views Independent? to appear in Biostatistics, <DOI:10.1093/biostatistics/kxz001>

Gao, L.L., Witten, D., Bien, J. Testing for Association in Multi-View Network Data, preprint.

Examples

Run this code
# NOT RUN {
# Generate two-view Gaussian mixture model data with Pi = I/3
set.seed(1)
n <- 100
K <- 3
p <- 2
Sigma <- diag(rep(0.5^2, p))
Pi <- diag(rep(1, K))/K
mu1 <- cbind(c(2, 0), c(0, 2),  c(2, -2))
mu2 <- cbind(c(-2, 0), c(0, -2), c(-2, 2))
dat <- mv_gmm_gen(n, Pi, mu1, mu2, Sigma, Sigma)
view1dat <- dat$data$view1
view2dat <- dat$data$view2
library(mclust)
EM.View1 <- Mclust(view1dat, G=K, modelNames=c("EII"))
EM.View2 <- Mclust(view2dat, G=K, modelNames=c("EII"))
logphi1 <-  cdens(modelName="EII", data=view1dat, logarithm=TRUE, parameters=EM.View1$parameters)
logphi2 <-  cdens(modelName="EII", data=view2dat, logarithm=TRUE, parameters=EM.View2$parameters)
pi1.est <- EM.View1$parameters$pro
pi2.est <- EM.View2$parameters$pro
Pi.est <- optimize_over_Pi(logphi1, logphi2, pi1.est, pi2.est)
Pi.est$Pi

# }

Run the code above in your browser using DataLab