You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`docs/` contains `make` files and `.rst` files to govern the way `sphinx` builds documentation, either locally by navigating to this folder and calling `make html` or in the cloud by `readthedocs.io`.
54
+
-`examples/` contains Jupyter notebooks that demonstrate some usage of the library.
55
+
-`pynumdiff/` contains the source code. For a full list of modules and further navigation help, see the readme in this subfolder.
56
+
-`.editorconfig` ensures tabs are displayed as 4 characters wide.
57
+
-`.gitignore` ensures files generated by local `pip install`s, Jupyter notebook runs, caches from code runs, virtual environments, and more are not picked up by `git` and accidentally added to the repo.
58
+
-`.pylintrc` configures `pylint`, a tool for autochecking code quality.
59
+
-`.readthedocs.yaml` configures `readthedocs` and is necessary for documentation to get auto-rebuilt.
60
+
-`CITATION.cff` is citation information for the Journal of Open-Source Software (JOSS) paper associated with this project.
61
+
-`LICENSE.txt` allows free usage of this project.
62
+
-`README.md` is the text you're reading, hello.
63
+
-`linting.py` is a script to run `pylint`.
64
+
-`pyproject.toml` governs how this package is set up and installed, including dependencies.
89
65
90
66
## Citation
91
67
@@ -121,11 +97,12 @@ See CITATION.cff file as well as the following references.
121
97
122
98
### Prerequisite
123
99
124
-
PyNumDiff requires common packages like `numpy`, `scipy`, `matplotlib`, `pytest` (for unittests), `pylint`
125
-
(for PEP8 style check). For a full list, you can check the file [pyproject.toml](pyproject.toml)
100
+
PyNumDiff requires common packages like `numpy`, `scipy`, and `matplotlib`. For a full list, you can check the file [pyproject.toml](pyproject.toml)
126
101
127
102
In addition, it also requires certain additional packages for select functions, though these are not required for a successful install of PyNumDiff:
128
-
* Total Variation Regularization methods: [`cvxpy`](http://www.cvxpy.org/install/index.html)
103
+
- Total Variation Regularization methods: [`cvxpy`](http://www.cvxpy.org/install/index.html)
104
+
-`pytest` for unittests
105
+
-`pylint` for PEP8 style check
129
106
130
107
When using `cvxpy`, our default solver is set to be `MOSEK` (highly recommended), you would need to download their
131
108
free academic license from their [website](https://www.mosek.com/products/academic-licenses/). Otherwise, you can also
@@ -147,7 +124,6 @@ again.
147
124
148
125
<em>Note: If using the optional MOSEK solver for cvxpy you will also need a [MOSEK license](https://www.mosek.com/products/academic-licenses/), free academic license.</em>
149
126
150
-
151
127
## Usage
152
128
153
129
**PyNumDiff** uses [Sphinx](http://www.sphinx-doc.org/en/stable/) for code documentation.
@@ -189,25 +165,23 @@ We will frequently update simple examples for demo purposes, and here are curren
189
165
* Parameter Optimization with known ground truth (only for demonstration purpose): [2a_optimizing_parameters_with_dxdt_known.ipynb](examples/2a_optimizing_parameters_with_dxdt_known.ipynb)
190
166
* Parameter Optimization with unknown ground truth: [2b_optimizing_parameters_with_dxdt_unknown.ipynb](./examples/2b_optimizing_parameters_with_dxdt_unknown.ipynb)
191
167
192
-
193
168
### Important notes
194
169
195
170
* Larger values of `tvgamma` produce smoother derivatives
196
171
* The value of `tvgamma` is largely universal across methods, making it easy to compare method results
197
172
* The optimization is not fast. Run it on subsets of your data if you have a lot of data. It will also be much faster with faster differentiation methods, like savgoldiff and butterdiff, and probably too slow for sliding methods like sliding DMD and sliding LTI fit.
198
173
* The following heuristic works well for choosing `tvgamma`, where `cutoff_frequency` is the highest frequency content of the signal in your data, and `dt` is the timestep: `tvgamma=np.exp(-1.6*np.log(cutoff_frequency)-0.71*np.log(dt)-5.1)`
199
174
200
-
201
175
### Running the tests
202
176
203
-
We are using Travis CI for continuous intergration testing. You can check out the current status
-`finite_difference` contains basic first and second order finite differencing methods. The first order method supports iterative application.
2
+
-`kalman_smooth` contains Kalman filtering and smoothing methods, currently constant-derivative methods up to 3rd order (jerk) and a classic linear Kalman Filter based on known dynamics.
3
+
-`linear_model` is a bit of a miscellaneous module, containing methods which work linearly: `lineardiff`, `polydiff`, `savgoldiff`, and `spectraldiff`.
4
+
-`optimize` contains code to find best parameter settings for methods, tuned using Nelder-Mead according to the paper "Numerical differentiation of noisy data: A unifying multi-objective optimization framework"
5
+
-`smooth_finite_difference` contains methods which do a smoothing step followed by simple finite difference.
6
+
-`tests` contains `pytest` unit tests of
7
+
1. all the differentiation methods, checking their results against a suite of known analytic functions (including an ability to plot if the `--plot` command is passed to `pytest`, see `conftest.py`)
8
+
2. the optimizer
9
+
3. utilities, auxiliary functions used throughout the code
10
+
-`total_variation_regularization` contains code to take the derivative based on a finite differencing scheme which is regularized by shrinking changes of value in some derivative (1st, 2nd, or 3rd order)
11
+
-`utils` contains `utility` functions used throughout differentation methods, `evaluate` functions used by the parameter optimizer, and `simulate` examples for demonstrating and testing the methods.
0 commit comments