machine learning 2007 lecture 2 instructor tim van erven
play

Machine Learning 2007: Lecture 2 Instructor: Tim van Erven - PowerPoint PPT Presentation

Machine Learning 2007: Lecture 2 Instructor: Tim van Erven (Tim.van.Erven@cwi.nl) Website: www.cwi.nl/erven/teaching/0708/ml/ September 13, 2007 1 / 34 Overview Organisational Organisational Matters Matters This Lecture versus


  1. Machine Learning 2007: Lecture 2 Instructor: Tim van Erven (Tim.van.Erven@cwi.nl) Website: www.cwi.nl/˜erven/teaching/0708/ml/ September 13, 2007 1 / 34

  2. Overview Organisational Organisational Matters ● Matters This Lecture versus Mitchell ● This Lecture versus Mitchell Vectors and Matrices ● Scalars, Vectors and Matrices ✦ Scalars, Vectors and Matrices Addition ✦ Addition Multiplication by a ✦ Multiplication by a Scalar Scalar ✦ The Transpose The Transpose ✦ Multiplying Vectors or Matrices Multiplying Vectors or Matrices ✦ The Identity Matrix The Identity Matrix ✦ The Matrix Inverse The Matrix Inverse Data Representation Using Vectors ● Data Representation Using Vectors 2 / 34

  3. Organisational Matters Please register on Blackboard: Organisational ● Matters Machine Learning (2007-2008) 1 This Lecture versus Mitchell Final exam: December 20, 18.30 – 21.15 ● Scalars, Vectors and Homework Exercises 1 moved to this week. I will make an ● Matrices alternative version available for students who have not seen Addition vectors and matrices before. Multiplication by a Scalar The Transpose Multiplying Vectors or Matrices The Identity Matrix The Matrix Inverse Data Representation Using Vectors 3 / 34

  4. Overview Organisational Organisational Matters ● Matters This Lecture versus Mitchell ● This Lecture versus Mitchell Vectors and Matrices ● Scalars, Vectors and Matrices ✦ Scalars, Vectors and Matrices Addition ✦ Addition Multiplication by a ✦ Multiplication by a Scalar Scalar ✦ The Transpose The Transpose ✦ Multiplying Vectors or Matrices Multiplying Vectors or Matrices ✦ The Identity Matrix The Identity Matrix ✦ The Matrix Inverse The Matrix Inverse Data Representation Using Vectors ● Data Representation Using Vectors 4 / 34

  5. This Lecture versus Mitchell Mitchell Organisational Matters This Lecture versus Mitchell Still Chapter 1 and Chapter 2 up to section 2.2. (Be patient, ● Scalars, Vectors and we will go faster soon enough.) Matrices Addition This Lecture Multiplication by a Scalar The Transpose Vectors and matrices are not in Mitchell. ● Multiplying Vectors or There is no explicit discussion on data representation in ● Matrices Mitchell. The Identity Matrix The Matrix Inverse Data Representation Using Vectors 5 / 34

  6. Overview Organisational Organisational Matters ● Matters This Lecture versus Mitchell ● This Lecture versus Mitchell Vectors and Matrices ● Scalars, Vectors and Matrices ✦ Scalars, Vectors and Matrices Addition ✦ Addition Multiplication by a ✦ Multiplication by a Scalar Scalar ✦ The Transpose The Transpose ✦ Multiplying Vectors or Matrices Multiplying Vectors or Matrices ✦ The Identity Matrix The Identity Matrix ✦ The Matrix Inverse The Matrix Inverse Data Representation Using Vectors ● Data Representation Using Vectors 6 / 34

  7. Scalars and Vectors Organisational Scalars: Matters This Lecture versus A scalar α is just an ordinary number (element of R ). Mitchell Scalars, Vectors and For example: x = 10 . ● Matrices Addition Vectors: Multiplication by a Scalar   x 1 The Transpose . . An n -dimensional vector x =  is a list of n numbers.   . Multiplying Vectors or  Matrices x n The Identity Matrix   3 The Matrix Inverse Data Representation − 4 / 7   Using Vectors For example, x =  . ●   π  10 Note the convention of writing the list vertically. ● 7 / 34

  8. The Vector Space R n The set of all n -dimensional vectors is defined as: Organisational Matters This Lecture versus     x 1 Mitchell �    . �  R n = . Scalars, Vectors and � x 1 ∈ R , . . . , x n ∈ R . x =   � . Matrices �     x n   Addition Multiplication by a Scalar Such spaces are called vector spaces . ● The Transpose Geometrically, R 1 = R is a line. ● Multiplying Vectors or R 2 is a plane. Matrices ● R 3 is the 3 -dimensional space. The Identity Matrix ● R n is the n -dimensional space. The Matrix Inverse ● Data Representation Using Vectors 8 / 34

  9. Matrices Definition: Organisational Matters This Lecture versus An m × n matrix A with elements a ij is an array of numbers: Mitchell Scalars, Vectors and   Matrices a 11 a 12 · · · a 1 n Addition a 21 a 22 · · · a 2 n   A =  . Multiplication by a  . . .  ... . . .   Scalar . . .  The Transpose a m 1 a m 2 · · · a mn Multiplying Vectors or Matrices In a ij : i indicates the row and j indicates the column. ● The Identity Matrix An m × 1 matrix is an m -dimensional vector. ● The Matrix Inverse Data Representation Using Vectors Example:   − 3 10 1 7 A = π − 1 / 9 6 2   0 0 1 2 9 / 34

  10. Overview Organisational Organisational Matters ● Matters This Lecture versus Mitchell ● This Lecture versus Mitchell Vectors and Matrices ● Scalars, Vectors and Matrices ✦ Scalars, Vectors and Matrices Addition ✦ Addition Multiplication by a ✦ Multiplication by a Scalar Scalar ✦ The Transpose The Transpose ✦ Multiplying Vectors or Matrices Multiplying Vectors or Matrices ✦ The Identity Matrix The Identity Matrix ✦ The Matrix Inverse The Matrix Inverse Data Representation Using Vectors ● Data Representation Using Vectors 10 / 34

  11. Adding Vectors Definition: Organisational Matters For any two vectors x , y ∈ R n This Lecture versus Mitchell Scalars, Vectors and       x 1 y 1 x 1 + y 1 Matrices . . . Addition . . .  . x + y =  +  =       . . .    Multiplication by a Scalar x n y n x n + y n The Transpose Multiplying Vectors or You can not add vectors of different dimensionality. ● Matrices The Identity Matrix Example: The Matrix Inverse Data Representation       3 6 9 Using Vectors − 5 10 5             − 4 / 7 24 / 7 x + y = + 4 =             π − 3 π − 3       0 2 2 11 / 34

  12. Adding Matrices Definition: Organisational Matters This Lecture versus For any two m × n matrices A and B , Mitchell Scalars, Vectors and     a 11 · · · a 1 n b 11 · · · b 1 n Matrices . . . . ... ... Addition . . . . A + B =  +     . . . .    Multiplication by a Scalar a m 1 · · · a mn b m 1 · · · b mn The Transpose Multiplying Vectors or Matrices   a 11 + b 11 · · · a 1 n + b 1 n The Identity Matrix . . ... . .  . =   . . The Matrix Inverse  a m 1 + b m 1 · · · a mn + b mn Data Representation Using Vectors You can not add matrices of different dimensionality. ● 12 / 34

  13. Adding Matrices Organisational Example: Matters This Lecture versus Mitchell       − 1 − 1 1 2 3 1 0 3 2 Scalars, Vectors and π 5 + π Matrices 4 5 6 1 1 5 7        +  =       − 1 − 1 Addition 7 8 9 1 6 9 8     Multiplication by a 10 11 12 0 6 0 10 17 12 Scalar The Transpose But this is not defined: Multiplying Vectors or Matrices   The Identity Matrix 13 21 � 1 � 1 2  = ? The Matrix Inverse + 34 55  3 5 8 Data Representation 89 144 Using Vectors 13 / 34

  14. Overview Organisational Organisational Matters ● Matters This Lecture versus Mitchell ● This Lecture versus Mitchell Vectors and Matrices ● Scalars, Vectors and Matrices ✦ Scalars, Vectors and Matrices Addition ✦ Addition Multiplication by a ✦ Multiplication by a Scalar Scalar ✦ The Transpose The Transpose ✦ Multiplying Vectors or Matrices Multiplying Vectors or Matrices ✦ The Identity Matrix The Identity Matrix ✦ The Matrix Inverse The Matrix Inverse Data Representation Using Vectors ● Data Representation Using Vectors 14 / 34

  15. Multiplying a Vector by a Scalar Definition: Organisational Matters For any vector x ∈ R n and scalar α ∈ R This Lecture versus Mitchell Scalars, Vectors and     x 1 αx 1 Matrices . . Addition . . α x = α  .  =     . .   Multiplication by a Scalar x n αx n The Transpose Multiplying Vectors or Example: Matrices The Identity Matrix     3 6 The Matrix Inverse 10 20 Data Representation     Using Vectors     − 4 / 7 − 8 / 7     2 x = 2 =     π 2 π         0 0     − 1 − 2 15 / 34

  16. Multiplying a Matrix by a Scalar Definition: Organisational Matters This Lecture versus For any m × n matrix A and scalar α ∈ R Mitchell Scalars, Vectors and     a 11 · · · a 1 n αa 11 · · · αa 1 n Matrices . . . . ... ... Addition . . . . αA = α  .  =     . . . .   Multiplication by a Scalar a m 1 · · · a mn αa m 1 · · · αa mn The Transpose Multiplying Vectors or Example: Matrices � 3 The Identity Matrix � � − 6 � − 1 − 9 2 18 The Matrix Inverse − 2 = − 4 − 10 − 8 5 4 8 Data Representation Using Vectors 16 / 34

Recommend


More recommend