Skip to content

Commit

Permalink
Updated scripts
Browse files Browse the repository at this point in the history
Integrated simplified B matrix

Removed config.py

All scripts updated

6D example script added

Refactored grid container

Refactored code to make initialization faster

Refactored marginalize function in scripts

Fixed bug in 6D example

Updated scripts

Updated README

Assets added

Update README.md

Update README.md
  • Loading branch information
ParkerEwen5441 committed Aug 30, 2024
1 parent b413aaa commit 70d4d31
Show file tree
Hide file tree
Showing 23 changed files with 2,527 additions and 326 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*.npy
sparselib.egg-info/
build/
*.png
debug/
133 changes: 72 additions & 61 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,61 +1,72 @@
Funcs:
- Variables:
- dynamics: list(function)
- uncertainty: function

Domain:
- Variables
- max_level: (int)
- domain: (Dx2 array)
- dim: int

SparseGrid:
- Methods:
- init:
- Inputs: domain, max level
- Outputs: N/A
- fit:
- Inputs: func
- Outputs: N/A
- eval:
- Inputs: coords (NxD array)
- Outputs: vals (N array)

GridContainer:
- Methods:
- fit:
- Inputs: Funcs class
- Output: N/A

SolverParams:
- max_level
- dimension
- domain
- dynamics function(s)
- uncertainty function
- funcs: [uncertainty, dynamics]

SpectralDiscretization:
- Methods:
- init:
- Inputs: SolverParams
- Outputs: N/A
- solve:
- Inputs: time (float)
coords (NxD array)
- Output: vals (NxD array)


solverParams --> SpectralDiscretization
SpectralDiscretization():
1) Constructs GridContainer
2) Calls gridContainer.fit()
SpectralDiscretization.solve(t, xs):
1) Runs propagation script



FIXES:
- Fix issue with basis_der always multiplying 1j * k[d] for each
dim even though der is not over each dim
- Similar fix for basis function
# Uncertainty Propagation Using Half-Densities Via Sparse Spectral Discretization on Compact Manifolds
Parker Ewen, Lucas Lymburner, Henry Jacobs, Ram Vasudevan<br>
| [Webpage](https://roahmlab.github.io/sparselib_page/) | [Full Paper](https://repo-sam.inria.fr/fungraph/3d-gaussian-splatting/3d_gaussian_splatting_high.pdf)<br>
<p align="center">
<img src="assets/2D_example.gif" />
</p>

This repository contains the *sparselib* implementation associated with the paper "Uncertainty Propagation Using Half-Densities Via Sparse Spectral Discretization on Compact Manifolds".

## Setup
This package can be installed using the pip package installer:

```shell
git clone https://github.com/ParkerEwen5441/sparselib.git
cd sparselib
pip install .
```

## Overview

The codebase has 4 main components:
- A grid object used for computing the hyperbolic Fourier coefficients
- A grid container for storing all grid objects used to approximate the uncertainty and vector fields
- A spectral scheme for computing solutions to the linear advection equation

Any of these components may be modified to suit the user's particular implementation.
Algorithms used in the component implementations are constructive so as to alleviate the curse-of-dimensionality.


## Running

To run the an example script for the 1D example seen in the paper, simply use

```shell
cd scripts
python 1D_example.py
```

Additionally, other scripts are available for the 2D, 3D, and 6D cases.
To run the 2D and 3D cases, there is an additional dependency to plot the uncertainty over the torus:

```shell
pip install s3dlib==1.0.0
```

## Abstract
Uncertainty propagation is a critical component in various applications such as stochastic optimal control, optimal transport, probabilistic inference, and filtering.
This paper frames uncertainty propagation of a dynamical system with compact support thru the lens of advecting a probability density through a vector field via the transport and continuum equations.
These equations exhibit a number of conservation laws.
For example, scalar multiplication is conserved by the transport equation, while positivity of probabilities is conserved by the continuum equation.
Certain discretization techniques, such as particle based methods, conserve these properties, but converge slower than spectral discretization methods on smooth data.
Standard spectral discretization methods, on the other hand, do not conserve the invariants of the transport equation and the continuum equation.
This article constructs a novel sparse spectral discretization technique that conserves these important invariants, namely positivity of probability measure, while simultaneously preserving spectral convergence rates.
The performance of this proposed method is illustrated on several numerical experiments and the quantitative convergence rate of the proposed approach is derived.

If you use this library, please cite the following work.

<section class="section" id="BibTeX">
<div class="container is-max-desktop content">
<h2 class="title">BibTeX</h2>
<pre><code>@Article{kerbl3Dgaussians,
author = {Ewen, Parker and Lymburner, Lucas and Jacobs, Henry and Vasudevan, Ram},
title = {Uncertainty Propagation Using Half-Densities Via Sparse Spectral Discretization on Compact Manifolds},
journal = {In Submission},
number = {1},
volume = {1},
month = {September},
year = {2024},
url = {https://roahmlab.github.io/sparselib_page/}
}</code></pre>
</div>
</section>
Binary file added assets/2D_example.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/3D_example.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/system_diagram.pdf
Binary file not shown.
25 changes: 0 additions & 25 deletions pyproject.toml

This file was deleted.

Loading

0 comments on commit 70d4d31

Please sign in to comment.