Robust principal component analysis for Python.
Project description
Robust principal component analysis for Python
This package provides algorithms to solve the Robust Principal Component Analysis (RPCA) problem, as presented by Candès et al.[1]. Currently, a single algorithm is implemented: it solves the Principal Component Pursuit (PCP) convex relaxation of RPCA from the same paper, using the Inexact Augmented Lagrange Multiplier (IALM) method from Lin et al.[2][3].
Example
from pyrpca import rpca_pcp_ialm
# given an m x n data matrix
data = ...
# decide on sparsity factor.
# this parameter is also commonly known as 'lambda'.
sparsity_factor = 1.0 / numpy.sqrt(max(data.shape))
# run the ialm algorithm.
low_rank, sparse = rpca_pcp_ialm(data, sparsity_factor)
Installing
pip install pyrpca
Feature requests and contributing
Pull requests and feature requests are welcome. The current version is minimal and suits my personal needs, but feel free to make suggestions. Even if the repository looks inactive, I will still respond :)
References
- Emmanuel J. Candès, Xiaodong Li, Yi Ma, John Wright. Robust principal component analysis? Association for Computing Machinery 2011. (preprint on arXiv)
- Zhouchen Lin, Risheng Liu, Zhixun Su. Linearized Alternating Direction Method with Adaptive Penalty for Low-Rank Representation. arXiv 2011.
- Zhouchen Lin, Minming Chen, Yi Ma. The Augmented Lagrange Multiplier Method for Exact Recovery of Corrupted Low-Rank Matrices, V3. arXiv 2013.
Acknowledgements
Appreciation is due to various other Python implementations of RPCA that served as inspiration for this project. Below is a non-exhaustive list:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyrpca-1.0.1-py3-none-any.whl.
File metadata
- Download URL: pyrpca-1.0.1-py3-none-any.whl
- Upload date:
- Size: 14.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
29a0edc6d9a608a649ac192194a7c93c5141a28678f480ccb601bf3415bf2f95
|
|
| MD5 |
93f93ebd0631e53eb1a90572a7c236ba
|
|
| BLAKE2b-256 |
4218d640394759392fd1f1707a7771c3f98edf6c7527c65e9f46bfcb1ff5796b
|
Provenance
The following attestation bundles were made for pyrpca-1.0.1-py3-none-any.whl:
Publisher:
ci.yml on surgura/PyRPCA
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyrpca-1.0.1-py3-none-any.whl -
Subject digest:
29a0edc6d9a608a649ac192194a7c93c5141a28678f480ccb601bf3415bf2f95 - Sigstore transparency entry: 198483272
- Sigstore integration time:
-
Permalink:
surgura/PyRPCA@d77c6e940cd9757567c27ecff15d8d5587d568b4 -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/surgura
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@d77c6e940cd9757567c27ecff15d8d5587d568b4 -
Trigger Event:
push
-
Statement type: