W12
Advanced 3 sessions • 6 hours Python

Week 12: Capstone Project Guide

.ipynb
Follow along in JupyterDownload the complete Week 12 notebook — every code example ready to run.
Download Notebook

Integrating All Data Science Fundamentals into a Comprehensive Project

Week 12 Overview

Week 12 is your culminating experience - a comprehensive capstone project that integrates everything you've learned throughout the 12-week course. This is your opportunity to: ✓ Demonstrate mastery of statistical analysis ✓ Apply machine learning techniques ✓ Show real-world data science skills ✓ Build a professional portfolio piece ✓ Practice communication of technical findings PROJECT GOALS:

  • End-to-End Analysis: From raw data to insights
  • Multiple Approaches: Statistical AND machine learning
  • Professional Quality: Code, documentation, presentation
  • Business Impact: Translate technical findings to business value

CAPSTONE PROJECT STRUCTURE:

  • Choose or receive dataset
  • Exploratory Data Analysis (Weeks 1-5)
  • Statistical Analysis (Week 6-8)
  • Machine Learning (Weeks 9-10)
  • Time Series (if applicable, Week 11)
  • Professional Report & Presentation
  • Code Repository

DELIVERABLES:

  • Cleaned Dataset (with documentation)
  • Exploratory Data Analysis Report
  • Statistical Analysis Results
  • Machine Learning Models
  • Code (Well-commented, reproducible)
  • Professional Report (5-10 pages)
  • Presentation (10-15 minutes)
  • GitHub Repository (if possible)

By the end of Week 12, you will:

  • Complete a full data science project
  • Have a professional portfolio piece
  • Demonstrate all course competencies
  • Present findings professionally
  • Understand end-to-end workflow

This week covers:

  • Project planning and scope
  • Best practices for reproducible research
  • Professional documentation
  • Presentation skills
  • Evaluation and grading criteria

1. Capstone Project Framework

1.1 Project Phases

PHASE 1: PLANNING AND SETUP (Days 1-2)

Step 1: Choose or Receive Dataset
- Option A: Provided dataset from instructor
- Option B: Self-selected from Kaggle/UCI/government sources
- Option C: Your own collected data

Dataset Criteria:
✓ 100-10,000+ observations (enough data)
✓ 5-30+ features (interesting complexity)
✓ Mix of data types (continuous, categorical)
✓ Real-world problem (not toy dataset)
✓ Approachable scope (finishable in week)

Examples:
- Housing price prediction
- Customer churn prediction
- Iris classification (classic)
- Titanic survival prediction
- Crime data analysis by city
- Stock price forecasting
- Customer satisfaction survey
- Medical diagnosis prediction

Step 2: Define Problem Statement
- What's the business question?
- What decisions will data inform?
- Who's the audience (stakeholders)?
- What's success look like?

Template:
"The goal of this project is to [prediction/classification/analysis]
in order to [business objective]. We will use [data source]
containing [n] observations and [p] features to [specific task]."

Step 3: Exploratory Analysis Plan
- What patterns to look for?
- Which visualizations to create?
- Hypotheses to test?

Step 4: Set Up Repository
✓ Create GitHub repository (optional but recommended)
✓ Folder structure:
/data (raw and cleaned datasets)
/notebooks (Jupyter notebooks)
/scripts (Python modules)
/results (outputs, visualizations)
/report (final documentation)
✓ README.md explaining project
✓ .gitignore file (exclude large files)

PHASE 2: EXPLORATORY DATA ANALYSIS (Days 2-3)

Step 1: Data Loading and Initial Inspection
```python
import pandas as pd
import numpy as np

# Load data
data = pd.read_csv('data/raw/dataset.csv')

# Initial checks
print(f"Shape: {data.shape}")
print(f"\nData types:\n{data.dtypes}")
print(f"\nMissing values:\n{data.isnull().sum()}")
print(f"\nBasic statistics:\n{data.describe()}")
print(f"\nFirst rows:\n{data.head()}")
```

Step 2: Data Cleaning
- Identify and handle missing values
- Remove duplicates
- Fix data type inconsistencies
- Detect and address outliers
- Standardize formatting (dates, categories)

Step 3: Exploratory Visualizations
- Histograms for distributions
- Box plots for outliers
- Scatterplots for relationships
- Heatmaps for correlations
- Time series plots if temporal

