Live · runs entirely in your browser

Which card tier maximizes margin for every customer?

This is the fitted logistic-regression migration model from the Amex Premium Card Tier Migration & Margin Optimization project, exported to JavaScript with its exact preprocessing parameters. Score a customer, test a migration policy, or score a CSV — no login and no server round trip.

Exported from models/card_tier_model.joblib · threshold 0.500 · holdout ROC-AUC 0.000

Holdout snapshot

Model live
— of — flagged at the 0.500 churn threshold
Alert rate—
Precision—
Recall—
F1—

Threshold metrics are replayed from the saved holdout evaluation. The scorer itself runs client-side from exported coefficients.

01 · Single-customer tier scorer

Score the account. Choose the tier.

Every input updates the churn probability and tier recommendation immediately. The model uses 26 engineered features across spend, fees, risk, and engagement. The result is a migration prioritisation signal, not a credit decision.

Customer profile

26 model inputs · updates live

02 · Migration policy

Set the churn threshold. See who gets flagged.

A churn score becomes a campaign only after choosing a contact policy. The slider replays the saved holdout predictions; it does not refit the model.

Churn threshold

Customers at or above this score are flagged for tier migration outreach.

0.500

selected policy

The selected threshold maximizes F1 on out-of-fold training predictions, then is evaluated once on the holdout set.

Holdout trade-off

Contacts——
Precision—
Recall—
F1—
Alert rate—

03 · Batch scoring

Work a portfolio, not a demo.

Upload the raw card portfolio schema, validate every row in the browser, and download a ranked migration list. Files are processed in memory on this device.

Score a customer CSV

Required columns are the raw card portfolio fields; customerID is optional and Churn is ignored if present. Missing IDs are generated and duplicate IDs are rejected.

No file loaded. Load the sample list to try it.

Customer Churn prob. Risk tier Current tier Optimal tier Margin lift /yr Priority
Expected schema
customerID (optional), card_tier, tenure_months, annual_fee_usd, monthly_spend_usd, annual_spend_usd, rewards_cost_usd, service_cost_usd, statement_balance_usd, utilization_pct, delinquency_rate, credit_score, income_usd, age, gender, region, acquisition_channel, has_premium_rewards, travel_spend_pct, dining_spend_pct, grocery_spend_pct, digital_engagement_score, support_contacts_last_12m, complaint_flag

04 · What this is

The same model, exported.

The browser scorer is a client-side implementation of the trained pipeline, not a new model and not a mock-up. The native Streamlit workbench remains the full reference implementation.

Exported coefficients

The logistic-regression intercept, one-hot coefficients, imputer medians, and scaler parameters come directly from models/card_tier_model.joblib.

Identical preprocessing

The browser derives the same engineered fields — spend-to-fee ratio, spend per tenure, margin proxy, premium tier flag — then applies median imputation, standard scaling, and unknown-category handling.

Honest evaluation

The threshold lab replays saved holdout predictions from the original evaluation split. It does not tune on the holdout set or claim production readiness.

Model: Logistic Regression Threshold: 0.500 Holdout ROC-AUC: 0.000 Data: synthetic Amex-style portfolio Runtime: client-side JavaScript