【发布时间】:2020-02-20 14:50:43
【问题描述】:
我正在构建一个模型来预测用户是否会根据他/她的阅读历史等(活动)购买订阅。我正在使用featuretools (https://www.featuretools.com/) 来自动化特征工程,这就是它变得棘手的地方:
鉴于以下情况,我应该如何确定训练数据的截止时间/窗口:
- 培训窗口应为 1 个月、6 个月等多长时间?
- 鉴于订阅前后用户活动可能不同,我应该根据订阅时间截断当前订阅者的数据(防止泄漏)。但是我什么时候应该为非订阅者截止?
feature_matrix, feature_defs = ft.dfs(entityset=es,
target_entity="users",
max_depth=2,
agg_primitives=["sum", "std", "max", "min", "mean", "median", "count", "percent_true", "num_unique", "mode",
"avg_time_between"],
trans_primitives=["day", "year", "month", "weekday", "time_since_previous", "time_since", "is_weekend"],
cutoff_time=cutoff_times,
cutoff_time_in_index=True,
training_window=ft.Timedelta(180,"d"),
n_jobs=8, verbose=True)
【问题讨论】:
标签: python machine-learning prediction featuretools feature-engineering