Skip to content

Commit b1c2385

Browse files
authored
Bayesian Operator Inference (#76)
* update Tikhonov.get_operators_regularizer() docstring * add CI badge to README * posterior() method for Tikhonov solvers * update lstsq test structure * update posterior lstsq docs, error if deterministic * update roms for bayesian compatibility * update README, Makefile, remove extra logo file * update lstsq, rom docstrings * OperatorPosterior and BayesianROM classes * version 0.5.12 -> 0.5.13 * literature update early 2025
1 parent 2995acc commit b1c2385

25 files changed

+2120
-1147
lines changed

Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ deploy_package:
6363
$(TOX)
6464
$(PIP) --upgrade build
6565
$(PIP) --upgrade twine
66+
$(PIP) --upgrade packaging
6667
$(REMOVE) dist/
6768
$(PYTHON) -m build --sdist --wheel
6869
$(PYTHON) -m twine check dist/*

README.md

+3-12
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,12 @@
55
[![Issues](https://img.shields.io/github/issues/Willcox-Research-Group/rom-operator-inference-python3)](https://github.com/Willcox-Research-Group/rom-operator-inference-python3/issues)
66
[![Latest commit](https://img.shields.io/github/last-commit/Willcox-Research-Group/rom-operator-inference-python3)](https://github.com/Willcox-Research-Group/rom-operator-inference-python3/commits/main)
77
[![PyPI](https://img.shields.io/pypi/wheel/opinf)](https://pypi.org/project/opinf/)
8-
[![Documentation](https://img.shields.io/badge/Documentation-important)](https://Willcox-Research-Group.github.io/rom-operator-inference-Python3/)
8+
[![CI](https://github.com/Willcox-Research-Group/rom-operator-inference-Python3/actions/workflows/test_src.yml/badge.svg?branch=main)](https://github.com/Willcox-Research-Group/rom-operator-inference-Python3/actions/workflows/test_src.yml)
99

1010
# Operator Inference in Python
1111

12-
This is a Python implementation of Operator Inference for learning projection-based polynomial reduced-order models of dynamical systems.
12+
This package is a Python implementation of the Operator Inference framework for learning projection-based polynomial reduced-order models of dynamical systems.
1313
The procedure is **data-driven** and **non-intrusive**, making it a viable candidate for model reduction of "glass-box" systems.
1414
The methodology was [introduced in 2016 by Peherstorfer and Willcox](https://www.sciencedirect.com/science/article/pii/S0045782516301104).
1515

16-
[**See the Documentation Here**](https://Willcox-Research-Group.github.io/rom-operator-inference-Python3/).
17-
18-
---
19-
20-
**Contributors**:
21-
[Shane McQuarrie](https://github.com/shanemcq18),
22-
[Renee Swischuk](https://github.com/swischuk),
23-
[Elizabeth Qian](https://github.com/elizqian),
24-
[Boris Kramer](http://kramer.ucsd.edu/),
25-
[Karen Willcox](https://kiwi.oden.utexas.edu/).
16+
[**See the Documentation Here**](https://willcox-research-group.github.io/rom-operator-inference-Python3/).

docs/_config.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -117,12 +117,13 @@ sphinx:
117117
"D": "\\mathbf{D}" # data matrix
118118
"ohat": "\\hat{\\mathbf{o}}" # operator vector
119119
"Ohat": "\\hat{\\mathbf{O}}" # operator matrix
120-
"bfmu": "\\boldsymbol{\\mu}" # parameter vector
120+
"bfmu": "\\boldsymbol{\\mu}" # parameter vector, mean vector
121121
"bfGamma": "\\boldsymbol{\\Gamma}" # regularization matrix
122122
"bfPhi": "\\boldsymbol{\\Phi}" # left singular vectors
123-
"bfSigma": "\\boldsymbol{\\Sigma}" # singular values
123+
"bfSigma": "\\boldsymbol{\\Sigma}" # singular values, covariance
124124
"bfPsi": "\\boldsymbol{\\Psi}" # right singular vectors
125125
"bfLambda": "\\boldsymbol{\\Lambda}" # eigenvalues
126+
"bfxi": "\\boldsymbol{\\xi}" # placeholder
126127
"trp": "{^{\\mathsf{T}}}" # transpose
127128
"ddt": "\\frac{\\textrm{d}}{\\textrm{d}t}" # time derivative
128129
"ddqhat": "\\frac{\\partial}{\\partial\\qhat}" # d/dqhat

docs/bib2md.py

+38-8
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"method": "Methodology",
1919
"structure": "Structure Preservation",
2020
"theory": "Theory",
21+
"software": "Software / Implementation",
2122
"application": "Applications",
2223
"thesis": "Dissertations and Theses",
2324
"other": "Other",
@@ -30,15 +31,21 @@
3031

3132
# Author citation IDs (https://scholar.google.com/citation?user=<this ID>)
3233
scholarIDS = {
33-
"iman_adibnazari": "u8vJ9-oAAAAJ",
34+
"nicole_aretz": "Oje7mbAAAAAJ",
3435
"anthony_ashley": "9KFAXLYAAAAJ",
36+
"sean_babiniec": "xcSVh00AAAAJ",
3537
"laura_balzano": "X6fRNfUAAAAJ",
3638
"peter_benner": "6zcRrC4AAAAJ",
39+
"patrick_blonigan": "lOmH5XcAAAAJ",
3740
"anirban_chaudhuri": "oGL9YJIAAAAJ",
41+
"pascal_denboef": "vFlzL7kAAAAJ",
3842
"igor_duff": "OAkPFdkAAAAJ",
43+
"melina_freitag": "iE4t4WcAAAAJ",
3944
"ionut-gabriel_farcas": "Cts5ePIAAAAJ",
4045
"rudy_geelen": "vBzKRMsAAAAJ",
46+
"yuwei_geng": "lms4MbwAAAAJ",
4147
"omar_ghattas": "A5vhsIYAAAAJ",
48+
"leonidas_gkimisis": "0GzUUzMAAAAJ",
4249
"marcos_gomes": "s6mocWAAAAAJ",
4350
"pawan_goyal": "9rEfaRwAAAAJ",
4451
"anthony_gruber": "CJVuqfoAAAAJ",
@@ -50,26 +57,40 @@
5057
"lili_ju": "JkKUWoAAAAAJ",
5158
"bülent_karasözen": "R906kj0AAAAJ",
5259
"parisa_khodabakhshi": "lYr_g-MAAAAJ",
60+
"hyeonghun_kim": "sdR-LZ4AAAAJ",
5361
"tomoki_koike": "HFoIGcMAAAAJ",
5462
"boris_kramer": "yfmbPNoAAAAJ",
63+
"diana_manvelyan": "V0k8Xb4AAAAJ",
64+
"jan_nicolaus": "47DRMUwAAAAJ",
65+
"joseph_maubach": "nBRKw6cAAAAJ",
66+
"alexandre_marquez": "p9zb2Y0AAAAJ",
5567
"shane_mcquarrie": "qQ6JDJ4AAAAJ",
68+
"jonathan_murray": "NScAg7AAAAAJ",
5669
"david_najera-flores": "HJ-Dfl8AAAAJ",
5770
"alberto_nogueira": "66DEy5wAAAAJ",
5871
"benjamin_peherstorfer": "C81WhlkAAAAJ",
59-
"arthur-pires": "qIUw-GEAAAAJ",
60-
"gleb-pogudin": "C5NP1o0AAAAJ",
72+
"arthur_pires": "qIUw-GEAAAAJ",
73+
"gleb_pogudin": "C5NP1o0AAAAJ",
6174
"elizabeth_qian": "jnHI7wQAAAAJ",
75+
"thomas_richter": "C8R6xtMAAAAJ",
76+
"wil_schilders": "UGKPyqkAAAAJ",
6277
"harsh_sharma": "Pb-tL5oAAAAJ",
78+
"jasdeep_singh": "VcmXMxgAAAAJ",
6379
"renee_swischuk": "L9D0LBsAAAAJ",
80+
"john_tencer": "M6AwtC4AAAAJ",
6481
"irina_tezaur": "Q3fx78kAAAAJ",
82+
"marco_tezzele": "UPcyNXIAAAAJ",
6583
"michael_todd": "jzY8TSkAAAAJ",
6684
"michael_tolley": "0kOHVOkAAAAJ",
6785
"wayne_uy": "hNN_KRQAAAAJ",
86+
"nathan_vandewouw": "pcQCbN8AAAAJ",
87+
"arjun_vijaywargiya": "_fcSwDYAAAAJ",
6888
"zhu_wang": "jkmwEF0AAAAJ",
6989
"yuxiao_wen": "uXJoQCAAAAAJ",
7090
"karen_willcox": "axvGyXoAAAAJ",
7191
"stephen_wright": "VFQRIOwAAAAJ",
7292
"süleyman_yıldız": "UVPD79MAAAAJ",
93+
"benjamin_zastrow": "ODLjrBAAAAAJ",
7394
}
7495

7596
# LaTeX special characters to convert for the markdown version.
@@ -132,10 +153,13 @@
132153
133154
`authors = {{First1 Last1 and First2 Last2}},`
134155
156+
Enclose multi-word names in braces, for example,
157+
158+
`authors = {{Vincent {{van Gogh}} and Balthasar {{van der Pol}}}},`
135159
- Include a "doi" field if applicable.
136160
- Add a "category" field to indicate which section the reference should be
137161
listed under on this page. Options include `survey`, `method`,
138-
`structure`, `theory`, `application`, `thesis`, and `other`.
162+
`structure`, `theory`, `software`, `application`, `thesis`, and `other`.
139163
3. Add the Google Scholar IDs of each author who has one to the `scholarIDS`
140164
dictionary in `docs/bib2md.py`. This is the unique part of a Google Scholar
141165
profile page url:
@@ -183,21 +207,27 @@ def clean_title(title):
183207
return re.subn(r"\{(\w+?)\}", r"\1", clean_name(title))[0]
184208

185209

186-
def linkedname(names):
210+
def linkedname(author):
187211
"""Get the string of the form "First, Last" with a link to their
188212
Google Scholar page if possible.
189213
"""
214+
# Separate names, keeping {} groups together.
215+
names = [
216+
match[1:-1] if match.startswith("{") and match.endswith("}") else match
217+
for match in re.findall(r"\{[^}]*\}|\S+", author)
218+
]
219+
190220
# Extract first and last names and initials.
191221
firstname = clean_name(names[0]).lower()
192222
if names[-1] == "Jr":
193223
lastname = clean_name(names[-2])
194224
initials = " ".join([name[0] + "." for name in names[:-2]])
195-
key = f"{firstname}_{lastname.lower()}"
225+
key = f"{firstname}_{lastname.replace(" ", "").lower()}"
196226
lastname = f"{lastname} Jr."
197227
else:
198228
lastname = clean_name(names[-1])
199229
initials = " ".join([name[0] + "." for name in names[:-1]])
200-
key = f"{firstname}_{lastname.lower()}"
230+
key = f"{firstname}_{lastname.replace(" ", "").lower()}"
201231

202232
# Get the Google Scholar link if possible.
203233
if key in scholarIDS:
@@ -241,7 +271,7 @@ def main(bibfile, mdfile):
241271
raise ValueError(
242272
f"change {bibfile} to avoid ',' in author '{author}'"
243273
)
244-
authors.append(linkedname(author.split(" ")))
274+
authors.append(linkedname(author))
245275

246276
if len(authors) == 0:
247277
raise ValueError("empty author field")

docs/images/opinf-logo.svg

-36
This file was deleted.

0 commit comments

Comments
 (0)