FinSight: Machine Learning Models for Indian Tax Estimation & Financial Diagnostics

This repository contains the trained, serialized machine learning models powering FinSight, an automated financial intelligence and tax estimation platform calibrated against the Indian Income Tax New Tax Regime (Section 115BAC - FY 2025–26).

Model Summary

  • Task 1 (Gross Income Regression): Random Forest Regressor ($R^2 = 0.9977$, $ ext{RMSE} = \text{₹34,815}$, $ ext{MAPE} = 1.30%$)
  • Task 2 (7-Slab Tax Classification): Gradient Boosting Classifier ($ ext{Accuracy} = 98.35%$, $ ext{Macro F1} = 0.9556$)
  • Task 3 (Persona Segmentation): $k$-Means Clustering ($k=4$, $\text{Silhouette} = 0.3285$)
  • Task 4 (Latent Space Decomposition): 3D PCA Projector ($ ext{Explained Variance} = 79.22%$)
  • Real-Data Holdout Generalization: Validated on 51,945 real Indian bank transactions across 200 accounts ($R^2 = 0.9657$, $ ext{MAPE} = 2.51%$, $100%$ tax slab agreement).

16-Dimensional Feature Schema

The models ingest a 16-dimensional standardized financial behavioral vector:

  1. log_annual_credit (log-transformed annual deposit magnitude)
  2. log_annual_debit (log-transformed annual withdrawal magnitude)
  3. net_savings_ratio (surplus retention ratio)
  4. monthly_burn_rate (debits / credits)
  5. salary_inflow_ratio (payroll credit share)
  6. monthly_credit_cv (coefficient of variation of monthly deposits)
  7. salary_regularity_score (months with consistent salary inflow / 12)
  8. bonus_lump_sum_ratio (lump-sum spikes >= 2x monthly average)
  9. investment_ratio (SIPs, mutual funds, equity allocations)
  10. fixed_obligation_ratio (rent, EMIs, utilities)
  11. discretionary_ratio (dining, food delivery, shopping, travel)
  12. tax_shield_ratio (NPS Tier-1 14%, PPF, term life insurance)
  13. upi_velocity_index (UPI transaction share)
  14. micro_spend_density (UPI transactions < ₹500 / total outflow)
  15. log_avg_ticket_size (mean transaction value log-scaled)
  16. capital_gains_flux (dividend & redemption inflows)

Statutory Tax Calculation (FY 2025–26)

  • Standard deduction: ₹75,000 for salaried employees.
  • Section 87A rebate: Up to ₹60,000 for taxable income $\le$ ₹12,00,000 (effective zero tax ceiling up to ₹12.75 Lakhs).

Usage in Python

import joblib
import numpy as np

# Load artifacts
scaler = joblib.load("scaler.joblib")
regressor = joblib.load("income_regressor.joblib")
classifier = joblib.load("tax_classifier.joblib")

# Example 16D feature vector
x = np.array([[14.18, 13.79, 0.32, 0.68, 0.88, 0.08, 1.0, 0.10, 0.18, 0.31, 0.21, 0.08, 0.72, 0.06, 7.62, 0.0]])
x_scaled = scaler.transform(x)

pred_income = regressor.predict(x_scaled)[0]
pred_slab = classifier.predict(x_scaled)[0]

print(f"Estimated Gross Income: ₹{pred_income:,.2f}")
print(f"Predicted Tax Slab: Class {pred_slab}")
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support