Downloads ยท 30 days
0
NIKHIL421/Revenue-AI-Tracker
Revenue-AI-Tracker is a machine learning model from NIKHIL421. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Downloads ยท 30 days
0
Access
Public
Updated Aug 22, 2026
Repo size
โ
Likes
0
Public
Click a slice to open those files.
.py51.1 KB ยท 77%
From the Hugging Face model README
RecoverAI is an end-to-end Machine Learning pipeline that predicts whether a failed financial transaction can be recovered. It generates a synthetic hybrid dataset from real Kaggle transactions and trains a robust CatBoost model.
Every day, millions of financial transactions fail due to network errors, insufficient funds, or timeouts. Knowing exactly which transactions have a high probability of recovery can save businesses millions in lost revenue.
RecoverAI tackles this by predicting โ using a CatBoost model trained on 300,000 hybrid transactions โ the likelihood of a transaction being successfully recovered within 72 hours.
eda_analysis.py, eda_fast.py) to visualize the distributions of amounts, categorical balances, and recovery rates.graph TD
classDef file fill:#fff3e0,stroke:#e65100,stroke-width:2px;
classDef process fill:#e0f7fa,stroke:#006064,stroke-width:2px;
classDef output fill:#e8f5e9,stroke:#2e7d32,stroke-width:2px;
subgraph Phase 1: Data Gathering
DL["download_datasets.py"]:::process -->|Downloads| Kaggle["Raw Kaggle CSVs<br/>(PaySim, etc.)"]:::file
end
subgraph Phase 2: Feature Engineering
Kaggle --> Build["build_recoverai_dataset.py<br/>Engineers 26 Features"]:::process
Build --> TrainCSV["recoverai_training.csv<br/>(300k rows)"]:::file
Build --> ValCSV["recoverai_validation.csv<br/>(60k rows)"]:::file
end
subgraph Phase 3: Model Training
TrainCSV --> Train["train_catboost.py<br/>CatBoost Classifier"]:::process
ValCSV --> Train
Train --> Model["recoverai_catboost.cbm<br/>(Trained Model)"]:::output
Train --> Metrics["metrics.json & feature_importance.csv"]:::output
end
The dataset builder script constructs 26 predictive features across 5 main categories:
| Category | Features |
|---|---|
| Transaction | amount, payment_method, error_reason, card_type, merchant_category, amount_bucket |
| Customer | customer_segment, customer_age, account_balance, customer_tenure_months, previous_failed_attempts |
| Behaviour | retry_count, risk_score, recovery_attempt_count, transaction_frequency_30d, time_since_last_failure_hr |
| Context | bank, region, device_type, channel, hour_of_day, day_of_week, is_weekend |
| Notifications | notification_sent, opt_out_notification, treatment_action |
Target Variable: recovered_within_72h (Binary Classification: 0 or 1).
Revenue-AI-Tracker/
โ
โโโ ๐ README.md โ You are here
โโโ ๐ LICENSE โ MIT
โโโ ๐ .gitignore
โ
โโโ ๐ฅ download_datasets.py โ Downloads Raw Kaggle CSVs
โโโ ๐ง build_recoverai_dataset.py โ Builds engineered train/val datasets
โโโ ๐ eda_fast.py โ Fast terminal-based EDA
โโโ ๐ eda_analysis.py โ Full EDA with graph visualisations
โโโ ๐ค train_catboost.py โ Model training & evaluation script
โโโ ๐ run_download.py โ Wrapper to trigger dataset download
โโโ ๐งช ci_local_test.py โ Local sanity testing script
โ
โโโ ๐ requirements.txt (Optional)
โโโ โ๏ธ docker-compose.yml โ Environment setup
Follow these steps to run the complete pipeline locally:
git clone https://github.com/viRAJ357/Revenue-AI-Tracker.git
cd Revenue-AI-Tracker
# Install required python packages
pip install pandas numpy catboost scikit-learn
(Note: Requires a valid kaggle.json token configured in ~/.kaggle/)
python download_datasets.py
This will merge the raw datasets and engineer the 360,000-row output files.
python build_recoverai_dataset.py
Train the CatBoost model. Once completed, it will save recoverai_catboost.cbm and performance metrics.
python train_catboost.py
python eda_fast.py
Actual performance may vary slightly based on random seed and dataset generation.
| Metric | Target Score |
|---|---|
| ๐ฏ Accuracy | ~ 74.43% |
| ๐ AUC-ROC | ~ 0.8207 |
| โ Best Iteration | Approx. 160-200 / 500 |
| ๐๏ธ Training Rows | 300,000 |
| ๐งช Validation Rows | 60,000 |
| ๐ข Features | 26 |
Built with โค๏ธ
RecoverAI โ Turning failed transactions into recovered revenue.
</div>