Validation: Two aims • Model selection: estimating the performance (generalization…
- User
Validation: Two aims • Model selection: estimating the performance (generalization error) of different learning models in order to choose the best one (to generalize). – this includes search the best hyper-parameters of your model (e.g. polynomial order, lambda of ridge regression, …). It returns a model • Model assessment: having chosen a final model, estimating/evaluating its prediction error/ risk (generalization error) on new test data (measure of the quality/performance of the ultimately chosen model). It return an estimation Gold rule: Keep separation between goals and use separate data sets in each phase
sPIEGA IN ITALIANO
- Assistant
La convalida ha due obiettivi principali:
-
Selezione del Modello: Questo obiettivo si concentra sulla stima della performance (errore di generalizzazione) di diversi modelli di apprendimento per scegliere quello migliore, ovvero quello che generalizza meglio. Ciò include la ricerca dei migliori iper-parametri per il tuo modello, come l'ordine di un polinomio, il lambda nella regressione ridge, eccetera. L'obiettivo è ritrovare un modello che si adatti nel migliore dei modi ai dati disponibili, senza però che questo comporti un’applicazione troppo specifica ai dati di addestramento (overfitting).
-
Valutazione del Modello: Una volta scelto il modello finale, il secondo obiettivo consiste nel stimare/valutare il suo errore di predizione o il rischio (errore di generalizzazione) su nuovi dati di test, ovvero dati che il modello non ha mai visto durante la fase di addestramento. Questo serve a misurare la qualità o la performance del modello definitivamente scelto. In questa fase, si ottiene una stima della capacità del modello di generalizzare su dati non visti.
-
- User
Hold out University of Pisa • If data set size is sufficient: e.g. 50% TR, 25% VL, 25% TS disjoint sets • TR: Training set is used to fit [training] • VL: Validation set (or selection set) is used to select the best models (among different models and/or hyper-parameters configurations) [model selection] • TR+VL sometimes are joitnly called development/design set , i.e. used to build the final model • TS:Test set is used for estimation of generalization error (of the final model) [model assessment] Notes:
- the estimation made for model selection (on vl set) [is for model selection purpose], it is not a good estimation for the assessment phase/risk test.
- Test set results cannot be used for model selection (or call it validation set) A. Micheli 11 Training Validation Test Dt+v Development/design set D\Dt+v Defs Dip. Informatica University of Pisa A. Micheli 12 Test or model selection? • What if test set is used in a (repeated) design cycle? – We are making model selection and not reliable assessment (estimation of expected generalization error) • and we wouldn't be able to do that on future examples • Blind test set concept (e.g. for ML competitions) • Image an exam exercise: if you see the solutions it is not a test! – In that case, used test set error provides an overoptimistic evaluation of the true test error (→ we will see how easy is to obtain very high classification accuracy over a random task even using the test set only implicitly) Gold rule: Keep separation between goals and use separate sets in each phase (TR for training, VL for model selection, TS for risk estimation
- Assistant
- User
il senso del Dilemma del Test Set nel Ciclo di Design è che una volta fatto il model assessment non si possa tornare indietro per migliorare i risultati poichè sarebbe come se usassimo gli elementi del test set come elementi del training set?
- Assistant
Esattamente, hai colto il concetto centrale del dilemma del test set nel ciclo di design. L'idea fondamentale è che, una volta che hai utilizzato il test set per valutare il tuo modello (model assessment), dovresti considerare quella valutazione come definitiva per quel particolare ciclo di sviluppo del modello. Se, in base ai risultati ottenuti sul test set, decidi di apportare modifiche al modello - che si tratti di aggiustamenti agli iper-parametri, alla selezione delle caratteristiche, o ad altri aspetti dell'algoritmo di apprendimento - e poi valuti nuovamente il modello sullo stesso test set, in pratica stai inquinando la tua valutazione.
- User
Search on a grid (e.g. with 2 hyper-parameters) • Find hyper-parameters value (i.e. parameters that are not directly learnt, which are not modified by training) • Search best hyper-parameter can be a <> over a grid of candidate values. For each trained model hw,λ compute the results (accuracy) on the VL set. Then take the one with the minimum error or the max accuracy. A. Micheli 15 Hyperparam. Lambda 0.1 Lambda 0.01 Lambda 0.001 Degree 1 Res1 Res4 Res7 Degree 2 Res2 Res5 Res8 Degree 4 Res3 Res6 Res9 E.g. “Res1” is computed on the VL set, by the model with and Polynomial-Degree=1 and Lambda=0.1 trained on the TR set ▪ Example: The best one is Res3 → (Degree 4, lambda=0.1) is the winner ▪ We can automatize it!!! Parallelization is easy (independence of the trials) ▪ Alternatives exist to reduce the cost or to automatize the search *
56+Spiega soprattutto il concetto di iper paramentro
- Assistant
- User
Hold out CV can make insufficient use of data Hold out and K-fold cross validation • Split the data set D into k mutually exclusive subsets D1 ,D2 ,…,DK • Train the learning algorithm on D\Di and test it on Di • Summarize averaging all the Di results (diagonal) • NOTE: This technique can be used both for the validation set or for the test set • It uses all the data for training and validation or testing D1 D2 D3 D4 D1 D2 D3 D4 D1 D2 D3 D4 D1 D2 D3 D4 K-fold Cross-Validation Issues: • How many folds? 3-fold, 5-fold , 10-fold, …., 1-leave-out • Often computationally very expensive • Combinable with validation set, double-K-fold CV, ….
spiega
- Assistant