Skip to content

Commit ac9691b

Browse files
committed
cleaning up readme more
1 parent 677bc4d commit ac9691b

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,7 @@ Call `pip install pynumdiff[advanced]` to automatically install [CVXPY](https://
115115

116116
## Usage
117117

118-
**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/).
120119

121120
### Code snippets
122121

@@ -130,12 +129,14 @@ x_hat, dxdt_hat = method(x, dt, param1=val1, param2=val2, ...)
130129
```python
131130
from pynumdiff.optimize import optimize
132131

133-
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], ...},
134133
tvgamma=tvgamma, # hyperparameter, defaults to None if dxdt_truth given
135134
dxdt_truth=None) # or give ground truth data, in which case tvgamma unused
136135
print('Optimal parameters: ', params)
137136
x_hat, dxdt_hat = method(x, dt, **params)
138137
```
138+
If no `search_space` is given, a default one is used.
139+
139140
* Advanced usage: automated parameter selection through multi-objective optimization using a user-defined cutoff frequency
140141
```python
141142
# 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
159160

160161
* Larger values of `tvgamma` produce smoother derivatives
161162
* 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`.
163164
* 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)`
164165

165166
### Running the tests

0 commit comments

Comments
 (0)