Skip to content

Instantly share code, notes, and snippets.

View zhanyeye's full-sized avatar

zhan yeye zhanyeye

View GitHub Profile
@joseph-allen
joseph-allen / outlier_detection
Created December 29, 2017 14:22
Tukey method outlier detection
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.
"""