我得到以下错误
numpy.core._exceptions.MemoryError: Unable to allocate array with shape (1329, 22474) and data type float64
这是我的代码:
interactions_df = pd.DataFrame(list(DB[USER_COLLECTION].find({})))
interactions_full_df = interactions_df.groupby(['personId', 'contentId'])[
'eventStrength'].sum().apply(smooth_user_preference).reset_index()
users_items_pivot_matrix_df = interactions_full_df.pivot(index='personId', # edited: interactions_train_df
columns='contentId',
values='eventStrength').fillna(0)
users_items_pivot_matrix = users_items_pivot_matrix_df.as_matrix()
users_ids = list(users_items_pivot_matrix_df.index)
在{_id, personId(string), eventStrength(double), contentId(int32)
,我试图通过设置来增加ram,但没有效果,仍然无法解决
更新: 将windows上的自定义虚拟内存设置为最大内存80000 MB和初始大小5500 MB,并重新启动系统后,仍然存在内存错误
目前没有回答
相关问题 更多 >
编程相关推荐