How bishwarup307/bnp_paribas_cardiff_claim_management works
Project Type and Purpose
• This is a data‐science/ML ensemble system built for the Kaggle “BNP Paribas Cardif Claims Management” competition.
• Its goal is to predict claim approval probability by stacking and blending many base learners in a three‐layer ensemble.
File Structure Analysis
• Top-level directories:
• ensemble/L1 – first-layer base learners (Python & R implementations)
• ensemble/L2 – second-layer meta-learner scripts
• standalone_models – single XGBoost variants
• Key patterns:
• A two‐stage stacking architecture (layer 1 generates out‐of‐fold predictions, layer 2 uses those as features)
• Scripts for feature subset generation (generate_feature_subsets__.R), model training, and prediction pipelines
• Mixed languages (Python, R, shell commands) indicating multiple runtime environments
Extracts from the README
• Three-layer ensemble design described (we see L1 and L2 folders; a third layer may be implicit or combined in L2)
• Models: XGBoost, neural nets, RF, h2o, Vowpal Wabbit, etc.
• Evaluation metric: binary crossentropy/log loss
a. Main Components
• Data Ingestion & Preprocessing – raw CSVs → feature engineering R/Python scripts
• Layer 1 Base Learners – each script in ensemble/L1 is a separate block (e.g., XGB, RF, NN, etc.)
• Stacking Engine – code that aggregates L1 out‐of‐fold predictions into a feature matrix
• Layer 2 Meta‐Learner – calibrated_XGB_L2.py that trains on stacked features
• Standalone Models – optional side‐by‐side XGB variants in standalone_models
• Evaluation & Submission – logloss computation, final CSV generation
• External Tools – H2O cluster, Keras/TensorFlow, Vowpal Wabbit CLI
b. Relationships & Data Flow
• Raw data flows into feature‐generation scripts → cleansed feature sets
• Features feed into each L1 model → produce cross‐validated prediction files
• Prediction files feed into the stacking engine → form new feature table for L2
• L2 meta‐learner consumes stacked features → outputs final probability scores
• Final results are evaluated (logloss) and written to submission file
c. Architectural Patterns
• Layered stacking (two explicit layers, implied third stacking step for final blend)
• Separation of concerns: each model implemented and tested in isolation
• Polyglot pipeline: orchestrator (could be a shell or Makefile) runs R and Python jobs
d. Key Technologies & Frameworks
• Languages: Python (scikit‐learn, sklearn wrappers, Keras), R (xgboost, randomForest), C++ tools
• Distributed engines: H2O for GBM/RF
• VW command‐line for Vowpal Wabbit
• Data formats: CSV, serialized model artifacts