Step 4: Summary Statistics
- Descriptive statistics
- Correlation analysis
- Grouped statistics
- Patterns and anomalies

Step 5: Document Findings
- What's surprising?
- Data quality issues?
- Missing patterns?
- Initial hypotheses?

PHASE 3: STATISTICAL ANALYSIS (Days 4-5)

Choose and implement 3-5 relevant statistical tests:

Example 1 (Classification):
- Test difference between groups using t-test/ANOVA
- Chi-square for categorical relationships
- Effect sizes and confidence intervals

Example 2 (Regression):
- Linear regression with multiple predictors
- Test assumptions (normality, linearity)
- Interpret coefficients and R²

Example 3 (Relationships):
- Correlation analysis
- Test for statistical significance
- Spurious correlations check

PHASE 4: MACHINE LEARNING (Days 5-6)

Build Multiple Models:
1. Baseline model (simple, easy to interpret)
2. Intermediate model (balanced)
3. Advanced model (complex, high accuracy)

Workflow:
- Data preprocessing (scaling, encoding, feature engineering)
- Train/test split
- Model training
- Hyperparameter tuning
- Model evaluation
- Feature importance analysis

Compare Models:
- Accuracy, precision, recall, F1 (classification)
- RMSE, R², MAE (regression)
- Cross-validation scores
- ROC curves if applicable

PHASE 5: SYNTHESIS AND INTERPRETATION (Days 6-7)

Integration:
- How do statistical findings relate to ML?
- Do they tell the same story?
- Any contradictions to resolve?
- What patterns emerge?

Deeper Analysis:
- Feature importance from multiple models
- Business implications
- Practical significance (not just p-values)
- Actionable insights

PHASE 6: DOCUMENTATION AND PRESENTATION (Days 7-8)

Professional Report:
1. Executive Summary (1 page)
2. Problem Statement (½ page)
3. Data Description (1 page)
4. Methodology (1 page)
5. Results (2-3 pages)
6. Conclusions and Recommendations (1 page)
7. Appendix (code, tables)

Presentation:
1. Opening: Problem and motivation (2 min)
2. Data overview (2 min)
3. Methods and approach (3 min)
4. Key findings (5 min)
5. Conclusions and recommendations (2 min)
6. Q&A (1 min)

PHASE 7: POLISH AND SUBMIT (Day 8)

Final Checklist:
- Code is clean and commented
- All outputs reproducible
- Visualizations professional
- Report proofread
- Presentation rehearsed
- Repository organized
- README complete

1.2 Best Practices for Reproducible Research

REPRODUCIBILITY FUNDAMENTALS:

"Code and analysis should produce same results if re-run on same data"

WHY REPRODUCIBILITY MATTERS:
- Verify results are correct
- Build trust in findings
- Allow others to extend your work
- Professional standard
- Catches bugs and errors

PRACTICES:

1. RANDOM SEEDS
```python
import random
import numpy as np

# Set seed once at beginning of notebook
random.seed(42)
np.random.seed(42)

# Then all random operations are reproducible
train, test = train_test_split(data, test_size=0.2) # Same split every time
model = RandomForestClassifier(random_state=42) # Reproducible model
```

2. DOCUMENT ENVIRONMENT
Create requirements.txt:
```
pandas==1.5.2
numpy==1.23.5
scikit-learn==1.2.0
matplotlib==3.6.3
jupyter==1.0.0
statsmodels==0.13.5
```

Or use environment file:
```
conda env export > environment.yml
```

3. VERSION CONTROL
- Use Git to track changes
- Meaningful commit messages
- Tag versions: v1.0, v2.0, etc.
- Document major changes

4. COMMENTS AND DOCUMENTATION
```python
# Bad:
df['new_col'] = df['col1'] * 2 + df['col2']

# Good:
# Calculate customer lifetime value as:
# 2 × average purchase + total transactions
df['customer_lifetime_value'] = df['avg_purchase'] * 2 + df['total_transactions']
```

5. FUNCTION ABSTRACTION
```python
# Instead of repeating code:
def process_column(data, column, method='zscore'):
"""
Standardize a column using specified method.

Parameters:
-----------
data : DataFrame
column : str, column name
method : str, 'zscore', 'minmax', or 'log'

Returns:
--------
DataFrame with processed column
"""
if method == 'zscore':
mean = data[column].mean()
std = data[column].std()
data[column] = (data[column] - mean) / std
return data
```

