{"id":13666109,"url":"https://github.com/grtlr/uapca","last_synced_at":"2025-06-20T16:39:27.914Z","repository":{"id":57384311,"uuid":"201286835","full_name":"grtlr/uapca","owner":"grtlr","description":"Uncertainty-aware principal component analysis.","archived":false,"fork":false,"pushed_at":"2021-10-13T07:40:36.000Z","size":843,"stargazers_count":17,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-18T15:37:55.456Z","etag":null,"topics":["dimensionality-reduction","hacktoberfest","machine-learning","uncertainty","visualization"],"latest_commit_sha":null,"homepage":"https://arxiv.org/abs/1905.01127","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/grtlr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null}},"created_at":"2019-08-08T15:32:11.000Z","updated_at":"2023-01-24T20:50:59.000Z","dependencies_parsed_at":"2022-09-14T17:53:40.947Z","dependency_job_id":null,"html_url":"https://github.com/grtlr/uapca","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grtlr%2Fuapca","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grtlr%2Fuapca/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grtlr%2Fuapca/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grtlr%2Fuapca/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/grtlr","download_url":"https://codeload.github.com/grtlr/uapca/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248163250,"owners_count":21057894,"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":["dimensionality-reduction","hacktoberfest","machine-learning","uncertainty","visualization"],"created_at":"2024-08-02T06:00:58.301Z","updated_at":"2025-04-10T05:32:36.127Z","avatar_url":"https://github.com/grtlr.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# Uncertainty-aware principal component analysis\n\n![Build Status](https://github.com/grtlr/uapca/workflows/build/badge.svg)\n[![npm](https://img.shields.io/npm/v/uapca)](https://www.npmjs.com/package/uapca)\n![GitHub](https://img.shields.io/github/license/grtlr/uapca)\n\nThis is an implementation of uncertainty-aware principal component analysis, which generalizes PCA to work on probability distributions. You can find a live Observable notebook demonstrating our method [here](https://observablehq.com/@grtlr/uncertainty-aware-pca).\n\n![Teaser](https://raw.githubusercontent.com/grtlr/uapca/master/teaser.gif)\n\nYou can find a preprint of our paper at [arXiv:1905.01127](https://arxiv.org/abs/1905.01127) or on my [personal website](https://www.jgoertler.com).\nWe also extracted means and covariances from the [*student grades* dataset](https://raw.githubusercontent.com/grtlr/uapca/master/data/student_grades.json).\n\n## Example\n\n```js\n// Loading the library\nimport * as uapca from 'uapca';\n\n// Loading and converting the dataset\nconst student_grades = (await fetch('https://raw.githubusercontent.com/grtlr/uapca/master/data/student_grades.json')).json();\nconst distributions = student_grades.distributions.map(d =\u003e new uapca.MultivariateNormal(d.mean, d.cov));\n\n// Perform uncertainty-aware PCA with scaling factor k = 0.5\nconst pca = uapca.UaPCA.fit(distributions, 0.5).aligned();\n\n// Project the data onto 2D\nconst projected_distributions = pca.transform(distributions, 2);\n```\n\n## Development\n\nThe dependencies can be install using `yarn`:\n\n```bash\nyarn install\n```\n\nBuilds can be prepared using:\n\n```bash\nyarn run build\nyarn run dev # watches for changes\n```\n\nRun tests:\n\n```bash\nyarn run test\n```\n    \nTo perform linter checks you there is:\n\n```bash\nyarn run lint\nyarn run lint-fix # tries to fix some of the warnings\n```\n\n## Citation\n\nTo cite this work, you can use the BibTex entry in `CITATION.cff`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrtlr%2Fuapca","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrtlr%2Fuapca","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrtlr%2Fuapca/lists"}