maxfuse.model.Fusor.plot_singular_values

Fusor.plot_singular_values(target='shared_arr1', batch=None, n_components=None, randomized_svd=False, svd_runs=1)[source]

Plot the singular values of the target array for selection of SVD components.

Parameters:
  • target (string or np.array, default='shared_arr1') – The array to fit SVD on. If is a string, then must be one of {‘shared_arr1’, ‘shared_arr2’, ‘active_arr1’, ‘active_arr2’}; otherwise, must be an np.array.

  • batch (None or int, default=None) – If None, then randomly select on batch. If target array is an np.array, then this argument is disregarded.

  • n_components (None or int, default=None) – How many components to plot. If None, set it to be either one or min(100, min(target.shape)-1), whichever is larger.

  • randomized_svd (bool, default=False) – Whether to use randomized SVD.

  • svd_runs (int, default=1,) – How many randomized SVDs will be executed. In the end the one with the lowest Frobenious reconstruction error will be taken. If randomized=False, this argument is disregarded.

Returns:

fig, ax