MCPcopy Create free account

hub / github.com/Chapter-7/Recommended-News / functions

Functions67 in github.com/Chapter-7/Recommended-News

↓ 7 callersFunctionget_hist_and_last_click
(all_click)
news3.py:155
↓ 7 callersFunctionget_user_item_time
(click_df)
news3.py:125
↓ 7 callersFunctionrelease_memory
()
news2.py:14
↓ 7 callersFunctionsubmit
(recall_df, topk=5, model_name=None)
news5.py:34
↓ 6 callersFunctionget_item_topk_click
(click_df, k)
news3.py:211
↓ 6 callersFunctionmetrics_recall
(user_recall_items_dict, trn_last_click_df, topk=5)
news3.py:232
↓ 6 callersFunctionreduce_mem
(df)
news4.py:22
↓ 4 callersFunctionitem_based_recommend
基于文章协同过滤的召回 :param user_id: 用户id :param user_item_time_dict: 字典, 根据点击时间获取用户的点击文章序列 {user1: [(item1, time1), (item2, time
news3.py:601
↓ 4 callersFunctionnorm_sim
(sim_df, weight=0.0)
news5.py:54
↓ 3 callersFunctioncreate_feature
基于用户的历史行为做相关特征 :param users_id: 用户id :param recall_list: 对于每个用户召回的候选文章列表 :param click_hist_df: 用户的历史点击信息 :param articles_inf
news4.py:324
↓ 3 callersFunctionget_rank_label_df
(recall_list_df, label_df, is_test=False)
news4.py:249
↓ 2 callersFunctiongen_model_input
(train_set, user_profile, seq_max_len)
news3.py:434
↓ 2 callersFunctionget_kfold_users
(trn_df, n=5)
news5.py:122
↓ 2 callersFunctionget_user_item_time
(click_df)
news1.py:101
↓ 2 callersFunctionneg_sample_recall_data
(recall_items_df, sample_rate=0.001)
news4.py:219
↓ 2 callersFunctiontime_diff_mean
(l)
news4.py:447
↓ 2 callersFunctionuser_based_recommend
基于文章协同过滤的召回 :param user_id: 用户id :param user_item_time_dict: 字典, 根据点击时间获取用户的点击文章序列 {user1: [(item1, time1), (item2, time
news3.py:746
↓ 2 callersFunctionyoutubednn_u2i_dict
(data, topk=20)
news3.py:448
↓ 1 callersFunctionactive_level
制作区分用户活跃度的特征 :param all_data: 数据集 :param cols: 用到的特征列
news4.py:434
↓ 1 callersFunctioncold_start_items
冷启动的情况下召回一些文章 :param user_recall_items_dict: 基于内容embedding相似性召回来的很多文章, 字典, {user1: [item1, item2, ..], } :param user_hist_
news3.py:935
↓ 1 callersFunctioncombine_recall_results
(user_multi_recall_dict, weight_dict=None, topk=25)
news3.py:1000
↓ 1 callersFunctiondevice_fea
制作用户的设备特征 :param all_data: 数据集 :param cols: 用到的特征列
news4.py:519
↓ 1 callersFunctiongen_data_set
(data, negsample=0)
news3.py:395
↓ 1 callersFunctionget_all_click_df
(data_path='../data_raw/', offline=True, sample_size=100000)
news3.py:66
↓ 1 callersFunctionget_all_click_df
(data_path='../data/', offline=True)
news1.py:80
↓ 1 callersFunctionget_article_info_df
()
news4.py:185
↓ 1 callersFunctionget_click_article_ids_set
(all_click_df)
news3.py:931
↓ 1 callersFunctionget_embedding
(save_path, all_click_df)
news4.py:160
↓ 1 callersFunctionget_ensumble_predict_topk
(rank_model, topk=5)
news5.py:347
↓ 1 callersFunctionget_hist_and_last_click
(all_click)
news4.py:91
↓ 1 callersFunctionget_item_emb_dict
(data_path)
news3.py:95
↓ 1 callersFunctionget_item_info_df
(data_path)
news3.py:85
↓ 1 callersFunctionget_item_info_dict
(item_info_df)
news3.py:172
↓ 1 callersFunctionget_item_sim_list
(df)
news2.py:109
↓ 1 callersFunctionget_item_topk_click
(click_df, k)
news1.py:121
↓ 1 callersFunctionget_item_user_time_dict
(click_df)
news3.py:141
↓ 1 callersFunctionget_recall_list
(save_path, single_recall_model=None, multi_recall=False)
news4.py:124
↓ 1 callersFunctionget_trn_val_tst_data
(data_path, offline=True)
news4.py:107
↓ 1 callersFunctionget_user_activate_degree_dict
(all_click_df)
news3.py:296
↓ 1 callersFunctionget_user_hist_item_info_dict
(all_click)
news3.py:183
↓ 1 callersFunctionget_user_recall_item_label_df
(click_trn_hist, click_val_hist, click_tst_hist, click_trn_last, click_val_last,
news4.py:264
↓ 1 callersFunctionhot_level
制作衡量文章热度的特征 :param all_data: 数据集 :param cols: 用到的特征列
news4.py:476
↓ 1 callersFunctionitem_based_recommend
基于文章协同过滤的召回 :param user_id: 用户id :param user_item_time_dict: 字典, 根据点击时间获取用户的点击文章序列[(item1: time1), (item2: time2)..]
news1.py:169
↓ 1 callersFunctionitemcf_sim
文章与文章之间的相似性矩阵计算 :param df: 数据表 :item_created_time_dict: 文章创建时间的字典 return : 文章与文章的相似性矩阵 思路: 基于物品的协同过滤(详细
news1.py:127
↓ 1 callersFunctionmake_item_time_pair
(df)
news3.py:128
↓ 1 callersFunctionmake_item_time_pair
(df)
news1.py:104
↓ 1 callersFunctionmake_user_time_pair
(df)
news3.py:142
↓ 1 callersFunctionmean_diff_time_func
(df, col)
news2.py:87
↓ 1 callersFunctionnorm_user_recall_items_sim
(sorted_item_list)
news3.py:1004
↓ 1 callersFunctionplot_envs
(df, cols, r, c)
news2.py:126
↓ 1 callersFunctionrecall_dict_2_df
(recall_list_dict)
news4.py:206
↓ 1 callersFunctionsubmit
(recall_df, topk=5, model_name=None)
news1.py:243
↓ 1 callersFunctiontrian_item_word2vec
(click_df, embed_size=64, save_name='item_w2v_emb.pkl', split_char=' ')
news4.py:138
↓ 1 callersFunctiontrn_val_split
(all_click_df, sample_user_nums)
news4.py:66
↓ 1 callersFunctionu2u_embdding_sim
(click_df, user_emb_dict, save_path, topk)
news3.py:839
↓ 1 callersFunctionuser_cat_hob_fea
用户的主题爱好 :param all_data: 数据集 :param cols: 用到的特征列
news4.py:565
↓ 1 callersFunctionuser_time_hob_fea
制作用户的时间习惯特征 :param all_data: 数据集 :param cols: 用到的特征列
news4.py:541
↓ 1 callersFunctionusercf_sim
用户相似性矩阵计算 :param all_click_df: 数据表 :param user_activate_degree_dict: 用户活跃度的字典 return 用户相似性矩阵 思路: 基于用户的
news3.py:307
Functionembdding_sim
基于内容的文章embedding相似性矩阵计算 :param click_df: 数据表 :param item_emb_df: 文章的embedding :param save_path: 保存路径 :pa
news3.py:351
Functionget_all_click_sample
训练集中采样一部分数据调试 data_path: 原数据的存储路径 sample_nums: 采样数目(这里由于机器的内存限制,可以采样用户做)
news3.py:36
Functionget_all_click_sample
训练集中采样一部分数据调试 data_path: 原数据的存储路径 sample_nums: 采样数目(这里由于机器的内存限制,可以采样用户做)
news1.py:62
Functionhist_func
(user_df)
news4.py:96
Functionhist_func
(user_df)
news3.py:160
Functionitemcf_sim
文章与文章之间的相似性矩阵计算 :param df: 数据表 :item_created_time_dict: 文章创建时间的字典 return : 文章与文章的相似性矩阵 思路: 基于物品的协同过滤(
news3.py:248
Functionmake_tuple_func
(group_df)
news4.py:302
Functionneg_sample_func
(group_df)
news4.py:226
Functionreduce_mem
(df)
news1.py:24