AI Dictionary › Fondamenti AI
Feature importance (Importanza delle caratteristiche)
Feature importance is a measure that quantifies how much each input variable contributes to a machine learning model's predictions, making it possible to understand which characteristics truly drive the decision and which are nearly irrelevant. It is one of the main tools for opening, at least partially, a model's black box and understanding what is actually steering its results.
Feature importance is a measure that quantifies how much each input variable contributes to a machine learning model's predictions, making it possible to understand which characteristics truly drive the decision and which are nearly irrelevant. It is one of the main tools for opening, at least partially, a model's black box and understanding what is actually steering its results.
There are different methods for calculating it, with varying degrees of rigor. In tree-based models, like random forest and gradient boosting, importance is naturally estimated by observing how much each feature contributes, on average across all trees, to reducing error when used for a split. A more general method, applicable to any model, is permutation importance, which randomly shuffles the values of one feature at a time and measures how much performance worsens: if shuffling a variable severely hurts the model, that variable was important. More recent techniques such as SHAP values, based on game theory, allow a precise and consistent contribution to be attributed to each feature for every individual prediction, not just on average across the whole dataset.
It is a valuable tool both during development, to understand whether the model is relying on sensible signals or on unwanted artifacts in the data, and in production, to explain decisions to those who receive them: why a loan application was rejected, which factors carry the most weight in an assisted diagnosis, which signals triggered a fraud alert. In many regulated sectors, such as finance and insurance, providing this kind of explanation is not just good practice but often a regulatory requirement.
The concept of attributing relative weight to a statistical model's variables is as old as regression itself, but feature importance as a systematic model interpretation tool developed alongside the spread of complex algorithms like random forest, starting in the early 2000s, and was further enriched by the growth of the explainability, or XAI, field starting in the second half of the 2010s, when the need to explain increasingly opaque models became central both for technical reasons and growing regulatory requirements.
La feature importance è una misura che quantifica quanto ciascuna variabile in ingresso contribuisce alle previsioni di un modello di machine learning, permettendo di capire quali caratteristiche pesano davvero sulla decisione e quali sono pressoché ininfluenti. È uno degli strumenti principali per aprire, almeno parzialmente, la scatola nera di un modello e capire cosa sta effettivamente guidando i suoi risultati.
Esistono metodi diversi per calcolarla, con gradi diversi di rigore. Nei modelli ad albero, come random forest e gradient boosting, l'importanza si stima naturalmente osservando quanto ciascuna caratteristica contribuisce, in media su tutti gli alberi, a ridurre l'errore quando viene usata per uno split. Un metodo più generale, applicabile a qualsiasi modello, è la permutation importance, che mescola casualmente i valori di una caratteristica alla volta e misura di quanto peggiorano le prestazioni: se mescolare una variabile danneggia molto il modello, quella variabile era importante. Tecniche più recenti come i valori SHAP, basati sulla teoria dei giochi, permettono di attribuire a ogni caratteristica un contributo preciso e coerente per ogni singola previsione, non solo in media sull'intero dataset.
È uno strumento prezioso sia in fase di sviluppo, per capire se il modello si sta basando su segnali sensati o su artefatti indesiderati nei dati, sia in produzione, per spiegare le decisioni a chi le riceve: perché una richiesta di prestito è stata respinta, quali fattori hanno più peso in una diagnosi assistita, quali segnali hanno fatto scattare un allarme antifrode. In molti settori regolamentati, come quello finanziario e assicurativo, fornire questo tipo di spiegazione non è solo una buona pratica ma spesso un obbligo normativo.
Il concetto di attribuire un peso relativo alle variabili di un modello statistico è antico quanto la regressione stessa, ma la feature importance come strumento sistematico di interpretazione dei modelli si sviluppa con la diffusione di algoritmi complessi come random forest, a partire dai primi anni 2000, e si arricchisce ulteriormente con la crescita del campo della explainability, o XAI, a partire dalla seconda metà degli anni 2010, quando la necessità di spiegare modelli sempre più opachi diventa centrale sia per motivi tecnici sia per obblighi normativi crescenti.
From our network
AGORÀ Intelligence — Enterprise AI Governance Platform
Govern AI at scale: policies, adoption and measurable results on your data. Built for boards and C-suite.
Visit agora-intelligence.com →From the Agora Intelligence blog
📱 Download the Android app (beta) iOS coming soon
Say what you mean. Get what you need.
Grace Certified — the AI coach that trains and certifies your prompt engineering — by Agora Intelligence.