def _fixed_threshold(errors, k=4):
    """Calculate the threshold.
    The fixed threshold is defined as k standard deviations away from the mean.
    Args:
        errors (ndarray):
            Array of errors.
    Returns:
        float:
            Calculated threshold value.
    """
    mean = errors.mean()
    std = errors.std()

    return mean + k * std