{"id":19863773,"url":"https://github.com/sandialabs/xpca","last_synced_at":"2025-02-28T23:16:36.516Z","repository":{"id":215507237,"uuid":"658868402","full_name":"sandialabs/xpca","owner":"sandialabs","description":"Implementation of XPCA in Python (https://arxiv.org/abs/1808.07510)","archived":false,"fork":false,"pushed_at":"2023-06-26T16:50:35.000Z","size":22,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-11T15:25:10.581Z","etag":null,"topics":["scr-2407","snl-comp-science-libs","snl-data-analysis"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sandialabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-06-26T16:50:23.000Z","updated_at":"2024-11-11T19:46:58.000Z","dependencies_parsed_at":"2024-01-04T20:57:39.198Z","dependency_job_id":null,"html_url":"https://github.com/sandialabs/xpca","commit_stats":null,"previous_names":["sandialabs/xpca"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandialabs%2Fxpca","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandialabs%2Fxpca/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandialabs%2Fxpca/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandialabs%2Fxpca/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sandialabs","download_url":"https://codeload.github.com/sandialabs/xpca/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241272627,"owners_count":19937092,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["scr-2407","snl-comp-science-libs","snl-data-analysis"],"created_at":"2024-11-12T15:16:03.431Z","updated_at":"2025-02-28T23:16:36.492Z","avatar_url":"https://github.com/sandialabs.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Table of Contents\n\n* [Background](#background) \n* [Install](#install) \n* [Example](#example)\n\n## Background \nXPCA factors an observed data matrix X (m rows x n columns) into\ntwo factors, A (m x k) and B (n x k) where rank = k. Each row in X corresponds\nto an observed element, and each column corresponds to a feature of the observed\nelement. These columns can be of mixed variable types - continuous, count,\nbinary, etc. \n\n`xpcapy` is the python implementation of xpca. There is also an R version of\nthis code available [here](https://gitlab.com/xpca/xpcar)\n\nXPCA implements 3 capabilities: xpca, pca, and coca. \n\n### coca \n`coca` is from work done by:\n\n1. Fang Han and Han Liu. Semiparametric principal component analysis. In\nNIPS’12: Proceedings of the 26th Annual Conference on Neural Information\nPro- cessing Systems, pages 171–179, 2012.  URL\nhttp://papers.nips.cc/paper/4809-semiparametric-principal-component-analysis.\n\n2. Bernhard Egger, Dinu Kaufmann, Sandro Sch ̈onborn, Volker Roth, and Thomas\nVetter. Copula eigenfaces — semiparametric principal component analysis for\nfacial appearance modeling.  In VISIGRAPP’16: Proceedings of the 11th Joint\nConference on Computer Vi- sion, Imaging and Computer Graphics Theory and\nApplications, pages 50–58. SciTePress, 2016. 10.5220/0005718800480056.\n\n\n### xpca \n`xpca` is Sandia-built work done by Cliff Anderson-Bergman, Tamara\nKolda, and Kina Kincher-Winoto.  Paper is available on arXiv:\n\n[C. Anderson-Bergman, T. G. Kolda, K. Kincher-Winoto. XPCA: Extending PCA for a\nCombination of Discrete and Continuous Variables. arXiv:1808.07510,\n2018.](https://arxiv.org/abs/1808.07510)\n\n### pca \n`pca` is the well-known algorithm. For reference: \n\nMichael E. Tipping and Christopher M. Bishop. Probabilistic principal component\nanalysis. Journal of the Royal Statistical Society: Series B (Statistical\nMethodology), 61(3):611– 622, August 1999. 10.1111/1467-9868.00196.\n\n## Install\n\n`xpcapy` requires:\n* Python 3 (tested on 3.6) \n* [NumPy](http://scipy.org/index.html) 1.11.0\n* [SciPy](http://scipy.org/index.html) 0.17.1\n\nThese can be installed by running the following from the command line: \n```bash \n$ pip install numpy \n$ pip install scipy \n```\n\nTo install `xpcapy`:\n\nDownload this repo and run the following command from the terminal: \n\n```bash \n$ cd /path/to/xpcapy\n$ python setup.py install \n``` \n\n## Example\n\nRefer to `example.py` for an example as to how to simulate data and read in a\nfile. This script will run xpca and save off theta and final fitted matrix to a\nfile. \n\nUsage: \n```\n# Just run it to simulate data\n$ python3 example.py\n# Or to read in a file of your own\n$ python3 example.py --filename example_data.csv --rank 3 \n``` \n\nBoth variations of\nthe run (simulation or reading in your own data) will output a `theta.csv` and\n`fitted.csv`\n\nThe included `example_data.csv` is an exemplar data set since it includes\ncontinuous, binary, and count data.\n\n## Questions?\nEmail xpca@sandia.gov if you have any questions.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsandialabs%2Fxpca","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsandialabs%2Fxpca","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsandialabs%2Fxpca/lists"}