maxfuse.model.Fusor.get_embedding
- Fusor.get_embedding(active_arr1, active_arr2, refit=False, matching=None, order=None, cca_components=None, cca_max_iter=None)[source]
Get CCA embedding.
- Parameters:
active_arr1 (np.ndarray of shape (n_samples_1, n_features_1)) – The first data matrix.
active_arr2 (np.ndarray of shape (n_samples_2, n_features_2)) – The second data matrix.
refit (bool, default=False) – Whether to refit CCA.
matching (None or list of length three, default=None) – Must be provided when refit=True, rows, cols, vals = matching, each matched pair of rows[i], cols[i], their score (the larger, the better) is vals[i].
order (None or (1, 2) or (2, 1), default=None) – If None, then directly use matching to align the data and fit CCA; if (1, 2), then for every cell in arr1, average the corresponding matches in arr2; if (2, 1), do the other way around.
cca_components (None or int, default=None) – Number of CCA components, if None, use self._cca_components.
cca_max_iter (None or int, default=None) – Maximum number of CCA iteration, if None, use self._cca_max_iter.
- Returns:
arr1, arr2 (np.arrays representing the CCA embedding)