2019年8月7日

Debug 路漫漫-14:Python: AttributeError: module 'tensorflow' has no attribute 'sub'

摘要: 在调试 《Neural Factorization Machines for Sparse Predictive Analytics》论文的源码(https://github.com/hexiangnan/neural_factorization_machine )时,出现的问题: 原因: 版本更新 阅读全文

posted @ 2019-08-07 20:07 CuriousZero 阅读(1474) 评论(0) 推荐(0) 编辑

Python 数据处理之对 list 数据进行数据重排(为连续的数字序号)

摘要: Python 数据处理之对 list 数据进行数据重排(为连续的数字序号) # user ID 序号重新排,即,原来是 1,3,4,6 ,排为 1,2,3,4 # item ID 序号重新排,too 使用 方法: 参数意义: ascending=1是升序 descending=1 是降序 (啊~链接 阅读全文

posted @ 2019-08-07 15:01 CuriousZero 阅读(2378) 评论(0) 推荐(0) 编辑

Debug 路漫漫-13:Python: pandas IndexError: single positional indexer is out-of-bounds

摘要: 在数据预处理过程中,出现:IndexError: single positional indexer is out-of-bounds 原因是在使用 Pandas 读取 dataframe 的时候,分隔符搞错了!!! 这个时候,定点Debug一下,看一下切分出来的数据片格式 即可, 阅读全文

posted @ 2019-08-07 14:50 CuriousZero 阅读(19700) 评论(0) 推荐(0) 编辑

Python 将numpy array由浮点型转换为整型

摘要: Python 将numpy array由浮点型转换为整型 ——使用numpy中的astype()方法可以实现,如: 阅读全文

posted @ 2019-08-07 09:09 CuriousZero 阅读(47876) 评论(1) 推荐(0) 编辑

导航