sistemi intelligenti supervised learning supervised
play

Sistemi Intelligenti Supervised learning Supervised learning - PDF document

Sistemi Intelligenti Supervised learning Supervised learning Alberto Borghese Universit degli Studi di Milano Laboratorio di Sistemi Intelligenti Applicati (AIS-Lab) Dipartimento di Scienze dellInformazione Alb t b


  1. Sistemi Intelligenti Supervised learning Supervised learning Alberto Borghese Università degli Studi di Milano Laboratorio di Sistemi Intelligenti Applicati (AIS-Lab) Dipartimento di Scienze dell’Informazione Alb t b Alberto.borghese@unimi.it h @ i i it A.A. 2014-2015 http:\borghese.di.unimi.it\ 1/57 Riassunto � Supervised learning � Regressione multi-scala � Classificazione Cl ifi i A.A. 2014-2015 2/57 http:\borghese.di.unimi.it\ 1

  2. Classificazione e regressione Mappatura dello spazio dei campioni nello spazio delle classi. Classe 1 Classe 2 Campione X p Classe 3 SPAZIO DELLE SPAZIO DEI CAMPIONI CLASSI (identificate / DELLE FEATURES da un’etichetta) (CARATTERISTICHE) . . . . . . Flusso . Controllo della portata di un condizionatore in funzione della temperatura. “Imparo” una funzione continua a partire da alcuni campioni: devo imparare ad interpolare (regressione = predictive learning). T A.A. 2014-2015 http:\borghese.di.unimi.it\ 3/57 Ruolo dei modelli Identificazione: stimo i parametri di un modello a partire dai dati: � identifico il modello. Utilizzo: utilizzo il modello per inferire informazioni su nuovi dati � (controllo, regressione predittiva, classificazione). A.A. 2014-2015 4/57 http:\borghese.di.unimi.it\ 2

  3. Modello parametrico 1 1 0.8 0.8 0.6 0.6 0.6 0.6 0.4 0.4 0.2 0.2 0 0 -0.2 -0.2 -0.4 -0.4 -0.6 -0.6 -0.8 -0.8 -1 -1 0 200 400 600 800 1000 1200 1400 1600 1800 2000 0 200 400 600 800 1000 1200 1400 1600 1800 2000 I punti vengono fittati perfettamente da una sinusoide: y = A sin( ω x + φ ). Devo determinare solo i 3 parametri della sinusoide (non lineare), i cui valori ottimali sono: ω = 1/200, φ = 0.1, Α = 1. I parametri hanno un significato semantico. A.A. 2014-2015 http:\borghese.di.unimi.it\ 5/57 I modelli semi-parametrici L’approssimazione è ottenuta mediante funzioni “generiche”, dette di base, � soluzione molto utilizzata nelle NN e in Machine learning. E’ anche associato all’ approccio «black-box» in cibernetica. Non si hanno informazioni sulla struttura dell’oggetto che vogliamo rappresentare. (Il concetto di Base in matematica è definito mediante certe proprietà di � approssimazione che qui non consideriamo, consideriamo solo l’idea intuitiva). Il concetto di base è simile a quello dei “replicating kernels”. E’ anche l’idea che sta alla base delle Reti Neurali Artificiali � ∑ = σ ( ( , )) ( , ; ) z p x y w G p p i i i i Combinazione Da calcolare lineare di funzioni di base Funzione di base (fissate) A.A. 2014-2015 6/57 http:\borghese.di.unimi.it\ 3

  4. Approssimazione mediante un modello semi-parametrico (lineare) 1 1 0.9 0.8 0.8 0.6 0.6 0.7 0.4 0.6 0.2 0 0.5 -0.2 0.4 -0.4 0.3 -0.6 0.2 -0.8 0.1 -1 0 0 200 400 600 800 1000 1200 1400 1600 1800 2000 0 200 400 600 800 1000 1200 1400 1600 1800 2000 Sinusoide y = A sin( ω x + φ ) con ω = 1/200, φ = 0.1. Vogliamo fittare i punti con l’insieme di Gaussiane riportate sulla dx. In questo caso hanno tutte σ = 90. Come le utilizzo? A.A. 2014-2015 http:\borghese.di.unimi.it\ 7/57 Funzionamento di un modello semi- parametrico (lineare) 1 1 0.8 0.8 0.6 0.6 0.6 0.4 0.4 0.2 0.2 0 0 -0.2 -0.2 -0.4 -0.4 -0.6 -0.6 -0.8 -0.8 -1 -1 0 200 400 600 800 1000 1200 1400 1600 1800 2000 0 200 400 600 800 1000 1200 1400 1600 1800 20 Devo definire, gli M {w i }. ∑ = − o ( ) ( ; 90 ) y x w G x x 3 << M << N – numero punti. i o i = i 1 I σ sono tutti uguali ed uguali a 90 o , le Gaussiane sono equispaziate. Le Gaussiane sono note tutte a priori, devono essere definiti i pesi. A.A. 2014-2015 8/57 http:\borghese.di.unimi.it\ 4

  5. Modelli lineari e non lineari Classificazione alternativa dei modelli. Vengono utilizzate classi molto diversi di algoritmi per stimare i parametri di questi due tipi di modelli. ∑ ( ) ∑ = = = ( ( , )) ( ) z p x y f x w i x ( ( , )) ; ) z p x y f p w i i i f(.) è funzione lineare nei {w i } ( ) { i } f(.) è funzione non lineare f(.) è funzione non lineare e.g. f(.) = e w x f(.) = x ln(w x) .... A.A. 2014-2015 http:\borghese.di.unimi.it\ 9/57 How to classify the error introduced by a model? Is the model good enough? Does it have enough parameters? Does it cover the input domain (in all dimensions)? This is not enough to obtain a good model!! The model should be properly tuned to the data A.A. 2014-2015 10/57 http:\borghese.di.unimi.it\ 5

  6. How to classify the error introduced by a model? y How is the estimated model related to the true model? True model x x Bias and variability trade-off Bias is the distance of the model curve from the true unknown curve. It is associated to model error. A.A. 2014-2015 http:\borghese.di.unimi.it\ 11/57 Variability How are the measured points related to the estimated model? Given P mes (x mes ,y mes ) and y = f(x), the error is measured as: dist(y mes ,f(x mes )), for instance Euclidean distance. It is associated to measurement error. If variability goes to zero, bias increases and overfitting arises. We want to eliminate bias and leave variability to noise. In a good model, variability tends to the statistics of the measurement noise. A.A. 2014-2015 12/57 http:\borghese.di.unimi.it\ 6

  7. Problemi nella procedura di apprendimento Quando si termina l’algoritmo di apprendimento? Bootstrap – Vengono estratti pattern con ripetizioni. Cross-Validation - Errore sull’insieme di training = g Errore sull’insieme di test. Utilizzare lo “structural risk” invece dell’”empirical risk”. Si vuole evitare che il modello si specializzi troppo sui pattern di training e non sia in grado di interpolare. Errore Training set Test set # iterazioni A.A. 2014-2015 http:\borghese.di.unimi.it\ 13/57 Problema dell’overfitting dovuto a sovraparametrizzazione Quante unità? A.A. 2014-2015 14/57 http:\borghese.di.unimi.it\ 7

  8. Riassunto � Supervised learning � Regressione multi-scala � Classificazione Cl ifi i A.A. 2014-2015 http:\borghese.di.unimi.it\ 15/57 Pyramidal reconstruction Which is the adequate � scale? Which model is the � closest to the true model? A.A. 2014-2015 16/57 http:\borghese.di.unimi.it\ 8

  9. Surface reconstruction with filtering Convolution: � we can reconstruct signals up to a certain scale, provided an adequate small value of σ . N ∑ ˆ = − σ = − σ ( ) * ( ; ) ( ; ) f x f G x x w G x x Discrete convolution: i k � i k i i = 1 i The reconstruction of the function, if G(.) is normalized, is obtained through digital filtering. filtering. Extrapolation beyond the sample points. Reconstruction up to a given scale. A.A. 2014-2015 http:\borghese.di.unimi.it\ 17/57 Filters and bases Δ x k Normalization factor π σ Normalized Gaussians, filter = weighed sum of shifted (normalized) basis functions. Basis representation. Approximation space. Riesz basis, the approximation space is characterized by the scale of the basis that determines the amplitude of the space. A sequence of spaces can be defined according to σ : q p g σ 0 -> V 0 ; σ 1 -> V 1 ; σ 2 -> V 2 …. The number of representable functions increases. A.A. 2014-2015 18/57 http:\borghese.di.unimi.it\ 9

  10. Advantages and problems Filters interpolates and reduces noise but... Height in the Height in the function on a grid crossing should be known. A.A. 2014-2015 http:\borghese.di.unimi.it\ 19/57 Gridding How can we determine w k from points clouds? Local estimators. Nadaraya Watson estimator. Lazy learning . x c − 2 x x ( ) − i c ∑ ∑ σ 2 y K x x y e σ ) i i , c i ( ) = = i i \ f x c ( ( ) ) 2 − ∑ ∑ x x − i c ∑ ∑ K K x x x x σ 2 2 σ e i , c i i K σ (.) Gaussiana Parzen-window estimators. A.A. 2014-2015 20/57 http:\borghese.di.unimi.it\ 10

  11. RBF Network Connessionism. Simple processing units combined with simple operations to create complex functions. Perceptron A.A. 2014-2015 http:\borghese.di.unimi.it\ 21/57 Surface Approximation � Properties: - Redundancy. - Riesz basis (unique representation, representation given the height in the grid crossings). Which scale? Too high Too high Too low Too low A.A. 2014-2015 22/57 http:\borghese.di.unimi.it\ 11

  12. Incremental strategy � Acquire more data in the more complex areas, less smooth, higher frequency. � Acquire less data in the less complex areas, more smooth, lower frequency. � Can we use a single Δ x? Incremental approximation with local adaptation. A.A. 2014-2015 http:\borghese.di.unimi.it\ 23/57 Start from low resolution � Low resolution, small distance, 1/ Δ x > 2 ν Max σ determines the amount of overlap. It determines also the frequency content of the frequency content of the Gaussian G(.). Once σ (or Δ x is computed) the support is defined. A.A. 2014-2015 24/57 http:\borghese.di.unimi.it\ 12

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend