Skip to content

Commit

Permalink
outlier correction mp
Browse files Browse the repository at this point in the history
  • Loading branch information
sronilsson committed Nov 9, 2024
1 parent 0901665 commit 0860440
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions simba/mixins/timeseries_features_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -1849,7 +1849,7 @@ def mean_squared_jerk(x: np.ndarray,
time_step: float,
sample_rate: float) -> float:

"""
r"""
Calculate the Mean Squared Jerk (MSJ) for a given set of 2D positions over time.
The Mean Squared Jerk is a measure of the smoothness of movement, calculated as the mean of
Expand Down Expand Up @@ -1933,7 +1933,8 @@ def sliding_mean_squared_jerk(x: np.ndarray,

@staticmethod
def linearity_index(x: np.ndarray) -> float:
"""

r"""
Calculates the straightness (linearity) index of a path.
.. image:: _static/img/linearity_index.webp
Expand Down Expand Up @@ -2009,7 +2010,8 @@ def sliding_linearity_index(x: np.ndarray,

@staticmethod
def entropy_of_directional_changes(x: np.ndarray, bins: int = 16) -> float:
"""

r"""
Computes the Entropy of Directional Changes (EDC) of a path represented by an array of points.
The output value ranges from 0 to log2(bins).
Expand Down Expand Up @@ -2104,7 +2106,8 @@ def sliding_entropy_of_directional_changes(x: np.ndarray,

@staticmethod
def path_curvature(x: np.ndarray, agg_type: Literal['mean', 'median', 'max'] = 'mean') -> float:
"""

r"""
Calculate aggregate curvature of a 2D path given an array of points.
The curvature quantifies the change in direction along the path. Higher curvature values indicate sharper turns,
Expand Down

0 comments on commit 0860440

Please sign in to comment.