6. NOTEBOOK ORGANIZATION
```
1. Import all libraries at top
2. Set random seeds
3. Load data
4. Section 1: Data Cleaning
5. Section 2: EDA
6. Section 3: Statistical Analysis
7. Section 4: ML Models
8. Section 5: Summary and Conclusions
```

7. DATA HANDLING
- Keep raw data separate and read-only
- Save intermediate datasets with version
- Document data transformations
- Track what data you used

8. ASSUMPTIONS DOCUMENTATION
```python
# Clearly state assumptions
print("ASSUMPTIONS:")
print("1. Missing data (5%) removed via listwise deletion")
print("2. Outliers (|z| > 3) removed: 12 observations")
print("3. Features scaled using z-score normalization")
print("4. Train/test split: 80/20, random_state=42")
```

9. ERROR HANDLING
```python
try:
model.fit(X_train, y_train)
except Exception as e:
print(f"Model fitting failed: {e}")
# Handle error appropriately
```

10. TESTING (Optional but Professional)
```python
def test_data_loading():
"""Test that data loads correctly"""
data = pd.read_csv('data/raw/dataset.csv')
assert data.shape[0] > 0, "No data loaded"
assert data.shape[1] > 0, "No features loaded"

def test_preprocessing():
"""Test preprocessing function"""
data = load_data()
processed = preprocess(data)
assert not processed.isnull().any().any(), "Missing values remain"
```

BEST PRACTICES CHECKLIST:

Before Submission:
☑ Code runs without errors
☑ Results reproducible (set seeds)
☑ All data paths relative (not hardcoded)
☑ Functions documented with docstrings
☑ Comments explain "why", not "what"
☑ No hardcoded values (use variables)
☑ Libraries documented in requirements.txt
☑ Data processing documented
☑ Assumptions clearly stated
☑ Visualizations labeled clearly
☑ Code follows naming conventions
☑ Variables have meaningful names
☑ Notebooks organized with headings
☑ README explains how to run

2. Comprehensive Project Checklist

PRE-PROJECT (Before you start): ☑ Choose or receive dataset ☑ Understand problem statement ☑ Set up folder structure ☑ Create GitHub repository (optional) ☑ Install required packages EXPLORATORY DATA ANALYSIS: ☑ Load data and check shape ☑ Identify data types ☑ Check for missing values ☑ Identify outliers ☑ Calculate descriptive statistics ☑ Create distribution plots (histograms) ☑ Create relationship plots (scatter plots) ☑ Calculate correlations ☑ Create correlation heatmap ☑ Identify potential data quality issues ☑ Document all findings DATA CLEANING: ☑ Handle missing values (document strategy) ☑ Remove or fix duplicates ☑ Standardize data types ☑ Fix data inconsistencies ☑ Handle outliers (investigate, document) ☑ Transform variables if needed ☑ Create clean dataset ☑ Document all transformations FEATURE ENGINEERING: ☑ Create new features from existing ones ☑ Encode categorical variables ☑ Scale/normalize continuous variables ☑ Handle categorical variables (one-hot, label) ☑ Deal with multicollinearity ☑ Select important features ☑ Document all feature engineering steps STATISTICAL ANALYSIS: ☑ Test for normality (Shapiro-Wilk) ☑ Test for equal variance (Levene's) ☑ Check independence of observations ☑ Identify relevant statistical tests (3-5 tests) ☑ Run hypothesis tests ☑ Calculate effect sizes ☑ Interpret p-values and confidence intervals ☑ Document assumptions checked ☑ Create summary statistics table ☑ Report findings professionally MACHINE LEARNING: ☑ Split data into train/test (time-based if time series) ☑ Build baseline model (simple) ☑ Build intermediate model ☑ Build advanced model ☑ Evaluate each model (multiple metrics) ☑ Perform hyperparameter tuning ☑ Use cross-validation ☑ Analyze feature importance ☑ Create ROC curves if applicable ☑ Compare models side-by-side ☑ Select best model SYNTHESIS: ☑ Connect statistical findings to ML results ☑ Identify key insights ☑ Determine business implications ☑ Quantify impact (if possible) ☑ Document limitations ☑ Note areas for future work DOCUMENTATION: ☑ Write executive summary ☑ Document problem statement ☑ Describe data clearly ☑ Explain methodology ☑ Present results with visualizations ☑ Draw conclusions ☑ Make recommendations ☑ Add appendix with code/tables PRESENTATION: ☑ Create slides (5-10 slides) ☑ Include key visualizations ☑ Explain findings clearly ☑ Keep technical level appropriate ☑ Practice presentation ☑ Prepare for questions ☑ Have backup slides CODE QUALITY: ☑ All code commented ☑ Functions have docstrings ☑ Variable names are meaningful ☑ No hardcoded paths (use relative paths) ☑ Random seeds set for reproducibility ☑ No print statements for debugging ☑ Code follows consistent style ☑ Error handling where appropriate ☑ Code is DRY (Don't Repeat Yourself) REPOSITORY: ☑ README.md explains project ☑ Folder structure is clear ☑ .gitignore excludes large files ☑ requirements.txt or environment.yml included ☑ All necessary files included ☑ No personal information in data ☑ Large files not committed to Git FINAL CHECKS: ☑ All outputs reproducible ☑ Code runs without errors ☑ Visualizations are clear and labeled ☑ Report is professional ☑ Spelling and grammar checked ☑ Presentation is prepared ☑ Submitted on time ☑ All deliverables included

