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
**PyNumDiff** uses [Sphinx](http://www.sphinx-doc.org/en/stable/) for code documentation.
119
-
So you can see more details about the API usage [there](https://pynumdiff.readthedocs.io/en/latest/).
118
+
**PyNumDiff** uses [Sphinx](http://www.sphinx-doc.org/en/master/) for code documentation, so read more details about the API usage [there](https://pynumdiff.readthedocs.io/master/).
params, val = optimize(method, x, dt, search_space={'param1':[options], 'param2':[options], ...},
132
+
params, val = optimize(method, x, dt, search_space={'param1':[vals], 'param2':[vals], ...},
134
133
tvgamma=tvgamma, # hyperparameter, defaults to None if dxdt_truth given
135
134
dxdt_truth=None) # or give ground truth data, in which case tvgamma unused
136
135
print('Optimal parameters: ', params)
137
136
x_hat, dxdt_hat = method(x, dt, **params)
138
137
```
138
+
If no `search_space` is given, a default one is used.
139
+
139
140
* Advanced usage: automated parameter selection through multi-objective optimization using a user-defined cutoff frequency
140
141
```python
141
142
# cutoff_freq: estimate by (a) counting the number of true peaks per second in the data or (b) look at power spectra and choose cutoff
@@ -159,7 +160,7 @@ We will frequently update simple examples for demo purposes, and here are curren
159
160
160
161
* Larger values of `tvgamma` produce smoother derivatives
161
162
* The value of `tvgamma` is largely universal across methods, making it easy to compare method results
162
-
* 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.
163
+
* 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`.
163
164
* 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)`
0 commit comments