How pyroloops/kaiburr-data-analysis works
This repository documents a consumer-complaint text-classification workflow: load CFPB narratives, clean and filter them, build TF-IDF features, train and compare three classifiers, evaluate performance, and save the models for later prediction. The referenced Python script is absent from the tree, and no source excerpts are available, so the workflow connections rely on README statements; the notebook and model artifacts are shown at their listed paths without assuming their contents.
Main entry points: analysis.ipynb Stratified split · best_model.pkl Best pipeline · metrics Performance metrics · model_MultinomialNB.pkl Naive Bayes pipeline
Components 14
Data preparation
- Filter and clean text
analysis.ipynb - TF-IDF features
analysis.ipynb
Modeling
- Stratified split
analysis.ipynb - Naive Bayes
analysis.ipynb - Logistic regression
analysis.ipynb - Linear SVC
analysis.ipynb
Evaluation and models
- Model evaluation
analysis.ipynb - Performance metrics
metrics - Best pipeline
best_model.pkl - Naive Bayes pipeline
models/model_MultinomialNB.pkl - Logistic regression pipeline
models/model_LogisticRegression.pkl - Linear SVC pipeline
models/model_LinearSVC.pkl
Other components
- CFPB complaint data
- Prediction user
Connections 15
- CFPB complaint data → Filter and clean text: loads narratives
README.md - Filter and clean text → TF-IDF features: prepares text
README.md - TF-IDF features → Stratified split: provides features
README.md - Stratified split → Naive Bayes: trains pipeline
README.md - Stratified split → Logistic regression: trains pipeline
README.md - Stratified split → Linear SVC: trains pipeline
README.md - Naive Bayes → Model evaluation: evaluated in
README.md - Logistic regression → Model evaluation: evaluated in
README.md - Linear SVC → Model evaluation: evaluated in
README.md - Model evaluation → Performance metrics: records results
- Naive Bayes → Naive Bayes pipeline: saves pipeline
README.md - Logistic regression → Logistic regression pipeline: saves pipeline
README.md - Linear SVC → Linear SVC pipeline: saves pipeline
README.md - Linear SVC → Best pipeline: saves best pipeline
README.md - Prediction user → Best pipeline: loads for prediction
README.md