darfix.decomposition.pca.PCA#

class darfix.decomposition.pca.PCA(data, num_components=None, center=True, whiten=False, rowvar=True)[source]#

Bases: Base

property data#
fit_transform(max_iter=1, error_step=None)[source]#

Fit to data, then transform it

Parameters:
  • max_iter (int, optional) – Maximum number of iterations, defaults to 100

  • error_step (Union[None,int], optional) – If None, error is not computed, defaults to None Else compute error for every error_step iterations.

  • compute_w (bool, optional) – When False, W is not computed, defaults to True

  • compute_h (bool, optional) – When False, H is not computed, defaults to True

frobenius_norm(chunks=200)#

Frobenius norm (||data - WH||) of a data matrix and a low rank approximation given by WH. Minimizing the Fnorm is the most common optimization criterion for matrix factorization methods. Returns: ——- frobenius norm: F = ||data - WH||

property indices#
property num_components#
property num_features#
property num_samples#
squared_frobenius_norm(chunks=200)#

Frobenius norm (||data - WH||) of a data matrix and a low rank approximation given by WH. Minimizing the Fnorm is the most common optimization criterion for matrix factorization methods. Returns: ——- frobenius norm: F = ||data - WH||