Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/grtlr/uapca
Uncertainty-aware principal component analysis.
https://github.com/grtlr/uapca
dimensionality-reduction hacktoberfest machine-learning uncertainty visualization
Last synced: 2 months ago
JSON representation
Uncertainty-aware principal component analysis.
- Host: GitHub
- URL: https://github.com/grtlr/uapca
- Owner: grtlr
- License: mit
- Created: 2019-08-08T15:32:11.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-10-13T07:40:36.000Z (over 3 years ago)
- Last Synced: 2024-10-05T09:09:57.184Z (3 months ago)
- Topics: dimensionality-reduction, hacktoberfest, machine-learning, uncertainty, visualization
- Language: TypeScript
- Homepage: https://arxiv.org/abs/1905.01127
- Size: 823 KB
- Stars: 17
- Watchers: 5
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Citation: CITATION.cff
Awesome Lists containing this project
README
# Uncertainty-aware principal component analysis
![Build Status](https://github.com/grtlr/uapca/workflows/build/badge.svg)
[![npm](https://img.shields.io/npm/v/uapca)](https://www.npmjs.com/package/uapca)
![GitHub](https://img.shields.io/github/license/grtlr/uapca)This 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).
![Teaser](https://raw.githubusercontent.com/grtlr/uapca/master/teaser.gif)
You 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).
We also extracted means and covariances from the [*student grades* dataset](https://raw.githubusercontent.com/grtlr/uapca/master/data/student_grades.json).## Example
```js
// Loading the library
import * as uapca from 'uapca';// Loading and converting the dataset
const student_grades = (await fetch('https://raw.githubusercontent.com/grtlr/uapca/master/data/student_grades.json')).json();
const distributions = student_grades.distributions.map(d => new uapca.MultivariateNormal(d.mean, d.cov));// Perform uncertainty-aware PCA with scaling factor k = 0.5
const pca = uapca.UaPCA.fit(distributions, 0.5).aligned();// Project the data onto 2D
const projected_distributions = pca.transform(distributions, 2);
```## Development
The dependencies can be install using `yarn`:
```bash
yarn install
```Builds can be prepared using:
```bash
yarn run build
yarn run dev # watches for changes
```Run tests:
```bash
yarn run test
```
To perform linter checks you there is:```bash
yarn run lint
yarn run lint-fix # tries to fix some of the warnings
```## Citation
To cite this work, you can use the BibTex entry in `CITATION.cff`.