Career
ML Cheatsheet — Everything You Need in One Place
Your comprehensive quick reference for machine learning concepts, algorithms, formulas, and best practices. Perfect for interviews and daily work.
- Algorithm Summaries — Quick reference for all major ML algorithms
- Formula Reference — Mathematical foundations at your fingertips
- Best Practices — Proven guidelines for ML projects
"Knowledge is power, but organized knowledge is superpower."
ML Cheatsheet — Quick Reference
A comprehensive quick reference for machine learning algorithms, metrics, math, and Python code.
Algorithm Comparison Chart
Decision Tree: Model Selection
Classification Metrics
DfClassification Metrics
Metrics for evaluating classification models, measuring performance across different aspects like accuracy, precision, recall, and their trade-offs.
| Metric | Formula | When to Use |
|---|---|---|
| Accuracy | Balanced classes | |
| Precision | Cost of false positive is high (spam) | |
| Recall | Cost of false negative is high (cancer) | |
| F1 Score | Imbalanced classes | |
| AUC-ROC | Area under ROC curve | Ranking quality |
| Log Loss | Probabilistic predictions |
Regression Metrics
| Metric | Formula | Interpretation |
|---|---|---|
| MSE | Penalizes large errors | |
| RMSE | Same units as target | |
| MAE | Robust to outliers | |
| R² | Variance explained (0-1) | |
| MAPE | Percentage error |
Math Quick Reference
Linear Algebra
Dot product:
Matrix multiply:
Norm:
Eigenvalue:
Calculus
Power rule:
Chain rule:
Gradient:
Probability
Bayes' theorem:
Expected value:
Variance:
Normal distribution:
Python Libraries
- Data: pandas, numpy
- Visualization: matplotlib, seaborn, plotly
- ML: scikit-learn, xgboost, lightgbm
- Deep Learning: pytorch, tensorflow, keras
- NLP: transformers, spacy, nltk
- CV: opencv, torchvision
- AutoML: auto-sklearn, optuna
- Deployment: fastapi, flask, streamlit
- Experiment: mlflow, wandb
Key Takeaways
Summary: ML Cheatsheet
- Start simple — linear models as baselines before complex ones
- Feature engineering matters more than algorithm choice
- Cross-validate everything — never trust a single train/test split
- Regularize to prevent overfitting (L1 for sparsity, L2 for smoothness)
- Scale features for distance-based algorithms (KNN, SVM, K-Means)
- Ensemble multiple models for best performance (bagging, stacking)
- Monitor models in production for data drift and performance degradation
- Keep learning — the field evolves fast (new papers every week)
What to Learn Next
-> What is Machine Learning? — Complete Introduction Learn about what is machine learning? — complete introduction.
-> Linear Regression — Complete Guide with Math and Code Learn about linear regression — complete guide with math and code.
-> Model Evaluation — Metrics, Cross-Validation and Selection Learn about model evaluation — metrics, cross-validation and selection.
-> Transformers — Attention Is All You Need Complete Guide Learn about transformers — attention is all you need complete guide.
-> ML System Design — Architecture and Production Patterns Learn about ml system design — architecture and production patterns.
-> ML Interview Prep — Questions, Answers and System Design Learn about ml interview prep — questions, answers and system design.