2 Exploratory Data Analysis (EDA)
This guide is based on the excellent course How to Win a Data Science Competition: Learn from Top Kagglers by Yandex and MIPT. I’ve organized these notes to help fellow data scientists master the art of EDA.
2.1 What is EDA?
EDA is the critical first step in any data science project. It helps us:
- Understand the data deeply
- Build intuition about patterns and relationships
- Generate hypotheses for feature engineering
- Find insights that inform modeling decisions
2.2 The Power of Visualization
One of the most powerful EDA tools is visualization. Let’s look at a fascinating example from a Kaggle competition:
In a promotion prediction competition, simple visualization revealed: - Two key features: promos sent and promos used - A direct relationship between their difference and the target - This insight led to 81% accuracy without complex modeling!
# Example visualization code
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
def plot_promo_relationship(df):
plt.figure(figsize=(10, 6))
plt.scatter('promos_sent', 'promos_used', data=df)
plt.xlabel('Number of Promos Sent')
plt.ylabel('Number of Promos Used')
plt.title('Promo Usage Pattern')
plt.show()2.3 Building Intuition
2.3.1 1. Domain Knowledge Acquisition
Before diving into analysis, focus on:
- Understanding the business goal
- Researching similar problems
- Learning industry-specific metrics
- Reading relevant documentation
2.3.2 2. Data Validation
- Value ranges (e.g., age between 0-120)
- Logical relationships (clicks ≤ impressions)
- Missing value patterns
- Outliers and anomalies
2.3.3 3. Understanding Data Generation
Key considerations:
- Sampling methodology
- Train/test split rationale
- Time-based patterns
- Data collection process
“In data science, there are no outliers - only opportunities to understand your data better.”
2.5 Next Steps
Continue to Part 2: Feature Preprocessing and Generation, where we’ll explore how to transform raw data into meaningful features.
2.6 References
Reuse
Citation
@online{goni2022,
author = {Goni, Hasan},
title = {Data {Science} {Steps} to {Follow} - 01},
date = {2022-11-19},
langid = {en}
}