Description Usage Arguments Value References Examples
View source: R/optimize_over_Pi.R
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.
1 2 3 4 5 6 7 8 9 | optimize_over_Pi(
logphi1,
logphi2,
row,
col,
max.iter = 1000,
stepsz = 0.001,
Pi.init = NULL
)
|
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) |
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. |
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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | # 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
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.