--- id: prince version: "0.20.1" license: MIT license_treatment: permissive maintenance: active --- # prince — Factor analysis in Python: PCA, CA, MCA, MFA, FAMD, GPA, PGA License: permissive · Maintenance: active · Downloads: 139.8K/mo ## What it is and what it does Prince is a Python library for multivariate exploratory data analysis that implements seven factor analysis methods: PCA, CA, MCA, MFA, FAMD, GPA, and PGA. It follows scikit-learn conventions, making it familiar to users of that ecosystem. The library was originally created in 2016 and underwent a major revamp in 2022 to improve robustness and feature coverage. The package works with tabular data and supports advanced features like supplementary rows and columns, as well as row and column weights. It integrates with pandas for data handling and Altair for interactive visualization of results. Prince is tested against scikit-learn and FactoMineR (via rpy2) to ensure correctness, and PGA is validated against geomstats. Use it for: - Reduce dimensionality of numerical datasets while preserving variance structure using PCA. - Analyze relationships between categorical variables in contingency tables with CA or MCA. - Explore mixed numerical and categorical data simultaneously using FAMD. - Analyze multiple groups of related columns with MFA. - Compare shapes across multiple datasets using GPA. - Perform dimensionality reduction on data constrained to a manifold using PGA. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Prince implements multivariate exploratory data analysis methods including PCA, CA, MCA, MFA, FAMD, GPA, and PGA with a scikit-learn API for tabular data summarization. Yes. Prince is actively maintained, has no known vulnerabilities, installs with low friction, and provides a comprehensive suite of factor analysis methods under a permissive MIT license. It is well-tested against established implementations and suitable for exploratory data analysis workflows that need more than standard PCA. ## Install pip install prince uv add prince poetry add prince ## Installing prince Before you install: Low install friction with a pure-Python wheel. Actively maintained as of 45 days ago with a revamp completed in 2022. Requires Python 3.10 or later. License in practice: MIT license is permissive; you can use, modify, and distribute Prince freely in commercial and private projects with minimal restrictions. Quickstart: pip install prince import prince import pandas as pd pca = prince.PCA(n_components=5) pca = pca.fit(your_dataframe) transformed = pca.transform(your_dataframe) Requires Python 3.10 or later. Verify before relying: - Whether supplementary rows/columns and row/column weights work reliably across all seven analysis methods. - Performance characteristics on datasets larger than those shown in examples. - Completeness of interactive plotting features when deployed outside Jupyter environments. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 139.8K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags principal component analysis python, correspondence analysis library, multivariate data analysis, factor analysis methods, dimensionality reduction exploratory, PCA CA MCA implementation, tabular data decomposition, dimensionality-reduction, exploratory-data-analysis, factor-analysis [View on SkillFed](https://skillfed.io/packages/prince) · [View on PyPI](https://pypi.org/project/prince/)