How carlierrudy/scoring_resiliation works
This is a Streamlit application for estimating auto-insurance policy cancellation risk. An advisor enters a client profile or uploads a portfolio; the app scores it with a saved scikit-learn pipeline, applies a configurable alert threshold, and presents risk and feature-importance information or a downloadable scored CSV. The separate training script prepares data, compares and evaluates models, then saves the pipeline and metadata consumed by the app. The README also describes a notebook for step-by-step exploration. Some app and training code was not excerpted, so links for documented capabilities cite the README.
Main entry points: app.py Client profile and settings · pipeline_resiliation.pkl Scoring pipeline · train_model.py Prepare and train · data Source dataset
Components 11
Data
- Source dataset
data
Model lifecycle
- Prepare and train
train_model.py - Model and metadata
models
Scoring application
- Client profile and settings
app.py - Scoring pipeline
models/pipeline_resiliation.pkl - Individual risk result
app.py - Feature importance
app.py - Batch scoring and export
app.py
Exploration
- Step-by-step exploration
notebooks/tp_final.ipynb
Other components
- Insurance advisor
- Client portfolio
Connections 12
- Prepare and train → Source dataset: reads and prepares
train_model.py - Prepare and train → Model and metadata: saves model and metadata
train_model.py - Step-by-step exploration → Source dataset: explores data
README.md - Insurance advisor → Client profile and settings: enters profile
README.md - Client profile and settings → Model and metadata: loads assets
app.py - Client profile and settings → Scoring pipeline: requests prediction
README.md - Scoring pipeline → Individual risk result: returns risk score
README.md - Individual risk result → Feature importance: shows influential variables
README.md - Insurance advisor → Client portfolio: uploads CSV
README.md - Client portfolio → Batch scoring and export: provides client rows
app.py - Batch scoring and export → Scoring pipeline: scores each row
app.py - Batch scoring and export → Insurance advisor: offers scored CSV
README.md