discrimintools.MPCA#

class discrimintools.MPCA(n_components=2)[source]#

Mixed Principal Components Analysis (MPCA)

Mixed Principal Components Analysis (MPCA) is a standardized principal component analysis of both quantitative variables and the transformation of the dummy variables associated to qualitative variables on quantitative variables through orthogonal projections of configurations of statistical units in the individual-space with a relational inner product. For more, see [1].

Parameters:

n_components (int or None) – Number of components to keep. If None, keep all the components.

Returns:

  • call_ (NamedTuple) – Call informations:

    • XtotDataFrame of shape (n_samples, n_colums)

      Input data.

    • XDataFrame of shape (n_samples, columns)

      Processing data.

    • dummiesDataFrame of shape (n_samples, n_categories)

      Disjunctive data.

    • XcodDataFrame of shape (n_samples, n_vars)

      Training data.

    • XcDataFrame of shape (n_samples, n_vars)

      Centered recode data.

    • ZDataFrame of shape (n_samples, n_vars)

      Standardize recode data.

    • centerSeries of shape (n_vars,)

      Average of recode data.

    • xc_centerSeries of shape (n_vars,)

      Average of centered recode data.

    • xc_scaleSeries of shape (n_vars,)

      Standard deviation of the centered recode data.

    • k1int

      Number of numerics columns.

    • k2int

      Number of categorical.

    • ind_weightsSeries of shape (n_samples,)

      Individuals weights.

    • var_weightsSeries of shape (n_vars,)

      Columns weights.

    • denomSeries of shape (n_vars,)

      number of variables.

    • max_componentsint

      Maximum number of components.

    • n_componentsint

      Number of components kept.

  • eig_ (DataFrame of shape (max_components, 4)) – The eigenvalues, the difference between each eigenvalue, the percentage of variance and the cumulative percentage of variance.

  • ind_ (NamedTuple) – Individuals informations:

    • coordDataFrame of shape (n_samples, n_components)

      The individuals coordinates.

  • model_ (str, defaut = ‘mpca’) – The model fitted.

  • svd_ (NamedTuple) – Generalized singular values decomposition:

    • vs1-D array of shape (max_components,)

      The singular values.

    • U2-D array of shape (n_samples, n_components)

      The left singular vectors.

    • V2-D array of shape (n_vars, n_components)

      The right singular vectors.

  • var_ (NamedTuple) – Variables informations:

    • coordDataFrame of shape (n_vars, n_components)

      The variables coordinates.

See also

GFA

General Factor Analysis (GFA)

GFALDA

General Factor Analysis Linear Discriminant Analysis (GFALDA)

:class:`~discrimintools.MDA

Mixed Discriminant Analysis (MDA)

summaryGFA

Printing summaries of General Factor Analysis model.

summaryGFALDA

Printing summaries of General Factor Analysis Linear Discriminant Analysis model.

summaryMDA

Printing summaries of Mixed Discriminant Analysis model.

summaryMPCA

Printing summaries of Mixed Principal Component Analysis model.

References

[2] Bry X. (1996), « Analyses factorielles multiple », Economica

[3] Bry X. (1999), « Analyses factorielles simples », Economica

[4] Escofier B., Pagès J. (2023), « Analyses Factorielles Simples et Multiples », 5ed, Dunod

[5] Saporta Gilbert (2011), « Probabilités, Analyse des données et Statistiques », Editions TECHNIP, 3ed.

[6] Husson, F., Le, S. and Pages, J. (2010), « Exploratory Multivariate Analysis by Example Using R », Chapman and Hall.

[7] Lebart Ludovic, Piron Marie, & Morineau Alain (2006), « Statistique Exploratoire Multidimensionnelle », Dunod, Paris 4ed.

[8] Pagès J. (2013), « Analyse factorielle multiple avec R : Pratique R », EDP sciences

[9] Rakotomalala, R. (2020), « Pratique des Méthodes Factorielles avec Python », Université Lumière Lyon 2. Version 1.0.

[10] Tenenhaus, M. (2006), « Statistique : Méthodes pour décrire, expliquer et prévoir », Dunod.

Examples

>>> from discrimintools.datasets import load_heart
>>> from discrimintools import MPCA
>>> D = load_heart("subset")
>>> X = D.drop(columns=["disease"])
>>> clf = MPCA()
>>> clf.fit(X)
MPCA()
__init__(n_components=2)[source]#

Methods

__init__([n_components])

fit(X[, y])

Fit the Mixed Principal Component Analysis Model

fit_transform(X[, y])

Fit the model with X and apply the dimensionality reduction on X

get_metadata_routing()

Get metadata routing of this object.

get_params([deep])

Get parameters for this estimator.

set_output(*[, transform])

Set output container.

set_params(**params)

Set the parameters of this estimator.

transform(X)

Apply the dimensionality reduction on X