3. Example Project Workflow

PROJECT EXAMPLE: PREDICTING CUSTOMER CHURN

PHASE 1: PLANNING

Problem Statement:
"Identify which customers are likely to churn (leave) so we can
implement retention strategies. Success means building a model
that predicts churn with 80%+ accuracy."

Dataset:
- 7,043 customers
- 21 features (demographics, usage, billing)
- Target: Churn (Yes/No)

Success Criteria:
- Accuracy > 80%
- Precision > 75% (minimize false positives)
- Identify top 3 churn drivers
- Actionable business recommendations

PHASE 2: EXPLORATION

Initial Exploration:
```python
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns

data = pd.read_csv('data/raw/customer_churn.csv')
print(data.shape) # (7043, 21)
print(data.info())
print(data.describe())
print(data['Churn'].value_counts())
# Output: No: 5174 (73.5%), Yes: 1869 (26.5%)

# Visualize
plt.figure(figsize=(12, 5))
plt.subplot(1, 2, 1)
data['Churn'].value_counts().plot(kind='bar')
plt.title('Churn Distribution')

plt.subplot(1, 2, 2)
data.groupby('Churn')['Monthly_Charges'].mean().plot(kind='bar')
plt.title('Average Monthly Charges by Churn')
plt.show()

# Check missing data
print(data.isnull().sum())
```

Key Findings:
- Imbalanced target (26.5% churn)
- 3 missing values in TotalCharges
- Churn customers have higher monthly charges
- Mix of continuous and categorical features

PHASE 3: DATA CLEANING

```python
# Handle missing values
data['TotalCharges'] = pd.to_numeric(data['TotalCharges'], errors='coerce')
data = data.dropna() # Remove 3 rows with missing TotalCharges

# Remove duplicates
data = data.drop_duplicates()

# Encode categorical variables
categorical_cols = ['Gender', 'InternetService', 'OnlineSecurity']
for col in categorical_cols:
data[col] = pd.Categorical(data[col]).codes

# Scale continuous variables
from sklearn.preprocessing import StandardScaler
scaler = StandardScaler()
continuous_cols = ['Age', 'Monthly_Charges', 'TotalCharges']
data[continuous_cols] = scaler.fit_transform(data[continuous_cols])

print(f"Cleaned data shape: {data.shape}")
data.to_csv('data/processed/churn_cleaned.csv', index=False)
```

PHASE 4: STATISTICAL ANALYSIS

```python
from scipy.stats import chi2_contingency, ttest_ind

# Test 1: Chi-square for gender vs churn
table = pd.crosstab(data['Gender'], data['Churn'])
chi2, pval, dof, expected = chi2_contingency(table)
print(f"Gender vs Churn: χ²={chi2:.2f}, p={pval:.4f}")
# Result: p < 0.05, significant relationship

# Test 2: T-test for age vs churn
churn_yes = data[data['Churn'] == 'Yes']['Age']
churn_no = data[data['Churn'] == 'No']['Age']
t_stat, p_val = ttest_ind(churn_yes, churn_no)
print(f"Age vs Churn: t={t_stat:.2f}, p={p_val:.4f}")
# Result: p < 0.05, churners are younger on average

# Test 3: Correlation of monthly charges
corr = data['Monthly_Charges'].corr(data['Churn_numeric'])
print(f"Correlation (Charges-Churn): r={corr:.3f}")
# Result: r = 0.31, moderate positive relationship
```

