Skip to content

DATASET

SRIJA DE CHOWDHURY edited this page Dec 29, 2025 · 1 revision

💾 Dataset Information

Comprehensive Data Documentation

Samples Features Quality Privacy


📊 Dataset Overview

📈 Total Samples

10,000+

Diverse dataset

🔢 Features

50+

Multi-dimensional

⚖️ Class Balance

40: 60

Weighted training

Data Quality

95%+

Minimal missing


🗂️ Data Structure

Dataset Split

pie title Dataset Distribution
    "Training (80%)" : 8000
    "Testing (20%)" : 2000
Loading
Split Samples Percentage Purpose
🎓 Training 8,000 80% Model training
🧪 Testing 2,000 20% Final evaluation
Validation 1,600 20% of train Hyperparameter tuning

📋 Feature Categories

1️⃣ Demographic Features (5 features)

Feature Type Values
👤 Age Numerical 18-80
⚧️ Gender Categorical M/F/Other
🎓 Education Ordinal 1-5 scale
Feature Type Values
💼 Employment Categorical 6 categories
💑 Marital Status Categorical 5 categories
📊 View Distribution Stats
Age Distribution: 
  Mean: 42.3 years
  Median: 41.0 years
  Std Dev: 15.2 years
  
Gender Distribution:
  Female: 52%
  Male: 45%
  Other: 3%
  
Education Distribution:
  High School: 25%
  Some College: 30%
  Bachelor's: 28%
  Graduate: 17%

2️⃣ Behavioral Features (15 features)

😴 Sleep Patterns

  • Sleep duration (hours)
  • Sleep quality (1-10)
  • Sleep disturbances

🏃 Activity Levels

  • Physical exercise (hrs/week)
  • Activity intensity
  • Sedentary time

🍽️ Lifestyle

  • Eating regularity
  • Diet quality score
  • Substance use

📱 Social Behavior

  • Social interaction frequency
  • Screen time (hours)
  • Communication patterns

3️⃣ Symptom Features (20 features)

Category Features Scale
😊 Mood Sadness, Anxiety, Irritability 1-10
Energy Fatigue, Motivation, Vitality 1-10
🧠 Cognitive Concentration, Memory, Decision-making 1-10
🎯 Interest Hobbies, Social, Work 1-10
💭 Thoughts Self-esteem, Hopelessness, Suicidal ideation 1-10

⚠️ Note: All symptom data is self-reported and anonymized


4️⃣ Clinical Features (10 features)

📋 Medical History
  ├── Previous diagnoses
  ├── Current medications
  ├── Therapy history
  └── Hospitalizations
  
👨‍👩‍👧 Family History
  ├── Family mental health
  ├── Genetic factors
  └── Family support
  
📅 Recent Events
  ├── Life stressors
  ├── Trauma exposure
  └── Major changes

📊 Target Variable

Depression Indicator

🎯 Class Distribution

Class 0 (No Depression): 60% ████████
Class 1 (Depression):    40% █████

| Class | Label | Samples | Percentage | |: -----:|-------|: -------:|: ----------:| | 0 | No Depression | 6,000 | 60% | | 1 | Depression | 4,000 | 40% | | Total | - | 10,000 | 100% |

💡 Class Imbalance Handling: We use class weights (1. 0 vs 1.5) during training to ensure fair learning


🔧 Data Preprocessing

Pipeline Overview

graph LR
    A[📥 Raw Data] --> B{Data Type? }
    B -->|Numerical| C[📊 Impute Median]
    B -->|Categorical| D[🏷️ Impute Mode]
    C --> E[📏 Standard Scaling]
    D --> F[🔢 One-Hot Encoding]
    E --> G[✨ Feature Engineering]
    F --> G
    G --> H[✅ Clean Data]
    
    style A fill:#ffebee
    style H fill:#e8f5e9
Loading

Preprocessing Steps

| Step | Action | Details | |: ----:|--------|---------| | 1️⃣ | Data Cleaning | Remove duplicates, fix typos | | 2️⃣ | Missing Values | Median/mode imputation | | 3️⃣ | Outlier Detection | IQR method, cap at 3σ | | 4️⃣ | Encoding | One-hot for categorical | | 5️⃣ | Scaling | StandardScaler for numerical | | 6️⃣ | Feature Engineering | Polynomial features, interactions | | 7️⃣ | Validation | Check ranges, distributions |

💻 View Preprocessing Code
from sklearn.preprocessing import StandardScaler, OneHotEncoder
from sklearn. impute import SimpleImputer
from sklearn.compose import ColumnTransformer
from sklearn.pipeline import Pipeline

