Docsity

Instance based Learning in the Machine Learning | CSI 5325, Study notes of Computer Science

Partial preview of the text

Download Instance based Learning in the Machine Learning | CSI 5325 and more Study notes Computer Science in PDF only on Docsity!

Intro. to machine learning (CSI 5325)

Lecture 19: Instance-based learning

Greg Hamerly

Some content from Tom Mitchell.

Outline

1 Advanced topics in instance-based learning

Advanced topics in instance-based learning

Principal components analysis

0

2

4

-8 -6 -4 -2 0 2 4 6 8

Advanced topics in instance-based learning

PCA (2)

PCA is a linear transformation of the data into a new basis.

It assumes that there is some orthogonal vector basis of the original data which captures the variance of the data in a better way.

In the transformed data, the first dimension has the largest variance, the second dimension has the second largest variance, etc.

It finds a new set of orthogonal basis vectors in the original space that point in the directions of maximum variance.

Advanced topics in instance-based learning

Random linear projections

Basic idea: choose k random vectors in the original space, where k  d linearly project all the data to the k new vectors learn in this lower-dimensional space

Even though it sounds crazy, amazing properties.

Johnson-Lindenstrauss lemma: if we project n points into k = O(log n) dimensions, then there is a high probability that the O(n^2 ) inter-point distances will remain nearly the same. note – no dependence on the original d!

Advanced topics in instance-based learning

Application of Random linear projections

Random linear projections are a key part of my research in SimPoint, which uses machine learning to analyze program execution.

To begin with, we have data from an executed program: each example is a window of (e.g.) 1,000,000 instructions executed the attributes are the regions of code that execute the attribute values are the number of times each region executes during that time window

Advanced topics in instance-based learning

Multidimensional scaling

Given a set of pairwise distances (not original points), find a set of vectors which preserve those distances.

Given: d(xi , xj ), pairwise distances for n points (1 ≤ i, j ≤ n).

Find the minimum of S(y 1 , y 2 ,... , yn) =

i 6 =j

(||yi − yj || − d(xi , xj ))^2

where yi are vectors in some space of some chosen dimension. want sufficient dimension for yi , but not too high! method: minimize S by gradient descent on yi vectors.

Advanced topics in instance-based learning

Nonlinear manifold learning

Basic idea: what if the data lives in some non-linear subspace? The ‘swiss roll’:

Advanced topics in instance-based learning

Alternative distance metrics (L 1 , etc.)

Minkowski (Lp ) norm:

Lp (x) =

( (^) d ∑ i=

|x|p

) 1 /p

dp (x, y ) = ||x − y ||p = Lp (x − y )

L 2 = Euclidean distance L 1 = Manhattan distance L∞ = max

General observation: in high dimension, lower p norms tend to work better (Aggarwal 2001).

Advanced topics in instance-based learning

Mahalanobis distance

Given a scaling matrix A ∈ Rd×d^ , the Mahalanobis distance between vectors x, y ∈ Rd^ is

||x − y ||A =

(x − y )T^ A(x − y )

This has relevance with: Gaussian probability distribution (A = Σ−^1 , where Σ is the covariance matrix) principal components analysis metric learning