pydiodon.coa¶
- pydiodon.coa(X, k=- 1, meth='svd', transpose=False, withloops=False)[source]¶
what it does
Correspondance Analysis of an array X
- Parameters
- Xa 2D numpy array, n x p
array to be analysed
- kan integer
number of axis to compute
- metha string
method for numerical computing
- Returns
- La 1D numpy array
vector of eigenvalues
- Y_ra 2D numpy array,`n x k`
coordinates of row points
- Y_ca 2D numpy array, p x k
coordinates of column points
Notes
If \(k=-1\), all axis are computed. If \(k > 0\), only k first axis and components are computed.
methods for PCA core
evd
EVD
svd
SVD with numpy.linalg.svd()
grp
SVD with gaussian random projection
Example
>>> import pydiodon as dio >>> import numpy as np >>> dataset = "../data4tests/coa4tests.txt" >>> A, headers, rownames = dio.load(dataset) >>> L, Y_r, Y_c = dio.coa(A)
note on the example
The dataset is in text format with tabs as delimiters. It contains headers and row names. These are default parameters for fucntion dio.load()
References:
Nenadic & Greenacre, Journal of Statistical Software, 20(3): 2-13, 2007
Lebart, Morineau & Fénelon, 1982, pp. 305-320
af, revised 21.02.21, 22.11.05