上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 57 下一页

2019年8月7日

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 阅读(2434) 评论(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 阅读(20306) 评论(0) 推荐(0)

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

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

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

2019年8月4日

Debug 路漫漫-12:Python: ValueError: 'userid' is both an index level and a column label, which is ambiguous.

摘要: 啊,又遇到难题了 == 想要对两个 dataframe 做自然连接 merge,连接的key 为 “userid”,但是报错:ValueError: 'userid' is both an index level and a column label, which is ambiguous. 【解决 阅读全文

posted @ 2019-08-04 22:16 CuriousZero 阅读(11432) 评论(4) 推荐(0)

2019年7月30日

Python处理数据集-2

摘要: 原数据集的数据格式: 每行为:(test_User, test_Item) negativeItem1 negativeItem2 negativeItem3 …… negativeItem99 即每一行对应一个user 与100个item,其中1个item为整理,其余99个为负例。 将要处理成的目 阅读全文

posted @ 2019-07-30 16:00 CuriousZero 阅读(915) 评论(0) 推荐(0)

Python处理数据集-1

摘要: 原数据集的数据格式: 每行为:(test_User, test_Item) negativeItem1 negativeItem2 negativeItem3 …… negativeItem99 即每一行对应一个user 与100个item,其中1个item为正例,其余99个为负例。 将要处理成的目 阅读全文

posted @ 2019-07-30 15:55 CuriousZero 阅读(651) 评论(0) 推荐(0)

Python 中把一个list 列表分组/分块

摘要: 比如:将list:[1,2,3,4,5,6,7,8,9]按照下标顺序分成3组:[1,2,3] [4,5,6] [7,8,9]或分成5组:[1,2,] [3, 4] [5,6] [7, 8] [ 9 ] 解决办法: 如果有10个数: 阅读全文

posted @ 2019-07-30 11:09 CuriousZero 阅读(37940) 评论(0) 推荐(0)

Debug 路漫漫-11:Python: TypeError: 'generator' object is not subscriptable

摘要: 调试程序,出现以下错误: Python: TypeError: 'generator' object is not subscriptable “在Python中,这种一边循环一边计算的机制,称为生成器:generator。” 我这个功能函数用了 yield 返回函数的值,这个似乎是属于 gener 阅读全文

posted @ 2019-07-30 10:58 CuriousZero 阅读(3427) 评论(0) 推荐(0)

Python 中 如何将两个列表元素一一对应成字典

摘要: 使用python的 zip函数 和强大的集合操作可以方便的将两个list元素一一对应转换为dict,如下示例代码: 结果如下: 阅读全文

posted @ 2019-07-30 10:48 CuriousZero 阅读(12870) 评论(0) 推荐(0)

2019年7月24日

【RS】Deep Learning based Recommender System: A Survey and New Perspectives - 基于深度学习的推荐系统:调查与新视角

摘要: 【论文标题】Deep Learning based Recommender System: A Survey and New Perspectives ( ACM Computing Surveys · July 2017) 【论文作者】 SHUAI ZHANG, University of New 阅读全文

posted @ 2019-07-24 15:28 CuriousZero 阅读(700) 评论(0) 推荐(0)

上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 57 下一页

导航