This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from collections import Counter | |
def detect_outliers(df, n, features): | |
""" | |
Takes a dataframe df of features and returns a list of the indices | |
corresponding to the observations containing more than n outliers according | |
to the Tukey method. | |
""" |