1. Learn
  2. /
  3. Courses
  4. /
  5. Linear Algebra for Data Science in R

Connected

Exercise

Adjusting the Massey Matrix

For our WNBA Massey Matrix model, some adjustments need to be made for a solution to our rating problem to exist and be unique. This is because the matrix we currently have is not (computationally) invertible.

One way we can change this is to add a row of 1's on the bottom of the matrix \(M\), column of -1's to the far right of \(M\), and a 0 to the bottom of the vector of point differentials \(\vec{f}\). In this exercise, you will actually add all of these to the matrix \(M\).

Instructions

100 XP
  • Add a row of 1's to the bottom of the matrix M using the command rbind(). Assign the result to M_2.
  • Add a column of -1's to the right of M_2 using the command cbind(). Assign the result to M_3.
  • Set the 13x13 element of M_3 to 1.
  • Print the resulting matrix.