Docsity

Machine learning exercise nites, Cheat Sheet of Machine Learning

Toggle sidebar
bg1
Similarity computation
- Dot product
- Norm (length) of a vector
- Similarity between vectors x and y is given by
- E.g. dot product of x = {3, 1, 2, 4} and y = {1, 2, 1, 2} = 3+2+2+8 = 15
- Length of x = 5.477 and y = 3.162
- Thus, similarity is 0.8660
- Similarity is 0 at 90 degrees
- Similarity is 1 when in exactly the same direction
- It is less than 0 when greater than 90 degrees
- Not possible to be greater than 1
Basics
- This is an identity matrix
- It is a diagonal matrix
- If A is square, AI = IA = A
- A is a matrix where ai are the columns then
o A is orthogonal if ai . aj = 0 where i != j (if AAT = I)
o A is orthonormal if above and ai . ai = 1
- A set of vectors is linearly independent if any element of the set cannot be expressed
as a linear combination of the others
pf3

Partial preview of the text

Download Machine learning exercise nites and more Cheat Sheet Machine Learning in PDF only on Docsity!

Similarity computation

  • Dot product
  • Norm (length) of a vector
  • Similarity between vectors x and y is given by
  • E.g. dot product of x = {3, 1, 2, 4} and y = {1, 2, 1, 2} = 3+2+2+8 = 15
  • Length of x = 5.477 and y = 3.
  • Thus, similarity is 0.
  • Similarity is 0 at 90 degrees
  • Similarity is 1 when in exactly the same direction
  • It is less than 0 when greater than 90 degrees
  • Not possible to be greater than 1

Basics

  • This is an identity matrix
  • It is a diagonal matrix
  • If A is square, AI = IA = A
  • A is a matrix where a i

are the columns then

o A is orthogonal if a i

. a j

= 0 where i != j (if AA

T

= I)

o A is orthonormal if above and a i

. a i

  • A set of vectors is linearly independent if any element of the set cannot be expressed

as a linear combination of the others

  • Set of orthogonal bases for v = (1, 2, 3) = (1, 0, 0); (0, 1, 0); (0, 0, 1)
  • A vector perpendicular to v = (-1, - 1, 1) because if you find their similarity = (- 1 -

2+3)/lengths, we get 0

Determinant

Rank of matrix

  • Maximum number of linearly independent columns
  • Less than or equal to min{m, n}

Transpose of a matrix

  • B(i, j) = A(j, i)

Eigen decomposition

  • If A is symmetric, all its eigen values are real, and all of its eigen vectors are

orthonormal

  • The principle components of X are the eigenvectors of X

T

X

  • Principle component analysis for X is the find the eigen vectors and values of X

T

X

Singular value decomposition

  • Any real matrix X of size (m, n) can be expressed as
  • R is the rank of matrix X
  • U is a (m, r) column-orthonormal matrix
  • V is a (n, r) column-orthonormal matrix
  • Sigma is diagonal r x r matrix