Willcox-Research-Group / rom-operator-inference-Python3

Operator Inference for data-driven, non-intrusive model reduction of dynamical systems.
https://willcox-research-group.github.io/rom-operator-inference-Python3
MIT License
67 stars 30 forks source link

Least-Squares Solvers API Update #62

Closed shanemcq18 closed 4 months ago

shanemcq18 commented 4 months ago

Changes to the opinf.lstsq API and improvements to the documentation.

Before:

>>> model = opinf.models.ContinuousModel("A")
>>> solver = opinf.lstsq.L2Solver(regularizer=1e-2)
>>> model.fit(states, ddts, inputs, solver=solver)

After:

>>> solver = opinf.lstsq.L2Solver(regularizer=1e-2)
>>> model = opinf.models.ContinuousModel("A", solver=solver)
>>> model.fit(states, ddts, inputs)