PHASE 5: MACHINE LEARNING

```python
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import StandardScaler
from sklearn.linear_model import LogisticRegression
from sklearn.ensemble import RandomForestClassifier
from sklearn.metrics import accuracy_score, precision_score, recall_score, f1_score

# Prepare data
X = data.drop('Churn', axis=1)
y = (data['Churn'] == 'Yes').astype(int) # 1=churn, 0=no churn

X_train, X_test, y_train, y_test = train_test_split(
X, y, test_size=0.2, random_state=42, stratify=y
)

# Model 1: Baseline - Logistic Regression
model_lr = LogisticRegression(max_iter=1000, random_state=42)
model_lr.fit(X_train, y_train)
pred_lr = model_lr.predict(X_test)

print("\nLogistic Regression Results:")
print(f"Accuracy: {accuracy_score(y_test, pred_lr):.3f}")
print(f"Precision: {precision_score(y_test, pred_lr):.3f}")
print(f"Recall: {recall_score(y_test, pred_lr):.3f}")
print(f"F1: {f1_score(y_test, pred_lr):.3f}")
# Output: Accuracy: 0.810, Precision: 0.652, Recall: 0.564

# Model 2: Advanced - Random Forest
model_rf = RandomForestClassifier(n_estimators=100, max_depth=10,
random_state=42, class_weight='balanced')
model_rf.fit(X_train, y_train)
pred_rf = model_rf.predict(X_test)

print("\nRandom Forest Results:")
print(f"Accuracy: {accuracy_score(y_test, pred_rf):.3f}")
print(f"Precision: {precision_score(y_test, pred_rf):.3f}")
print(f"Recall: {recall_score(y_test, pred_rf):.3f}")
print(f"F1: {f1_score(y_test, pred_rf):.3f}")
# Output: Accuracy: 0.837, Precision: 0.721, Recall: 0.612

# Feature Importance
feature_importance = pd.DataFrame({
'Feature': X.columns,
'Importance': model_rf.feature_importances_
}).sort_values('Importance', ascending=False)

print("\nTop 5 Churn Drivers:")
print(feature_importance.head())
```

PHASE 6: SYNTHESIS

Key Findings:
1. Younger customers more likely to churn
2. Customers with higher monthly charges more likely to churn
3. Tenure is strongest predictor (loyalty matters)
4. Month-to-month contracts have higher churn
5. Fiber optic internet users churn more

Business Recommendations:
1. Develop retention program for new customers (first 6 months critical)
2. Investigate fiber optic service quality issues
3. Offer long-term contract incentives
4. Implement early warning system (flag high-risk customers)
5. Target outreach to customers with high charges

Model Recommendation:
- Deploy Random Forest (83.7% accuracy, better precision)
- Use monthly retraining with new customer data
- Set threshold for flagging high-risk customers
- Monitor model performance quarterly

PHASE 7: PROFESSIONAL REPORT STRUCTURE

1. Executive Summary (1 page)
- Business problem
- Key findings
- Recommendations
- Expected impact

2. Introduction
- Company context
- Problem statement
- Project objectives

3. Data Description
- Source and collection method
- 7,043 customers, 21 features
- Data cleaning steps
- Final dataset characteristics

4. Methodology
- Statistical tests performed
- ML models implemented
- Evaluation metrics
- Validation approach

5. Results
- Statistical findings
- Model comparisons
- Feature importance
- Visualizations

6. Conclusions
- Key insights
- Business implications
- Model limitations

7. Recommendations
- Actionable next steps
- Implementation roadmap
- Expected ROI

PHASE 8: PRESENTATION

Slide Deck:
1. Title slide
2. Problem statement
3. Data overview
4. Statistical findings
5. Model comparison
6. Top churn drivers
7. Business recommendations
8. Implementation plan
9. Questions

Key talking points:
- "We identified churn drivers using data science"
- "Our model is 84% accurate at predicting churn"
- "If we implement retention for flagged customers, we'll save $X"
- "Next steps: test with pilot group, then full deployment"

4. Evaluation Criteria and Grading

