Description Usage Arguments Value Examples
View source: R/biADMM.compositional.speed.R
Same algorithm as biC.ADMM
. Call python code to speed up the running time.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | biC.ADMM.speed(
X,
nu1,
nu2,
nu3,
gamma_1,
gamma_2,
m,
phi,
prox = "l2",
niters = 10,
tol = 0.1,
weight.scale = 1,
output = 1
)
|
X |
The data matrix to be clustered. The rows are the samples, and the columns are the features. |
nu1 |
A regularization parameter for row shrinkage |
nu2 |
A regularization parameter for column shrinkage |
nu3 |
A regularization parameter for compositional data constrain |
gamma_1 |
A regularization parameter for row shrinkage |
gamma_2 |
A regularization parameter for column shrinkage |
m |
m-nearest-neighbors in the weight function |
phi |
The parameter phi in the weight function |
prox |
The proximal maps. Could calculate L1 norm, L2 norm, or L-infinity, use "l1", "l2", or "l-inf", respectively. |
niters |
Iteraion times |
tol |
Stopping criterion |
weight.scale |
If weight.scale = 1, the code will make the input data have compositional structure. |
output |
When output = 1, print the results at each iteration. No print when output equals other value. |
A list of results, containing matrix of A, v, z, lambda1, lambda2, and lambda3
1 2 3 4 5 6 7 8 9 10 11 | # generate dataset
set.seed(123)
X = data_gen(n = 100, p = 80)
# set parameters
nu1 = nu2 = nu3 = gamma_1 = gamma_2 = 0.1
m = 5
phi = 0.5
# biADMM algorithm
res4 = biC.ADMM.speed(X, nu1, nu2, nu3, gamma_1, gamma_2,
m, phi, niter = 10, tol = 0.0001, weight.scale = 1, output = 0)
dim(res4$A)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.