Modeling & Evaluation

Applied ML articles on forecasting, feature engineering, NLP, production ML, graph analytics, conformal prediction, label engineering, and decision-oriented modeling — from real projects at Sofrecom (Orange Wholesale), Tunisia Telecom, Kiota Intelligence, and Zindi.

Insights on model evaluation, metrics, calibration, validation, and choosing the right modeling approach. Browse all insights in this category, or view all insights.

C
ML Mentoring · Problem Framing · Model Evaluation

The first question is often not the real problem

After 94 mentoring sessions, the recurring lesson: most ML problems are framing, data-quality, and validation issues before they are tuning issues.

Result: Define the decision, the row, the target, and the validation before tuning the algorithm.

A
Hybrid ML · Computer Vision · LLM Engineering

The LLM did not replace the image classifier. It escalated uncertainty.

Build around escalation rules: fast vision classifier for clear cases, multimodal LLM with structured output for uncertain cases, human review when needed.

Result: Speed for clear cases, reasoning for uncertain cases, and a safe fallback for the rest.

B
NLP · Feature Engineering · Model Stacking

Combine text and tabular data with out-of-fold summaries

Instead of concatenating thousands of TF-IDF features, turn text into an out-of-fold escalation-risk score and add it as a single feature to a structured model.

Result: Cleaner multimodal architecture with safer validation — combine validated summaries, not raw sparse features.

A
Feature Engineering · Tabular ML · Model Selection

Better features beat more model shopping

In many tabular ML problems the bigger gains come earlier than model choice. Testing a feature hypothesis usually beats trying a third gradient-boosting library.

Result: Understand the row and target, design validation that matches the decision, engineer structure, and set a strong baseline before tuning or ensembling.

A
Tabular ML · Gradient Boosting · Model Selection

GBDTs Are Not Dead: Strong Tabular Baselines

Every few years someone declares GBDTs dead, and every few years XGBoost, LightGBM and CatBoost remain among the strongest baselines for structured tabular data. They are useful because they keep working — strong with limited data, efficient, mature tooling, straightforward deployment.

Result: Deep learning still has a place, especially with text, images, sequences or graphs, but newer does not automatically mean better for a dataset. Define the problem, build process-driven features, validate realistically, establish a strong GBDT baseline, then add complexity only when held-out evidence justifies it.

B
SQL · Feature Engineering · Telecom Analytics

One SQL Transformation: Three Behavioural Features

In monthly telecom analytics, current ARPU is only part of the story. One window-function transformation creates three behavioural features close to the source: LAG for previous-period movement, CASE for a trajectory state, and NTILE(5) for a relative value quintile within the month.

Result: This is not SQL versus Python. When the transformation is relational and set-based, and the data already lives in the database, keep the features in SQL — ordered by a real chronological field, not display labels like Jan or Feb.

B
Production ML · MLOps · Model Monitoring

Silent Model Failure: When the Dashboard Stays Green

A churn model can pass every technical check after launch and still fail quietly — a new self-service flow changed what a key feature meant while the pipeline stayed healthy and the dashboard stayed green.

Result: A successful deployment is not a running pipeline. It is a system with an owned feedback loop: feature-shift checks, delayed outcomes by segment, a named model owner, and a fallback rule.

B
Explainability · XGBoost · SHAP

SHAP waterfall: local explanation is not the same as global importance

A SHAP summary plot shows which features tend to matter across a dataset. But the business question is often local: why did the model flag this customer?

Global SHAP (mean |SHAP|) helps answer what tends to matter overall. Local SHAP (waterfall) helps answer what drove this specific prediction.

Result: Interpretability becomes much more valuable when it shifts from feature ranking to decision explanation.

B
Tabular ML · Gradient Boosting · Model Selection

LightGBM vs XGBoost in 2026: the differences that actually matter

After years of using both in competitions and production, there is no universal winner. On a well-prepared tabular dataset, the gap between them is often smaller than the gap created by better features, a better validation split, or removing leakage.

Start with "what is expensive, risky, or awkward in this pipeline?" not "which library is best?" The data representation usually decides the project.

Result: LightGBM for large feature-heavy datasets, XGBoost for explicit regularization and custom objectives. Spend most of the time on features, labels, and leakage checks.

B
Machine Learning · Class Imbalance · Loss Functions

Focal Loss for Imbalanced Classification: Focus Learning on Hard Cases

Focal loss reduces the learning effort spent on examples a classifier already predicts correctly, so rare, hard-to-predict cases actually drive model improvement. One term — (1 − pt)γ — controls how sharply the loss focuses on difficult examples.

Result: Focal loss is one lever among several for class imbalance — the right answer is the one that improves your actual validation metric, not the one that sounds most sophisticated.

A
Ensemble Modeling · Error Diversity · Out-of-Fold Blending

Why Two Weaker Models Beat a Stronger One Through Error Diversity

Two weaker models can sometimes outperform one stronger model — not through magic, but because their mistakes are complementary.

Focus on error diversity: generate candidates from different families, feature views, training variations, or assumptions; verify in held-out (out-of-fold) predictions before learning blend weights.

Result: Error diversity, not model count, drives the gain. Evaluate blends on held-out predictions and accept only if the gain justifies operational cost.

Share on LinkedIn → View on GitHub →
ForecastingTime SeriesMachine LearningPredictive ModelingFeature EngineeringNLPLLM ApplicationsDocument AICustomer SegmentationTelecom AnalyticsAnomaly DetectionRecommendation SystemsGraph AnalyticsGeospatial AnalyticsStatistical AnalysisExperimentation & A/B TestingPythonRSQLDataikuShiny DashboardsStreamlit AppsData VisualizationProduction MLModel EvaluationDecision SystemsData AutomationBusiness Analytics