CAPSTONE PROJECT GRADING RUBRIC: EXPLORATORY DATA ANALYSIS (15%): Excellent (13-15): ✓ Thorough data exploration ✓ Multiple visualizations (8+) ✓ Insightful observations ✓ Clear summary of findings Good (10-12): ✓ Adequate exploration ✓ Several visualizations (5-7) ✓ Some insights noted ✓ Summary provided Acceptable (7-9): ✓ Basic exploration ✓ Few visualizations (3-4) ✓ Limited insights ✓ Basic summary Poor (0-6): ✗ Minimal exploration ✗ Few visualizations ✗ No insights ✗ No summary DATA CLEANING AND PREPROCESSING (15%): Excellent (13-15): ✓ Thorough cleaning documented ✓ Missing data handled appropriately ✓ Outliers investigated ✓ Feature engineering applied ✓ All transformations documented Good (10-12): ✓ Good cleaning process ✓ Missing data addressed ✓ Some feature engineering ✓ Documentation adequate Acceptable (7-9): ✓ Basic cleaning done ✓ Missing data handled simply ✓ Minimal feature engineering ✓ Some documentation Poor (0-6): ✗ Incomplete cleaning ✗ Missing data ignored ✗ No feature engineering ✗ No documentation STATISTICAL ANALYSIS (20%): Excellent (18-20): ✓ 5+ relevant tests applied ✓ Assumptions checked ✓ Results interpreted correctly ✓ Effect sizes reported ✓ Significance vs importance discussed Good (14-17): ✓ 4 relevant tests ✓ Most assumptions checked ✓ Results mostly correct ✓ Some effect sizes Acceptable (10-13): ✓ 3 relevant tests ✓ Basic assumption checking ✓ Basic interpretation ✓ Limited effect sizes Poor (0-9): ✗ Few tests ✗ No assumption checking ✗ Misinterpretation ✗ No effect sizes MACHINE LEARNING MODELS (20%): Excellent (18-20): ✓ 3+ models built and compared ✓ Hyperparameter tuning done ✓ Cross-validation used ✓ Multiple metrics evaluated ✓ Feature importance analyzed ✓ Best model selected with justification Good (14-17): ✓ 3 models built ✓ Some tuning ✓ Cross-validation attempted ✓ Multiple metrics ✓ Model selection justified Acceptable (10-13): ✓ 2 models built ✓ Basic evaluation ✓ One metric used ✓ Limited comparison Poor (0-9): ✗ 1 or fewer models ✗ No evaluation ✗ Single metric only ✗ No comparison CODE QUALITY (15%): Excellent (13-15): ✓ Well-commented code ✓ Functions and modularity used ✓ Reproducible (seeds set) ✓ No errors or warnings ✓ Professional style Good (10-12): ✓ Mostly commented ✓ Some functions ✓ Mostly reproducible ✓ Few errors ✓ Good style Acceptable (7-9): ✓ Basic comments ✓ Limited functions ✓ Basic reproducibility ✓ Some errors ✓ Inconsistent style Poor (0-6): ✗ No comments ✗ No functions ✗ Not reproducible ✗ Many errors ✗ Poor style REPORT AND PRESENTATION (15%): Excellent (13-15): ✓ Professional report (5-10 pages) ✓ Clear writing ✓ Good visualizations ✓ Compelling presentation (10-15 min) ✓ Good public speaking ✓ Handles questions well Good (10-12): ✓ Good report ✓ Clear writing ✓ Adequate visualizations ✓ Good presentation ✓ Competent speaking Acceptable (7-9): ✓ Basic report ✓ Understandable writing ✓ Few visualizations ✓ Adequate presentation ✓ Nervous but clear Poor (0-6): ✗ Poor report ✗ Unclear writing ✗ No visualizations ✗ Poor presentation ✗ Incoherent speaking TOTAL SCORE: 0-100% 90-100%: A (Excellent) 80-89%: B (Good) 70-79%: C (Acceptable) <70%: F (Poor) COMMON DEDUCTIONS:

  • Missing documentation: -10%
  • Code not reproducible: -15%
  • Incorrect statistical interpretation: -10%
  • Limited exploration: -5%
  • Poor visualization quality: -5%
  • Unprofessional report: -10%

5. Common Mistakes to Avoid

ANALYSIS MISTAKES:

  • IGNORING MISSING DATA

