BaşlayınÜcretsiz Başlayın

Matrix multiplication

To understand matrix multiplication more directly, let's do some matrix operations manually.

Bu egzersiz

Building Recommendation Engines with PySpark

kursunun bir parçasıdır
Kursu Görüntüle

Egzersiz talimatları

  • Matrices a and b are Pandas dataframes. Use the .head() method on each of them to view them.
  • Work out the product of these two matrices on your own.
  • Enter the values of the product of the a and b matrices into the product array, created using np.array().
  • Use the validation on the last line of code to evaluate your estimate. The .dot() method multiplies two matrices together.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Use the .head() method to view the contents of matrices a and b
print("Matrix A: ")
print (a.____())

print("Matrix B: ")
print (b.____())

# Complete the matrix with the product of matrices a and b
product = np.array([[____,____], [____,____]])

# Run this validation to see how your estimate performs
product == np.dot(a,b)
Kodu Düzenle ve Çalıştır