Capstone Best Practices
Your capstone project is an opportunity to apply the concepts from this course to a real-world problem. This guide provides recommendations for scoping, executing, and presenting your project.
Project Scoping
Choose a Focused Problem
- Define a clear, specific question your model will answer
- Avoid vague goals like "predict stock prices" or "analyze sentiment"
- Good example: "Predict whether a loan applicant will default within 2 years based on application data"
Start with Available Data
- Ensure you have data before committing to a project
- Check that the data is sufficient in size and quality
- Understand any legal or ethical constraints on data use
Scope Appropriately
- Aim for a project you can complete in the available time
- It is better to do one thing well than many things poorly
- Have a minimum viable project and stretch goals
Project Execution
Establish Baselines First
- Always start with a simple baseline (e.g., majority class, mean prediction)
- Try a basic model (logistic regression, decision tree) before deep learning
- Document baseline performance to show improvement
Proper Train/Validation/Test Splits
- Never touch test data until final evaluation
- Use validation set (or cross-validation) for model selection
- Be aware of data leakage across splits
Feature Engineering
- Spend time understanding your features
- Handle missing values thoughtfully
- Consider domain-specific transformations
- Document your feature engineering decisions
Iterate Systematically
- Change one thing at a time
- Keep a log of experiments and results
- Version your code and track experiments
Code Quality
Organization
- Separate data loading, preprocessing, modeling, and evaluation
- Use functions to avoid code duplication
- Include a README explaining how to run your code
Reproducibility
- Set random seeds
- Document package versions (use requirements.txt)
- Include instructions for obtaining data
Comments and Documentation
- Explain why, not just what
- Document assumptions and decisions
- Include docstrings for functions
Evaluation and Analysis
Choose Appropriate Metrics
- Match metrics to your problem (accuracy, precision, recall, RMSE, etc.)
- Consider business or domain-specific costs
- Report multiple metrics when relevant
Error Analysis
- Examine where your model fails
- Look at confusion matrices for classification
- Analyze residuals for regression
- Identify patterns in errors
Fairness Considerations
- Check performance across subgroups
- Consider potential biases in your data
- Document any fairness concerns
Presentation and Report
Structure
- Problem Statement: What are you trying to solve and why?
- Data: What data did you use? How did you prepare it?
- Methods: What approaches did you try?
- Results: What did you find? Use tables and figures.
- Discussion: What worked? What did not? What would you do next?
Visualizations
- Include clear, labeled figures
- Show learning curves, confusion matrices, feature importances
- Avoid chart junk; keep visualizations clean
Be Honest
- Report negative results and failed experiments
- Acknowledge limitations
- Do not overstate conclusions
Common Pitfalls to Avoid
| Pitfall | How to Avoid |
|---|---|
| Data leakage | Split data before any preprocessing |
| Overfitting to validation set | Limit number of experiments on val set |
| Ignoring baselines | Always compare to simple baselines |
| Complexity for its own sake | Start simple; add complexity only if needed |
| Poor data quality | Explore and clean data thoroughly |
| Last-minute scramble | Start early; have working code by midpoint |