Perform factorization for new data
Uses an efficient strategy for updating that takes advantage of the information in the existing factorization. Assumes that selected genes (var.genes) are represented in the new datasets.
optimizeNewData( object, new.data, which.datasets, add.to.existing = TRUE, lambda = NULL, thresh = 1e-04, max.iters = 100, verbose = TRUE )
object |
|
new.data |
List of raw data matrices (one or more). Each list entry should be named. |
which.datasets |
List of datasets to append new.data to if add.to.existing is true. Otherwise, the most similar existing datasets for each entry in new.data. |
add.to.existing |
Add the new data to existing datasets or treat as totally new datasets (calculate new Vs?) (default TRUE) |
lambda |
Regularization parameter. By default, this will use the lambda last used with optimizeALS. |
thresh |
Convergence threshold. Convergence occurs when |obj0-obj|/(mean(obj0,obj)) < thresh (default 1e-4). |
max.iters |
Maximum number of block coordinate descent iterations to perform (default 100). |
verbose |
Print progress bar/messages (TRUE by default) |
liger
object with H, W, and V slots reset. Raw.data, norm.data, and scale.data will
also be updated to include the new data.
## Not run: # Given preprocessed liger object: ligerex (contains two datasets Y and Z) # get factorization using three restarts and 20 factors ligerex <- optimizeALS(ligerex, k = 20, lambda = 5, nrep = 3) # acquire new data (Y_new, Z_new) from the same cell type, let's add it to existing datasets new_data <- list(Y_set = Y_new, Z_set = Z_new) ligerex2 <- optimizeNewData(ligerex, new.data = new_data, which.datasets = list('y_set', 'z_set')) # acquire new data from different cell type (X), we'll just add another dataset # it's probably most similar to y_set ligerex <- optimizeNewData(ligerex, new.data = list(x_set = X), which.datasets = list('y_set'), add.to.existing = FALSE) ## End(Not run)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.