INNER CODE UNIT · Python

identify_outliers

etchdroid/etchdroid · misc/ostream-trace-log-analyzer.py:104

def identify_outliers(df):
    outlier_indices = []
    for event_name, group in df.groupby('event'):
        # Q1 = group['time_delta_s'].quantile(0.25)
        # Q3 = group['time_delta_s'].quantile(0.75)
        # IQR = Q3 - Q1
        # threshold = 1.9 * IQR
        outliers = group[group['time_delta_s'] > 0.3]
        outlier_indices.extend(outliers.index.tolist())
    return outlier_indices


outlier_indices = identify_outliers(deltas)
outliers = deltas.loc[outlier_indices]

# Plot time deltas with outliers annotated
plt.figure(figsize=(12, 6))
for event_name, group in deltas.groupby('event'):

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…