deepof.utils.full_outlier_mask

deepof.utils.full_outlier_mask(experiment: DataFrame, likelihood: DataFrame, likelihood_tolerance: float, exclude: str, lag: int, n_std: int, mode: str) DataFrame

Iterate over all body parts of experiment, and outputs a dataframe where all x, y positions are replaced by a boolean mask, where True indicates an outlier.

Parameters:
  • experiment (pd.DataFrame) – Data frame with time series representing the x, y positions of every body part

  • likelihood (pd.DataFrame) – Data frame with likelihood data per body part as extracted from deeplabcut

  • likelihood_tolerance (float) – Minimum tolerated likelihood, below which an outlier is called

  • exclude (str) – Body part to exclude from the analysis (to concatenate with bpart alignment)

  • lag (int) – Size of the convolution window used to compute the moving average

  • n_std (int) – Number of standard deviations over the moving average to be considered an outlier

  • mode (str) – If “and” (default) both x and y have to be marked in order to call an outlier. If “or”, one is enough.

Returns:

Mask over all body parts in experiment. True indicates an outlier

Return type:

full_mask (pd.DataFrame)