CA#
- class CA(n_components=2, n_iter=10, copy=True, check_input=True, random_state=None, engine='auto')[source]#
Bases:
BaseEstimator,TransformerMixinCorrespondence Analysis of a contingency table.
- Parameters:
n_components (int, default=2) – Number of components.
n_iter (int, default=10) – Number of iterations of the randomized SVD.
copy (bool, default=True) – Whether to copy the data.
check_input (bool, default=True) – Whether to check the input.
random_state (int, default=None) – Seed of the SVD.
engine ({'auto', 'sklearn', 'fbpca'}, default='auto') – SVD implementation.
- fit(X, y=None)[source]#
Fit the CA.
- Parameters:
X (array-like of shape (n_rows, n_columns)) – Contingency table.
y (None) – Not used.
- Returns:
self
- Return type:
- transform(X)[source]#
Computes the row principal coordinates of a dataset.
Same as calling row_coordinates. In most cases you should be using the same dataset as you did when calling the fit method. You might however also want to included supplementary data.
- property explained_variance_#
The eigenvalues associated with each principal component.
- property explained_variance_ratio_#
The percentage of explained inertia per principal component.