Docsity

Machine Learning in Biomedical Engineering: Regularization, Shrinkage, and Ensembles, Appunti di Machine learning

Anteprima parziale del testo

Scarica Machine Learning in Biomedical Engineering: Regularization, Shrinkage, and Ensembles e più Appunti in PDF di Machine learning solo su Docsity!

Machine Learning for

Biomedical Engineering

Enrico Grisan

[email protected]

Regularization

• Do not need validation set to know some fits are silly

• Discourage solutions we don’t like

• Formalizing the cost of solutions we do not like

Ridge regression

p=

𝒘

= 𝑎𝑟𝑔 min 𝒘 𝐿 𝑦 𝒙∗ ; 𝑦∗ + 𝜆 𝒘 (^2) 𝒘

= 𝑎𝑟𝑔 min 𝒘

(𝑦𝑖 − 𝑦𝑖)

  • 𝜆 𝑗= 1

𝑤𝑗

𝑅𝑆𝑆 𝜆 = 𝒚 − 𝑿𝒘

𝒚 − 𝑿𝒘 + 𝜆𝒘

𝒘 𝒘

= (𝑿

𝑿 + 𝜆𝑰)

𝑿

𝒚

LASSO

Least Absolute Shrinkage and Selection Operator

p=

𝒘

= 𝑎𝑟𝑔 min 𝒘 𝐿 𝑦 𝒙∗ ; 𝑦∗ + 𝜆 𝒘 (^1) 𝒘

= 𝑎𝑟𝑔 min 𝒘

(𝑦𝑖 − 𝑦𝑖)

  • 𝜆 𝑗= 1

|𝑤𝑗|

Other shrinkage norms

𝑝 = 4 𝑝 = 2 𝑝 = 1 𝑝 = 0. 5 𝑝 = 0. 2 𝑝 = 1. 2 𝛼 = 0. 2 Elastic net: 𝛼 𝒘 2 + ( 1 − 𝛼) 𝒘 (^1)

Regularization constants

How do we pick 𝝀 or t?

1) Based on validation

2) Based on bounds on generalization error

3) Based on empirical Bayes

4) Reinterpreting 𝜆

5) Going full Bayesian approach

Some tricks of the trade

• Preprocessing

• Transformations

• Features

Log transform inputs

Positive quantities are often highly skewed

Log-domain is often much more natural

Encoding attributes

• Categorical variables

– A study has three individuals

– Three different colours

– Possible encoding: 100, 010, 001

• Ordinal variables

– Movie rating, stars

– Tissue anomaly rating, expert scores 1 - 3

– Possible encoding: 00, 10, 11

Basis function features

In the regression and classification examples we used

polynomials 𝑥, 𝑥

Often a bad choice

Polynomials of sparse binary features may make sense:

Other options:

- radial basis function: 𝑒

2

2

- sigmoids: 1 /( 1 + 𝑒

𝑇

- Fouries, wavelets …

The SIFT story

Taken from http://yann.lecun.com/ex/pamphlets/publishing-models.html

Many of us have horror stories about how some of our best papers have been

rejected by conferences. Perhaps the best case in point of the last few years is

David Lowe's work on the SIFT method. After years of being rejected from

conference starting in 1997 , the journal version published in 2004 went on to

become the most highly cited paper in all of engineering sciences in 2005.

David Lowe relates the story:

I did submit papers on earlier versions of SIFT to both ICCV and CVPR

(around 1997 / 98 ) and both were rejected. I then added more of a systems

flavor and the paper was published at ICCV 1999 , but just as a poster. By then

I had decided the computer vision community was not interested, so I applied

for a patent and intended to promote it just for industrial applications.

A rant about least squares

Whenever a person eagerly inquires if my computer can solve a set of 300 equations in 300 unknowns... The odds are all too high that our inquiring friend... Has collected a set of experimental data and is now attempting to fit a 300 - parameter model to it - by Least Squares! The sooner this guy can be eased out of your office, the sooner you will be able to get back to useful work - but these chaps are persistent... you end up by getting angry and throwing the guy out of your office. There is usually a reasonable procedure. Unfortunately, it is undramatic, laborious, and requires thought - which most of these charlatans avoid like the plague. They should merely fit a five-parameter model, then a six-parameter one... Somewhere along the line - and it will be much closer to 15 parameters than to 300 – the significant improvement will cease and the fitting operation is over. There is no system of 300 equations, no 300 parameters, and no glamor. The computer center's director must prevent the looting of valuable computer time by these would-be tters of many parameters. The task is not a pleasant one, but the legitimate computer users have rights, too... the impasse finally has to be broken by violence - which therefore might as well be used in the very beginning. Numerical methods that (mostly) work, Forman S. Acton ( 1990 , original edition 1970 )

Exploiting weak classifiers

Instead of learning a single classifier

Learn many weak classifiers that are good at

difference parts of the input space

Output class: vote of each classifier

Ensamble methods

We like that :

  • Classifiers that are most ‘sure’ will vote with more conviction
  • Classifiers will be most ‘sure’ about a particular part of the space
  • On average, do better than single classifiers How?
  • Force a classifier ℎ𝑡 to learn different part of the input space?
  • Weight the votes of each classifier 𝛼𝑡?