https://yq.aliyun.com/articles/293596

https://www.kaggle.com/c/outbrain-click-prediction

https://www.kaggle.com/anokas/outbrain-eda

用户个性化点击率预估

基本场景:

document_id(document)  uuid(user)  ad_id(a set of ads)

原始数据:

page_views.csv: the log of users visiting documents

  • uuid
  • document_id
  • timestamp (ms since 1970-01-01 - 1465876799998)
  • platform (desktop = 1, mobile = 2, tablet =3)
  • geo_location (country>state>DMA)
  • traffic_source (internal = 1, search = 2, social = 3)

clicks_train.csv:

  • display_id
  • ad_id
  • clicked (1 if clicked, 0 otherwise)

events.csv: (information on the display_id context)

  • display_id
  • uuid
  • document_id
  • timestamp
  • platform
  • geo_location

promoted_content.csv: details on the ads.

  • ad_id
  • document_id
  • campaign_id
  • advertiser_id

documents_meta.csv: details on the documents.

  • document_id
  • source_id (the part of the site on which the document is displayed, e.g. edition.cnn.com)
  • publisher_id
  • publish_time

documents_topics.csv, documents_entities.csv, and documents_categories.csv all provide information about the content in a document, as well as Outbrain's confidence in each respective relationship.

数据分析

import pandas as pd
import os
import gc # We're gonna be clearing memory a lot
import matplotlib.pyplot as plt
import seaborn as sns
%matplotlib inline df_train = pd.read_csv('./outbrain-click-prediction/clicks_train.csv')
df_test = pd.read_csv('./outbrain-click-prediction/clicks_test.csv') # 页面广告数分布
size_train = df_train.groupby('display_id')['ad_id'].count().value_counts()
size_train = size_train / np.sum(size_train)

直方图:

plt.figure(figsize=(12,4))
p = sns.color_palette()
sns.barplot(size_train.index, size_train.values, alpha=0.8, color=p[0], label='train')
plt.legend()
plt.xlabel('Number of Ads in display', fontsize=12)
plt.ylabel('Proportion of set', fontsize=12)

统计广告出现次数:

# 以下两行都可以
df_train.groupby('ad_id')['ad_id'].count()
df_train.groupby('ad_id').agg(np.size)

统计训练集和测试集中ad的重合度:

len(set(df_test.ad_id.unique()).intersection(df_train.ad_id.unique())) / len(df_test.ad_id.unique())

对events.csv进行统计:

print (events.columns.to_list())
print (events.head())
print (events.platform.value_counts())
events.platform = events.platform.astype(str)
print (events.platform.value_counts()) print (events.groupby('uuid')['uuid'].count().sort_values()) # 统计用户的出现次数

Kaggle的Outbrain点击预测比赛分析的更多相关文章

  1. Kaggle 自行车租赁预测比赛项目实现

    作者:大树 更新时间:01.20 email:59888745@qq.com 数据处理,机器学习 回主目录:2017 年学习记录和总结 .caret, .dropup > .btn > . ...

  2. Kaggle 广告转化率预测比赛小结

    20天的时间参加了Kaggle的 Avito Demand Prediction Challenged ,第一次参加,成绩离奖牌一步之遥,感谢各位队友,学到的东西远比成绩要丰硕得多.作为新手,希望每记 ...

  3. KDDCUP CTR预测比赛总结

    赛题与数据介绍 给定查询和用户信息后预测广告点击率 搜索广告是近年来互联网的主流营收来源之一.在搜索广告背后,一个关键技术就是点击率预测-----pCTR(predict the click-thro ...

  4. kaggle之泰坦尼克号乘客死亡预测

    目录 前言 相关性分析 数据 数据特点 相关性分析 数据预处理 预测模型 Logistic回归训练模型 模型优化 前言 一般接触kaggle的入门题,已知部分乘客的年龄性别船舱等信息,预测其存活情况, ...

  5. kaggle首秀之intel癌症预测(续篇)

    之前写了这篇文章.现在把他搬到知乎live上了.书非借不能读也,因此搞了点小费用,如果你觉得贵,加我微信我给你发红包返回给你. 最近的空余时间拿去搞kaggle了, 好久没更新文章了.今天写写kagg ...

  6. talkingdata比赛分析

    1.kaggle数据分析经验: https://medium.com/unstructured/how-feature-engineering-can-help-you-do-well-in-a-ka ...

  7. 由Kaggle竞赛wiki文章流量预测引发的pandas内存优化过程分享

    pandas内存优化分享 缘由 最近在做Kaggle上的wiki文章流量预测项目,这里由于个人电脑配置问题,我一直都是用的Kaggle的kernel,但是我们知道kernel的内存限制是16G,如下: ...

  8. SILK 预测模块分析

    SILK是一种新结构的基于噪声整形量化算法的编解码框架.不同于类CELP的AMR,EVRC,G729,Speex等标准. 类CELP的结构都是以码本激励为量化框架的编码器.但是这里并不讨论NSQ结构和 ...

  9. ACM-ICPC 训练平台 & 比赛 分析

    the file can download in https://pan.baidu.com/s/1HwoLFHGAG-boQbIn9xIhxA occ5 the article is also pu ...

随机推荐

  1. python单例模式的几种实现方法

    单例模式 单例模式(Singleton Pattern)是一种常用的软件设计模式,该模式的主要目的是确保某一个类只有一个实例存在.当你希望在整个系统中,某个类只能出现一个实例时,单例对象就能派上用场. ...

  2. Android 程序 LinearLayout布局 参数layout_weight 探讨

    官方参考文档 对LinearLayout.LayoutParams中的android:layout_weight解释如下:Indicates how much of the extra space i ...

  3. C语言总结(2)

    1.函数printf(" ")可以输出双引号中任何固定不变的内容. 2.必须在程序前面加:预处理命令. 3.#include<stdio.h>后面不需要“:”,“:”. ...

  4. poj 1734 Sightseeing trip判断最短长度的环

    Sightseeing trip Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 5590   Accepted: 2151 ...

  5. ansible /usr/bin/python: not found

    使用ansible命令的时候出错 ansible all -m ping 出现报错 192.168.199.154 | FAILED! => { "changed": fal ...

  6. HDU-1534 Schedule Problem

    四种约束条件..照做就行了.. 最长路建图. #include <cstdio> #include <cstdlib> #include <cstring> #in ...

  7. 96. Unique Binary Search Trees(I 和 II)

    Given n, how many structurally unique BST's (binary search trees) that store values 1-n? For example ...

  8. java追加文本到文件末尾

    public class Test { public static void main(String[] args) { method1("F:\\test.txt" , &quo ...

  9. docker基础——自定义镜像、创建私有仓库、查看 docker 运行状态

    一.自定义镜像 1,案例1 要求:请自定义一个 docker 镜像,基于 hub.c.163.com/library/centos,要求创建出来的镜像在生成容器的时候,可以直接使用 ifconfig ...

  10. JSTL <C:if></C:if> 和<C:ForEach></C:ForEach> 入门级~

    一.<C:If>标签:条件判断语句 <c:if test="${objList.nodetype == 1}">上级节点</c:if>   te ...