andgoldschmidt / derivative

Optimal numerical differentiation of noisy time series data in python.
https://derivative.readthedocs.io/en/latest/
Other
56 stars 8 forks source link

Support for multidimensional data #21

Closed jnahlers closed 2 years ago

jnahlers commented 2 years ago

Hi there, great library. Are you thinking of adding support for multivariate data at all?

andgoldschmidt commented 2 years ago

The project is focused on providing access to a variety of numerical differentiation schemes for time series data. This time series data can have any number of dimensions, and, for example, two-dimensional movies can be flattened and treated as a time series of vectors.

Alternatively, you can imagine adapting this to two-dimensional data without time. If you want a directional derivative, $D_u f(x, y) = \nabla f \cdot u$, then you can first treat your two-dimensional data as snapshots of the y-axis traversing the x-axis. This computes $\partial_x$. Do the opposite for $\partial_y$.

Let me know if I have understood you correctly.