Bootstrap | R Documentation |
Bootstrapping of Distance Matrix
Bootstrap( data, dist_mat_null, k = 10, kernel = c("gaussian", "euclidean"), normalization = c("cosine", "lognorm", "none"), normalize_factor = 10000, pca_dims = 0, norm_type = c("l1", "l2"), n_iters = 100, ratio = 0.05, t = 0, calc_perturb_mat = FALSE, n_cores = NULL, zero_percent = 0.7, ... )
data |
An M x d matrix or data.frame with M rows of data points and d columns of features. |
dist_mat_null |
An M x M distance matrix calculated from the original data (null). |
k |
Number of nearest neighbors. Default is 10. See details from |
kernel |
Kernel distance used:
|
normalization |
Normalization method used: #'
|
normalize_factor |
Normalize factor used in log normalization. Default is 10000. See details |
pca_dims |
Number of dimensions used. Default is 0 and PCA is not performed. |
norm_type |
Type of norm used:
|
n_iters |
Number of bootstrapping iterations. Default is 100. |
ratio |
Fraction of features to be downsampled in the original data matrix. Default is 0.05 aka 5%. |
t |
Matrix power used for the distance matrix. Default is 0 and powering is not performed. See |
calc_perturb_mat |
Whether to calculate the perturb matrix. Default is FALSE. |
n_cores |
Number of cores used. Default is to use all existing cores. See details |
zero_percent |
Zero-entry percentage threshold. If the number of zeros in the returned matrices is above this number, a sparse matrix will be returned. Default is 0.7 aka 70%. |
... |
Additional parameters pass to |
Returns a list with entries:
feature_weight, n x d binary matrix with n rows of bootstrap iterations and d columns of features where 0 means feature not sampled and 1 means sampled.
sample_weight, n x M matrix with n rows of bootstrap iterations and M columns of data points where each entry represents weight.
perturb_mat, d x M matrix with d rows of features and M columns of data points where each entry represents the relative importance of a feature to a data point.
dist_mat, M x M distance matrix.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.