View source: R/ComputationCSSCA.R
ComputationCSSCA | R Documentation |
Calculate the CSSCA results (especially the loss functions) in all possible conditions. Note that because of the large scale of the output, it is recommend to retain sufficient internal storage space for the current function. #' To guaratee the model selection algorithm (Convex Hull method) works properly, it is require to have at least 4 elements in the selection range
ComputationCSSCA(all_data, ncluster_range, psparse_range, n_block, n_com, n_distinct, n_var, computation = "easy")
all_data |
A matrix with concatenated data (the aggregation of the data blocks by rows (entries)). The CSSCA method will be performed on the data. |
ncluster_range |
a vector indicates the range of number of clusters that could be selected from. All elements in the vector should be positive integers. Repeatation of the elements is not allowed in the vector. |
psparse_range |
a vector indicates the range of the sparsiy level that could be selected from. All elements in the vector should be within the range of [0,1]. Repeatation of the elements is not allowed in the vector. |
n_com |
A positive integer indicates the number of common components |
n_distinct |
A vector of length nblock, with the |
n_var |
A vector of length nblock, with the |
computation |
The sign to determine the level of complexity the computation should bear (choose from "easy", "medium", "difficult"). The computation burden is an efficiency - accuracy tradeoff, meaning that higher computational complexity would lead to longer computational time yet less accurate results. For a non multi-core system, it is always recommended to have an "easy" mode of computation |
n_blcok |
A positive integer indicates the number of blocks (i.e. the number of data sources) |
A loss table includes the total computed loss in each of the possible combination of the parameters; additionally, full results of the estimation will also be saved in the local directory in an individual basis (since the inidividual computation is already consuming)
the setting for simulation and calculation n_cluster <- 3 mem_cluster <- c(50,50,50) # 50 entries in each cluster n_obs <- sum(mem_cluster) n_block <- 2 n_com <- 2 n_distinct <- c(1,1) #1 distinctive components in each block n_var <- c(15,9) p_sparse <- 0.5 p_noise <- 0.3 p_combase <- 0.5 # moderate similarity p_fixzero <- 0.5 # moderate similarity mean_v <- 0.1 # co-variance structrue dominates # the custimerized range for paramter selection cluster_range <- 1:4 sparse_range <- c(0, 0.1, 0.3, 0.5) simulate the data with the function CSSCASimulation (not run) CSSCASimulation(n_cluster, mem_cluster, n_block, n_com, n_distinct, n_var, p_sparse, p_noise, p_combase, p_fixzero, "both", mean_v) calculate the results of CSSCA in various conditions and save the results in the current working directory. Note that the function may take up very long time to finish (not run) ComputationCSSCA(sim$concatnated_data, cluster_range, sparse_range, n_block, n_com, n_distinct, n_var, computation = "easy")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.