Performance Summary
Test Accuracy
90.4%Accuracy on the held-out test set (20% of data)
Cross-Validation Score
0.91Mean 5-fold CV score on training data
The close alignment between cross-validation score (0.91) and test accuracy (90.4%) indicates excellent model generalization without overfitting.
Evaluation Metrics
The model is evaluated on multiple dimensions after training:Accuracy Score
Accuracy measures the proportion of correct predictions across all classes:- Interpretation
- Business Impact
The model correctly predicts the lead status (Closed Won, Closed Lost, or Other) for 90.4% of test cases.
Classification Report
The classification report provides detailed metrics for each class:Metrics Breakdown
Precision
Precision
Precision measures how many predicted positive cases are actually positive.Formula: Precision = True Positives / (True Positives + False Positives)High precision means fewer false alarms when predicting “Closed Won” leads.
Recall
Recall
Recall measures how many actual positive cases are correctly identified.Formula: Recall = True Positives / (True Positives + False Negatives)High recall ensures the model doesn’t miss many “Closed Won” opportunities.
F1-Score
F1-Score
F1-Score is the harmonic mean of precision and recall.Formula: F1 = 2 × (Precision × Recall) / (Precision + Recall)Provides a balanced measure especially important for imbalanced classes.
Support
Support
The number of actual occurrences of each class in the test set.Helps understand the class distribution and metric reliability.
Classification Report Generation
- Closed Lost (Class 0)
- Closed Won (Class 1)
- Other (Class 2)
Detailed classification metrics for each class are logged to
reports/model_training.log.Cross-Validation Methodology
The model uses 5-fold cross-validation during the selection phase:Cross-Validation Process
Iterative Training
For each fold:
- Train on 4 folds (80% of training data)
- Validate on 1 fold (20% of training data)
GradientBoosting’s CV score of 0.91 was the highest among all 12 models tested, leading to its selection.
Probability Predictions
Beyond class labels, the model generates probability scores for lead scoring:Probability Distribution
Leads are categorized into probability ranges:- Probability Ranges
- Business Use
- 0-25%: Low conversion probability
- 25-50%: Medium-low conversion probability
- 50-75%: Medium-high conversion probability
- 75-100%: High conversion probability
Prediction Output
The model generates detailed predictions for each lead:Class Mapping
Evaluation Results Data
The training pipeline returns comprehensive evaluation data:Predictions DataFrame
Individual predictions with features and probabilities
Probability Distribution
Count of leads in each probability range
Accuracy Score
Overall model accuracy: 90.4%
Model Performance Highlights
Excellent Generalization: CV score (0.91) and test accuracy (90.4%) are closely aligned
Multi-Class Performance: Effective prediction across all three status categories
Probability Scoring: Generates calibrated probability scores for lead prioritization
Reproducible Results: All metrics logged to
model_training.log for trackingRunning Evaluation
To train and evaluate the model:- Loads processed data from
data/processed/full_dataset.csv - Splits data into train/test sets
- Compares all 12 classification models
- Selects the best model (GradientBoosting)
- Trains on full training set
- Evaluates on test set
- Logs all metrics to
reports/model_training.log
Next Steps
Model Selection
Learn how GradientBoosting was selected
Training Overview
Review the complete training pipeline