# Define feature types
numerical_features = ['age', 'sleep_hours', 'activity_level', ...]
categorical_features = ['gender', 'education', 'employment', ...]

# Numerical pipeline
numerical_pipeline = Pipeline([
    ('imputer', SimpleImputer(strategy='median')),
    ('scaler', StandardScaler())
])

# Categorical pipeline
categorical_pipeline = Pipeline([
    ('imputer', SimpleImputer(strategy='most_frequent')),
    ('encoder', OneHotEncoder(drop='first', sparse=False))
])

# Combine pipelines
preprocessor = ColumnTransformer([
    ('num', numerical_pipeline, numerical_features),
    ('cat', categorical_pipeline, categorical_features)
])

# Fit and transform
X_processed = preprocessor.fit_transform(X_raw)

📈 Data Statistics

Missing Data Analysis

Feature Category Missing Rate Action
👥 Demographic 1.2% ✅ Impute
🏃 Behavioral 4.7% ✅ Impute
😊 Symptoms 2.3% ✅ Impute
🔬 Clinical 8.1% ✅ Impute
Overall <5% ✅ Good

Feature Statistics

📊 Numerical Features Summary
Feature Mean Std Min Max Median
Age 42.3 15.2 18 80 41
Sleep Hours 6.5 1.8 2 12 7
Activity (hrs/wk) 3.2 2.4 0 20 3
Mood Score 5.4 2.1 1 10 5
Energy Level 5.8 2.3 1 10 6
🏷️ Categorical Features Summary
Feature Most Common Frequency Categories
Gender Female 52% 3
Education Some College 30% 5
Employment Full-time 45% 6
Marital Status Married 42% 5

🔒 Privacy & Ethics

Data Protection

🛡️ Security Measures

  • ✅ Full anonymization
  • ✅ No PII (Personal Identifiable Information)
  • ✅ Encrypted storage
  • ✅ Secure transmission (HTTPS)
  • ✅ Access controls

📜 Compliance

  • ✅ HIPAA compliant
  • ✅ GDPR compliant
  • ✅ Ethical review board approved
  • ✅ Informed consent obtained
  • ✅ Right to deletion honored

🔒 Privacy Guarantee: All data is de-identified and aggregated. No individual can be identified from this dataset.

Ethical Considerations

✅ Informed Consent - All participants provided consent
✅ Anonymization - All PII removed before processing  
✅ Secure Storage - Encrypted databases and backups
✅ Limited Access - Only authorized researchers
✅ Bias Testing - Regular fairness audits
✅ Transparency - Open documentation

📥 Data Access

For Researchers

# Load sample data
from depression_predictor.data import load_sample_data

# Get 100 anonymized samples
sample_data = load_sample_data(n_samples=100)
print(sample_data.head())

Data Dictionary

📖 Download Data Dictionary

Available formats:

  • 📄 PDF: docs/data_dictionary.pdf
  • 📊 CSV: docs/data_dictionary.csv
  • 📝 JSON: docs/data_dictionary.json
# Download data dictionary
wget https://github.com/willow788/Advanced-depression-predictor-model/raw/main/docs/data_dictionary.pdf

🔄 Data Updates

Update Schedule

Frequency Action Last Update
📅 Quarterly Add new samples 2025-Q4
📆 Monthly Quality checks Dec 2025
🔄 Continuous Monitor drift Ongoing

Version History

Version Date Samples Changes
v1.2 Dec 2025 10,000 Current version
v1.1 Sep 2025 8,500 Added 500 samples
v1.0 Jun 2025 8,000 Initial release

📊 Data Quality Metrics

| Metric | Score | Status | |--------|: -----:|:------:| | Completeness | 95.2% | ✅ Excellent | | Validity | 98.7% | ✅ Excellent | | Consistency | 97.3% | ✅ Excellent | | Timeliness | 93.1% | ✅ Good | | Accuracy | 96.5% | ✅ Excellent | | Overall Quality | 96.2% | ✅ Excellent |


🎯 Dataset Limitations

⚠️ Important Considerations

  • 📊 Sample Bias: Dataset may not represent all populations equally
  • 🕐 Temporal: Data collected over 2-year period (may not reflect current trends)
  • 🌍 Geographic: Primarily North American samples
  • 🗣️ Language: English-speaking participants only
  • 📝 Self-Reported: Symptoms are self-assessed, not clinically verified

📚 Related Documentation

Resource Description
🏗️ Model Architecture How features are used
📊 Performance Metrics Model results
💻 Usage Guide How to load data
FAQ Common data questions

⬅️ Back to Architecture | ➡️ Next: Usage Guide


Data privacy and ethics are our top priorities 🔒

Clone this wiki locally