# inferLambda: Infer lambda In Caleb-Huo/MIS-Kmeans:

MISKmenas

## Usage

 `1` ```inferLambda(resMISKmeans, balance = 1/2) ```

## Arguments

 `resMISKmeans` The result returned from MISKmeans. `balance` selecting lambda such that the separation ability = balance * matching ability

## Details

Estimate a propriate tuning parameter lambda

lambda values

Caleb

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29``` ```S <- 2 K <- 3 G <- 1000 g1 <- 50 g2 <- 50 n0 <- 20 n <- K*n0 labels <- cut(1:n,breaks=K,labels=FALSE) set.seed(32611) S1 <- matrix(rnorm(G*n), nrow=G, ncol=n) S2 <- matrix(rnorm(G*n), nrow=G, ncol=n) S1[1:g1, labels==1] <- S1[1:g1, labels==1] + 2 S1[1:g1, labels==3] <- S1[1:g1, labels==3] - 2 S1[g1 + 1:g2, labels==1] <- S1[g1 + 1:g2, labels==1] - 2 S1[g1 + 1:g2, labels==2] <- S1[g1 + 1:g2, labels==2] + 2 S2[1:g1, labels==2] <- S2[1:g1, labels==2] + 2 S2[1:g1, labels==1] <- S2[1:g1, labels==1] - 2 S2[g1 + 1:g2, labels==2] <- S2[g1 + 1:g2, labels==2] - 2 S2[g1 + 1:g2, labels==3] <- S2[g1 + 1:g2, labels==3] + 2 S = list(t(S1),t(S2)) groups <- Map('c',1:g1,g1 + 1:g2) res <- MISKmeans(d = S, K = 3, gamma = 0.4, group = groups) inferLambda(res) ```

Caleb-Huo/MIS-Kmeans documentation built on May 17, 2019, 2:45 p.m.