✗ Don't: Silently ignore missing values ✓ Do: Investigate missingness, document approach ✗ Don't: Assume MCAR (Missing Completely at Random) ✓ Do: Check if missingness related to other variables

  • NOT CHECKING ASSUMPTIONS

✗ Don't: Run t-test without checking normality ✓ Do: Test assumptions, use alternatives if violated ✗ Don't: Assume linear regression assumptions hold ✓ Do: Check residuals, linearity, independence

  • P-HACKING

✗ Don't: Try many tests until one is significant ✓ Do: Pre-specify tests before looking at data ✗ Don't: Report only significant results ✓ Do: Report all tests (even null findings)

  • MULTIPLE COMPARISON PROBLEM

✗ Don't: Do 20 tests without correction ✓ Do: Apply Bonferroni or similar correction ✗ Don't: Assume 5% significance level with many tests ✓ Do: Adjust alpha level based on number of tests

  • OVERFITTING

✗ Don't: Train and test on same data ✓ Do: Use train/test split ✗ Don't: Build complex model with small data ✓ Do: Use appropriate complexity for sample size

  • DATA LEAKAGE

✗ Don't: Use target-derived features ✓ Do: Only use features available at prediction time ✗ Don't: Use future information ✓ Do: Strict temporal ordering in train/test

  • IGNORING CLASS IMBALANCE

✗ Don't: Use accuracy for imbalanced classification ✓ Do: Use F1, precision, recall, ROC-AUC ✗ Don't: Build model that predicts majority class always ✓ Do: Use class weights or resampling

  • NOT INTERPRETING EFFECT SIZES

✗ Don't: Report only p-values ✓ Do: Report effect sizes (Cohen's d, r, R²) ✗ Don't: Claim large effect with p<0.05 ✓ Do: Check actual magnitude of effect PRESENTATION MISTAKES:

  • UNCLEAR VISUALIZATIONS

✗ Don't: Use default plot colors and labels ✓ Do: Add titles, labels, legends ✗ Don't: 3D plots when 2D works ✓ Do: Simple, clear visualizations

  • JARGON OVERLOAD

✗ Don't: Assume audience knows terminology ✓ Do: Explain technical terms ✗ Don't: Use "statistically significant" without context ✓ Do: Explain what it means for business

  • MISSING CONTEXT

✗ Don't: Report "R² = 0.73" without interpretation ✓ Do: "Model explains 73% of variance" ✗ Don't: Show p-value without explaining ✓ Do: "Result unlikely by chance (p=0.03)"

  • IGNORING LIMITATIONS

✗ Don't: Claim certainty with small sample ✓ Do: Acknowledge limitations ✗ Don't: Generalize beyond your data ✓ Do: Specify scope of findings

  • POOR STORYTELLING

✗ Don't: Jump between random findings ✓ Do: Tell coherent narrative ✗ Don't: Show all analysis (too much) ✓ Do: Highlight key findings CODE QUALITY MISTAKES:

  • MAGIC NUMBERS

✗ Don't: if value > 100: ... ✓ Do: THRESHOLD = 100; if value > THRESHOLD: ...

  • UNCLEAR VARIABLES

✗ Don't: x, y, df1, data2 ✓ Do: customer_data, feature_importance

  • NO COMMENTS

✗ Don't: Code with no explanation ✓ Do: Comment why, not what

  • NOT TESTING

✗ Don't: Assume code is correct ✓ Do: Run through manually first

  • HARDCODED PATHS

✗ Don't: '/Users/myname/Desktop/project/data.csv' ✓ Do: 'data/raw/data.csv' (relative path)

  • NO VERSION CONTROL

✗ Don't: Final_v2_REAL_final_actualfinal.py ✓ Do: Use Git with meaningful commits

  • MIXED CONCERNS

✗ Don't: Data loading + cleaning + analysis in one script ✓ Do: Separate scripts/functions for each step DOCUMENTATION MISTAKES:

  • MISSING README

✗ Don't: Upload files without explanation ✓ Do: Clear README explaining project

  • NO DATA DOCUMENTATION

✗ Don't: Assume others understand data ✓ Do: Document each feature (type, source, meaning)

  • UNCLEAR FOLDER STRUCTURE

✗ Don't: Random files scattered ✓ Do: Organized /data, /notebooks, /results

  • UNFINISHED WORK

✗ Don't: Submit notebook with TODO comments ✓ Do: Complete all work before submission

  • BROKEN LINKS/PATHS

