original_docstring: Detect outliers using the Mahalanbis distince in high dimension.
  
          Assuming a multivariate normal distribution of the data with K
          variables, the Mahalanobis distance follows a chi-squared distribution
          with K degrees of freedom.  For this reason, the cut-off is defined by
          the square root of the Chi^2 percent pointwise function.
  
          :param significance: 1 - the Chi^2 percent point function (inverse of
                               cdf / percentiles) outlier threshold; reasonable
                               values include 2.5%, 1%, 0.01%); if `None` use
                               :obj:`threshold` or :obj:`proportion`
  
          :return: indexes in to :obj:`data` rows (indexes of a dataframe) of the
                   outliers
  
          
docstring: Detect outliers using the Mahalanbis distince in high dimension.
  Assuming a multivariate normal distribution of the data with K
  variables, the Mahalanobis distance follows a chi-squared distribution
  with K degrees of freedom.  For this reason, the cut-off is defined by
  the square root of the Chi^2 percent pointwise function.
docstring_tokens: Detect outliers using the Mahalanbis distince in high dimension . Assuming a multivariate normal distribution of the data with K variables the Mahalanobis distance follows a chi - squared distribution with K degrees of freedom . For this reason the cut - off is defined by the square root of the Chi^2 percent pointwise function .
code: def mahalanobis(self, significance: float = 0.001) -> np.ndarray:
          """Detect outliers using the Mahalanbis distince in high dimension.
  
          Assuming a multivariate normal distribution of the data with K
          variables, the Mahalanobis distance follows a chi-squared distribution
          with K degrees of freedom.  For this reason, the cut-off is defined by
          the square root of the Chi^2 percent pointwise function.
  
          :param significance: 1 - the Chi^2 percent point function (inverse of
                               cdf / percentiles) outlier threshold; reasonable
                               values include 2.5%, 1%, 0.01%); if `None` use
                               :obj:`threshold` or :obj:`proportion`
  
          :return: indexes in to :obj:`data` rows (indexes of a dataframe) of the
                   outliers
  
          """
          # shape: (R, C)
          arr: np.ndarray = self.numpy
          # M-Distance, shape: (R,)
          x_minus_mu: pd.DataFrame = arr - np.mean(arr, axis=0)
          # covariance, shape: (C, C)
          cov: np.ndarray = np.cov(arr.T)
          # inverse covariance, shape: (C, C)
          inv_cov: np.ndarray = np.linalg.inv(cov)
          # shape: (R, C)
          left_term: np.ndarray = np.dot(x_minus_mu, inv_cov)
          # shape: (R, R)
          dist: np.ndarray = np.dot(left_term, x_minus_mu.T)
          # shape (R,)
          md: np.ndarray = np.sqrt(dist.diagonal())
  
          C = self._set_chi_threshold(significance)
          return self._select_indicies(md, C)
code_tokens: def mahalanobis ( self , significance : float = 0.001 ) -> np . ndarray : arr : np . ndarray = self . numpy x_minus_mu : pd . DataFrame = arr - np . mean ( arr , axis = 0 ) cov : np . ndarray = np . cov ( arr . T ) inv_cov : np . ndarray = np . linalg . inv ( cov ) left_term : np . ndarray = np . dot ( x_minus_mu , inv_cov ) dist : np . ndarray = np . dot ( left_term , x_minus_mu . T ) md : np . ndarray = np . sqrt ( dist . diagonal ( ) ) C = self . _set_chi_threshold ( significance ) return self . _select_indicies ( md , C )
short_docstring: Detect outliers using the Mahalanbis distince in high dimension.
short_docstring_tokens: Detect outliers using the Mahalanbis distince in high dimension .
comment: """Detect outliers using the Mahalanbis distince in high dimension.
  
          Assuming a multivariate normal distribution of the data with K
          variables, the Mahalanobis distance follows a chi-squared distribution
          with K degrees of freedom.  For this reason, the cut-off is defined by
          the square root of the Chi^2 percent pointwise function.
  
          :param significance: 1 - the Chi^2 percent point function (inverse of
                               cdf / percentiles) outlier threshold; reasonable
                               values include 2.5%, 1%, 0.01%); if `None` use
                               :obj:`threshold` or :obj:`proportion`
  
          :return: indexes in to :obj:`data` rows (indexes of a dataframe) of the
                   outliers
  
          """$SEP$# shape: (R, C)$SEP$# M-Distance, shape: (R,)$SEP$# covariance, shape: (C, C)$SEP$# inverse covariance, shape: (C, C)$SEP$# shape: (R, C)$SEP$# shape: (R, R)$SEP$# shape (R,)