🐍 Python ML/DL/NLP Libraries Cheat Sheet
Library Used For Situations to Use Architectures Example Applications
Numerical Handling arrays, Data pre-processing,
NumPy -
Computations matrices, math ops Feature Engineering
Data Cleaning,
Data Handling, Data Cleaning, CSV
Pandas - Exploratory Data
Tabular Data reading/writing
Analysis (EDA)
Plotting Graphs, Visualizing
Matplotlib Data Visualization -
Charts accuracy/loss curves
Statistical Statistical plotting Heatmaps,
Seaborn -
Visualization with Pandas Distribution plots
Regression,
ML Algorithms Predictive Models,
Scikit-learn Classification, -
(Classical ML) SVM, Decision Trees
Clustering, etc.
CNN, RNN,
CNN, RNN,
Deep Learning Transformers, Image Classification,
TensorFlow LSTM,
Framework Production Ready Speech Recognition
Transformer
Models
High-Level API for Quick DL CNN, RNN, Sentiment Analysis,
Keras
TensorFlow prototyping GAN, LSTM Image Captioning
Research & CNN, RNN, NLP with
Deep Learning
PyTorch Development (more Transformer, Transformers, Object
Framework
flexible) GAN Detection
Image Processing, CNN (via Object Detection,
OpenCV Computer Vision
Feature Detection integration) Image Segmentation
Tokenization, POS
Natural Language Text Preprocessing,
NLTK Tagging, Basic NLP -
Processing Sentiment Analysis
Tasks
NER, Dependency
Industrial-level NLP
spaCy Advanced NLP - Parsing, Sentence
pipelines
Segmentation
Topic Modeling, Document Similarity,
Gensim Word2Vec, TF-IDF -
Word Embeddings Topic Extraction
Using pretrained Transformer- Text Classification,
transformers State-of-the-Art
models (BERT, GPT, based (BERT, Chatbots,
(Hugging Face) NLP Models
etc.) GPT) Summarization
Library Used For Situations to Use Architectures Example Applications
Tabular Data,
Fraud Detection,
XGBoost Gradient Boosting Winning Kaggle -
Tabular Predictions
Competitions
Fast Gradient Large datasets with Kaggle Competitions,
LightGBM -
Boosting lots of features Financial Models
Credit Scoring,
Categorical Datasets with many
CatBoost - Recommendation
Boosting categorical features
Systems
Regression, Time Econometrics,
Statsmodels Statistical Analysis -
Series Analysis Statistical Tests
Data Dashboards,
Interactive Interactive
Plotly - Exploratory
Visualization dashboards
Visualizations
ML Model
Deploy ML models
FastAPI API Deployment - Deployment, Backend
as APIs
APIs
Web Framework Lightweight API Deploy ML Models in
Flask -
for Deployment development production
Basic image Preprocessing images
Pillow (PIL) Image Processing -
manipulations for CNN
Image
Image Classification,
Albumentations Augmentation for Data Augmentation CNN
Object Detection
DL
Low-Code ML Quickly building ML Prototyping ML
PyCaret -
Framework models Models
Model Understanding
SHAP Explainable AI -
Interpretability Predictions
Model Explaining Linear
Eli5 - Feature Importance
Explainability Models, Trees
Real-Time Object
Deep Learning in Running DNNs inside
cv2.dnn CNN Detection, Face
OpenCV OpenCV
Recognition
Converting spoken RNN, Voice Assistants,
SpeechRecognition Speech-to-Text
language to text Transformer Speech Interfaces
Tesseract Optical Character Extracting text from CNN + RNN Invoice Extraction,
(pytesseract) Recognition (OCR) images (combined) Document
Library Used For Situations to Use Architectures Example Applications
Digitization
Extracting data from Scraping Datasets for
BeautifulSoup Web Scraping -
HTML websites NLP
Large-scale Web Complex web Data Collection for
Scrapy -
Scraping crawling pipelines NLP/ML Projects
Sentiment analysis, Quick Prototyping
TextBlob Simple NLP Tasks -
Translation, Spelling NLP
Approximate string Spell Correction,
FuzzyWuzzy String Matching -
matching Name Matching
Deploying trained
Joblib Model Serialization Saving ML models -
models
Hyperparameter Hyperparameter CNN, RNN,
Optuna Model Optimization
Optimization tuning Classical
✅ Deep Learning Architectures Cheat Sheet (Where Used):
Architecture When to Use Libraries
Image classification, Object detection,
CNN TensorFlow, Keras, PyTorch, OpenCV
Segmentation
RNN Sequence modeling, Time Series TensorFlow, Keras, PyTorch
LSTM Long-term sequence dependencies TensorFlow, Keras, PyTorch
GRU Efficient alternative to LSTM for sequences TensorFlow, Keras, PyTorch
HuggingFace Transformers, TensorFlow,
Transformer NLP, Translation, Summarization
PyTorch
GAN Image generation, Style transfer TensorFlow, Keras, PyTorch
Dimensionality reduction, Anomaly
Autoencoder TensorFlow, Keras, PyTorch
detection
✅ Summary for NLP-specific Projects
Type of Task Library Architecture
Text Classification Hugging Face transformers, Keras Transformer, RNN, LSTM
Named Entity Recognition spaCy, Hugging Face transformers Transformer
Type of Task Library Architecture
Sentiment Analysis TextBlob, Transformers, NLTK Transformer, RNN
Chatbots Rasa, Transformers Transformer, RNN
Summarization Hugging Face transformers Transformer (BART, T5)
Translation Hugging Face transformers Transformer