def _compute_cross_validated_residual_here(self, xi, yi, smooth_here):
        """
        Compute cross validated residual.

        This is the absolute residual from Eq. 9. in [1]
        """
        denom = (1.0 - 1.0 / self.window_size -
                 (xi - self._mean_x_in_window) ** 2 /
                 self._variance_in_window)
        if denom == 0.0:
            # can happen  with small data sets
            return 1.0
        return abs((yi - smooth_here) / denom)
def _compute_cross_validated_residual_here ( self , xi , yi , smooth_here ) : denom = ( 1.0 - 1.0 / self . window_size - ( xi - self . _mean_x_in_window ) ** 2 / self . _variance_in_window ) if denom == 0.0 : return 1.0 return abs ( ( yi - smooth_here ) / denom )
Compute cross validated residual.

        This is the absolute residual from Eq. 9. in [1]