เริ่มต้นใช้งานเริ่มต้นใช้งานได้ฟรี

Recalculating the matrix

Now that you have your three factor matrices, you can multiply them back together to get complete ratings data without missing values. In this exercise, you will use numpy's dot product function to multiply U and sigma first, then the result by Vt. You will then be able add the average ratings for each row to find your final ratings.

U, sigma, Vt, avg_ratings, and user_ratings_df from the previous exercise have been loaded for you. Also, numpy has been loaded as np.

แบบฝึกหัดนี้เป็นส่วนหนึ่งของหลักสูตร

Building Recommendation Engines in Python

ดูคอร์ส

แบบฝึกหัดเชิงโต้ตอบแบบลงมือทำ

ลองทำแบบฝึกหัดนี้โดยเติมโค้ดตัวอย่างนี้ให้สมบูรณ์

# Dot product of U and sigma
U_sigma = np.____(____, ____)
แก้ไขและรันโค้ด