recommendation engine - IndexError: index 77572 is out of bounds for axis 0 with size 671 -
i trying complete movie recommendation system , having trouble following few lines of code:
train_data_matrix = np.zeros((n_users, n_movies)) line in train_data.itertuples(): train_data_matrix[line[0], line[1]] = line[2] test_data_matrix = np.zeros((n_users, n_movies)) line in test_data.itertuples(): test_data_matrix[line[0], line[1]] = line[2]
any appreciated. please find error message receiving below:
indexerror traceback (most recent call last) <ipython-input-52-d28ea8571763> in <module>() 2 train_data_matrix = np.zeros((n_users, n_movies)) 3 line in train_data.itertuples(): ----> 4 train_data_matrix[line[0], line[1]] = li ne[2] 5 6 test_data_matrix = np.zeros((n_users, n_movies)) indexerror: index 77572 out of bounds axis 0 size 671
Comments
Post a Comment