spkit.PCA

class spkit.PCA(n_components=None, apply_whitening=True, tol=1e-05)

Principle Component Analysis

TO BE IMPROVED - Not TESTES

Parameters:
X: (n,c)
Returns:
W - c X c

Methods

fit(X)

Fitting by computing SVD of Covariance Matrix

fit_transform(X)

Fit model and apply transformation

transform(X)

Transform given matrix X

whitening(X)

Whitening of matrix

fit(X)

Fitting by computing SVD of Covariance Matrix

Parameters:
X: 2D array (n,c)
  • n - number of samples

  • c - number of channels (dimensions)

Returns:
Wc by c Matrix
  • Transformation Matrix

  • X.dot(W)

fit_transform(X)

Fit model and apply transformation

Parameters:
X: 2D array (n,c)
  • n - number of samples

  • c - number of channels (dimensions)

Returns:
Xpca: Transformed Matrix
transform(X)

Transform given matrix X

Parameters:
X: 2D array (n,c)
  • n - number of samples

  • c - number of channels (dimensions)

Returns:
Xpca: Transformed Matrix
whitening(X)

Whitening of matrix