Skip to content

Commit

Permalink
timeseries features
Browse files Browse the repository at this point in the history
  • Loading branch information
sronilsson committed Nov 7, 2024
1 parent 2bd9b6f commit 3dd30f4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Binary file added docs/_static/img/spatial_density.webp
Binary file not shown.
4 changes: 4 additions & 0 deletions simba/mixins/timeseries_features_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -2154,6 +2154,10 @@ def spatial_density(x: np.ndarray,
areas where points are closely packed, which can suggest slower movement, lingering, or frequent changes in
direction. Lower density values suggest more spread-out points, often associated with faster, more linear movement.
.. image:: _static/img/spatial_density.webp
:width: 400
:align: center
:param np.ndarray x: A 2D array of shape (N, 2), where N is the number of points and each point has two spatial coordinates.
:param float radius: The radius within which to count neighboring points around each point. Defines the area of interest around each trajectory point.
:return: A single float value representing the average spatial density of the trajectory.
Expand Down

0 comments on commit 3dd30f4

Please sign in to comment.