✗ Don't: References to files that don't exist ✓ Do: Check all paths work

6. Resources and Next Steps

USEFUL TOOLS AND LIBRARIES: Data Science Stack:

  • Pandas: Data manipulation
  • NumPy: Numerical computation
  • Scikit-learn: Machine learning
  • Matplotlib/Seaborn: Visualization
  • Statsmodels: Statistical modeling
  • Jupyter: Interactive notebooks

Project Management:

  • Git/GitHub: Version control
  • Trello: Project tracking
  • Notion: Documentation
  • Slack: Team communication

Dataset Sources:

  • Kaggle (kaggle.com): Competition datasets
  • UCI Machine Learning (archive.ics.uci.edu): Classic datasets
  • Google Dataset Search (datasetsearch.research.google.com)
  • Government data (data.gov, data.world)
  • Academic repositories

Learning Resources:

  • Coursera: DS specializations
  • edX: University courses
  • Fast.ai: Practical deep learning
  • Towards Data Science: Medium blog
  • Papers With Code: Research + code

AFTER CAPSTONE - NEXT STEPS: Short Term (Next month):

  • Clean up project code
  • Write blog post about project
  • Share on GitHub/LinkedIn
  • Get feedback from peers
  • Iterate based on feedback

Medium Term (Next 3 months):

  • Pick another dataset
  • Try advanced techniques learned
  • Specialize in area of interest:
  • Deep learning (Neural Networks)
  • NLP (Natural language processing)
  • Computer Vision (Images)
  • Reinforcement Learning
  • Causal Inference

Long Term (Next 6-12 months):

  • Build portfolio with 3-5 projects
  • Contribute to open source
  • Publish blog posts or papers
  • Consider formal education:
  • Master's degree in Data Science
  • Online specializations
  • Bootcamps
  • Network with data scientists
  • Look for internships/jobs

POTENTIAL SPECIALIZATIONS: Data Science (General): → Learn statistical inference, experimental design, A/B testing Machine Learning Engineering: → Learn model deployment, MLOps, production systems Deep Learning: → Learn PyTorch/TensorFlow, computer vision, NLP Data Engineering: → Learn databases, Spark, pipelines, cloud platforms Analytics: → Learn business metrics, dashboarding, SQL Business Analytics: → Learn business strategy, storytelling, domain knowledge INTERVIEW PREPARATION: Technical:

  • SQL queries (joins, aggregations, window functions)
  • Python/R coding challenges
  • Statistics and probability
  • ML algorithm implementation
  • Data structure and algorithms

Behavioral:

  • Walk through past project
  • Explain technical decisions
  • Handle ambiguous problems
  • Communicate findings
  • Ask good questions

Resources:

  • LeetCode: Coding challenges
  • DataCamp: DS skills
  • Mock interviews with mentors
  • Practice explaining projects

BUILDING YOUR PORTFOLIO: Online Presence:

  • GitHub profile
  • 3-5 complete projects
  • Well-documented code
  • Clear READMEs
  • LinkedIn profile
  • Professional photo
  • Clear headline
  • Summary highlighting skills
  • Recommendations from others
  • Project links
  • Blog (optional)
  • Write about projects
  • Explain techniques
  • Share insights
  • Build audience
  • Portfolio website (optional)
  • Showcase projects
  • List skills
  • Contact information

FINAL THOUGHTS: Success in data science requires:

  • Technical Skills: Statistics, coding, ML
  • Communication: Explain findings to non-technical audience
  • Domain Knowledge: Understand business context
  • Curiosity: Always learning, trying new things
  • Rigor: Attention to detail, reproducibility
  • Creativity: Novel insights, creative solutions
  • Persistence: Projects have dead ends, keep trying

The skills you've learned in this 12-week course are:

  • Foundational and essential
  • Applicable to many fields
  • Constantly evolving (keep learning)
  • Highly valued in job market
  • Enable meaningful work

This capstone project represents:

  • Culmination of 12 weeks of learning
  • First step in data science career
  • Proof of ability to do real work
  • Confidence in tackling new problems
  • Beginning of lifelong learning

Congratulations on completing this course! You now have skills to:

  • Analyze data scientifically
  • Build predictive models
  • Make data-driven decisions
  • Communicate technical findings
  • Continue learning independently

Good luck with your capstone project and future data science endeavors!