|
|
|
@ -0,0 +1,88 @@
|
|
|
|
|
{
|
|
|
|
|
"cells": [
|
|
|
|
|
{
|
|
|
|
|
"cell_type": "markdown",
|
|
|
|
|
"metadata": {},
|
|
|
|
|
"source": [
|
|
|
|
|
"## 3-特征工程"
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"cell_type": "markdown",
|
|
|
|
|
"metadata": {},
|
|
|
|
|
"source": [
|
|
|
|
|
"用户基本特征:\n",
|
|
|
|
|
"* 获取基本的用户特征,基于用户本身属性多为类别特征的特点,对age,sex,usr_lv_cd进行独热编码操作,对于用户注册时间暂时不处理,\n",
|
|
|
|
|
"\n",
|
|
|
|
|
"商品基本特征:\n",
|
|
|
|
|
"* 根据商品文件获取基本的特征\n",
|
|
|
|
|
"* 针对属性a1,a2,a3进行独热编码\n",
|
|
|
|
|
"* 商品类别和品牌直接作为特征,不同的品牌的影响力不同,购买力也不同\n",
|
|
|
|
|
"\n",
|
|
|
|
|
"评论特征:\n",
|
|
|
|
|
"* 分时间段\n",
|
|
|
|
|
"* 对评论数进行独热编码: 0表示无评论,1表示有1条评论,2表示有2-10条评论,3表示有11-50条评论,4表示大于50条评论,对0~4 进行独热编码\n",
|
|
|
|
|
"\n",
|
|
|
|
|
"行为特征:\n",
|
|
|
|
|
"* 分时间段,一般是最近做的对未来的影响越明显\n",
|
|
|
|
|
"* 对行为类别进行独热编码:对1~6进行独热编码\n",
|
|
|
|
|
"* 分别按照用户-类别行为分组和用户-类别-商品行为分组统计,然后计算\n",
|
|
|
|
|
"* 用户对同类别下其他商品的行为计数\n",
|
|
|
|
|
"* 不同时间累积的行为计数(3,5,7,10,15,21,30)\n",
|
|
|
|
|
"\n",
|
|
|
|
|
"累积用户特征:\n",
|
|
|
|
|
"* 分时间段\n",
|
|
|
|
|
"* 用户不同行为的\n",
|
|
|
|
|
"* 购买转化率\n",
|
|
|
|
|
"* 均值,同上有不同时间的均值,3天、5天.....\n",
|
|
|
|
|
"\n",
|
|
|
|
|
"用户近期行为特征:\n",
|
|
|
|
|
"* 在上面针对用户进行累积特征提取的基础上,分别提取用户近一个月、近三天的特征,然后提取一个月内用户除去最近三天的行为占据一个月的行为的比重\n",
|
|
|
|
|
"\n",
|
|
|
|
|
"用户对同类别下各种商品的行为:\n",
|
|
|
|
|
"* 用户对各个类别的各项行为操作统计\n",
|
|
|
|
|
"* 用户对各个类别操作行为统计占对所有类别操作行为统计的比重\n",
|
|
|
|
|
"\n",
|
|
|
|
|
"累积商品特征:\n",
|
|
|
|
|
"\n",
|
|
|
|
|
"* 分时间段\n",
|
|
|
|
|
"* 针对商品的不同行为的\n",
|
|
|
|
|
"* 购买转化率\n",
|
|
|
|
|
"* 均值\n",
|
|
|
|
|
"\n",
|
|
|
|
|
"类别特征:\n",
|
|
|
|
|
"* 分时间段下各个商品类别的\n",
|
|
|
|
|
"* 购买转化率\n",
|
|
|
|
|
"* 均值"
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"cell_type": "code",
|
|
|
|
|
"execution_count": null,
|
|
|
|
|
"metadata": {},
|
|
|
|
|
"outputs": [],
|
|
|
|
|
"source": []
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"metadata": {
|
|
|
|
|
"kernelspec": {
|
|
|
|
|
"display_name": "Python 3",
|
|
|
|
|
"language": "python",
|
|
|
|
|
"name": "python3"
|
|
|
|
|
},
|
|
|
|
|
"language_info": {
|
|
|
|
|
"codemirror_mode": {
|
|
|
|
|
"name": "ipython",
|
|
|
|
|
"version": 3
|
|
|
|
|
},
|
|
|
|
|
"file_extension": ".py",
|
|
|
|
|
"mimetype": "text/x-python",
|
|
|
|
|
"name": "python",
|
|
|
|
|
"nbconvert_exporter": "python",
|
|
|
|
|
"pygments_lexer": "ipython3",
|
|
|
|
|
"version": "3.7.3"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"nbformat": 4,
|
|
|
|
|
"nbformat_minor": 2
|
|
|
|
|
}
|