AI Dictionary › Fondamenti AI

Hyperparameter tuning

Hyperparameter tuning (Ottimizzazione degli iperparametri)

Hyperparameter tuning is the process of finding the best combination of hyperparameters, the settings of a machine learning model that are not learned from the data but decided before training, such as the maximum depth of a decision tree, the number of trees in a forest, or the learning rate used in gradient descent. Unlike actual parameters, which the model learns automatically, hyperparameters must be chosen externally, and the right choice can make a huge difference to final performance.

Definition

What it is

Hyperparameter tuning is the process of finding the best combination of hyperparameters, the settings of a machine learning model that are not learned from the data but decided before training, such as the maximum depth of a decision tree, the number of trees in a forest, or the learning rate used in gradient descent. Unlike actual parameters, which the model learns automatically, hyperparameters must be chosen externally, and the right choice can make a huge difference to final performance.

How it works

The simplest approach, grid search, systematically tries all possible combinations of a predefined set of values for each hyperparameter, evaluating each combination typically with cross-validation. It is exhaustive but quickly becomes too expensive when there are many hyperparameters to explore. Random search instead samples random combinations from the hyperparameter space, often proving surprisingly efficient because it explores a wider range of values with the same number of attempts. More advanced methods, such as Bayesian optimization, use the results of previous attempts to intelligently decide which combination to try next, concentrating the search in the most promising areas of the search space.

Applications

It is an almost universal step in any serious machine learning project: from classic models like random forest and gradient boosting, where the number of hyperparameters to adjust is often considerable, to deep neural networks, where tuning covers architecture, learning rate, batch size and regularization strategies. Automated machine learning platforms, known as AutoML, have made this process increasingly automated, reducing the manual burden on data scientists and engineers.

History & etymology

The term hyperparameter explicitly distinguishes these external settings from parameters, the internal ones the model estimates during training, a distinction well established in statistical and Bayesian literature well before the spread of modern machine learning. The term tuning literally recalls the metaphor of tuning a musical instrument until the right sound is found, an image that captures well the idea of an iterative fine-adjustment process.

Definizione (italiano)

L'hyperparameter tuning è il processo di trovare la combinazione migliore di iperparametri, le impostazioni di un modello di machine learning che non vengono apprese dai dati ma decise prima dell'addestramento, come la profondità massima di un albero decisionale, il numero di alberi in una foresta, o il tasso di apprendimento usato nella discesa del gradiente. A differenza dei parametri veri e propri, che il modello impara automaticamente, gli iperparametri vanno scelti dall'esterno, e la scelta giusta può fare una differenza enorme sulle prestazioni finali.

L'approccio più semplice, la grid search, prova sistematicamente tutte le combinazioni possibili di un insieme predefinito di valori per ciascun iperparametro, valutando ogni combinazione tipicamente con la cross-validation. È esaustivo ma diventa rapidamente troppo costoso quando gli iperparametri da esplorare sono molti. La random search campiona invece combinazioni casuali dallo spazio degli iperparametri, risultando spesso sorprendentemente efficiente perché esplora un ventaglio più ampio di valori con lo stesso numero di tentativi. Metodi più avanzati, come l'ottimizzazione bayesiana, usano i risultati dei tentativi precedenti per decidere in modo intelligente quale combinazione provare successivamente, concentrando la ricerca nelle zone più promettenti dello spazio di ricerca.

È un passaggio pressoché universale in ogni progetto serio di machine learning: dai modelli classici come random forest e gradient boosting, dove il numero di iperparametri da regolare è spesso considerevole, alle reti neurali profonde, dove il tuning riguarda architettura, tasso di apprendimento, dimensione dei batch e strategie di regolarizzazione. Piattaforme di machine learning automatico, note come AutoML, hanno reso questo processo sempre più automatizzato, riducendo il carico manuale su data scientist e ingegneri.

Il termine iperparametro, hyperparameter, distingue esplicitamente queste impostazioni esterne dai parametri, quelli interni che il modello stima durante l'addestramento, una distinzione consolidata nella letteratura statistica e bayesiana ben prima della diffusione del machine learning moderno. Il termine tuning, letteralmente accordatura, richiama la metafora dell'accordare uno strumento musicale fino a trovare il suono giusto, un'immagine che rende bene l'idea di un processo iterativo di aggiustamento fine.

Related terms

More in Fondamenti AI

Put it into practice

From our network

INDACO TMS — Transport Management for European Logistics

Shipment tracking, multi-carrier EDI and automated invoicing in one cloud platform. Invoices generated in under 10 seconds.

Visit indacotms.com →

From the Agora Intelligence blog

More on agora-intelligence.com →

📱 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.