1. Learn
  2. /
  3. Courses
  4. /
  5. Building Recommendation Engines with PySpark

Connected

Exercise

Matrix factorization

Matrix G is provided here as a Pandas dataframe. View it to understand what it looks like. Look at the possible factor matrices H, I, and J (also Pandas dataframes), and determine which two matrices will produce the matrix G when multiplied together.

Instructions

100 XP
  • Take a look at matrix G using the print command
  • Take a look at the matrices H, I, and J and determine which pair of those matrices will produce G when multiplied together.
  • Input your answer into the np.matmul() code provided.