maxfuse.utils.svd_embedding
- maxfuse.utils.svd_embedding(arr, n_components=20, randomized=False, n_runs=1)[source]
Compute rank-n_components SVD embeddings of arr.
- Parameters:
arr (np.array of shape (n_samples, n_features)) – Data matrix
n_components (int, default=20) – Number of components to keep
randomized (bool, default=False) – Whether to use randomized SVD
n_runs (int, default=1) – Run multiple times and take the realization with the lowest Frobenious reconstruction error
- Returns:
embeddings (array_like of shape (n_samples, n_components)) – Rank-n_comopnents SVD embedding of arr.