Commit 705a3a13 authored by 张彦钊's avatar 张彦钊

把最近一天的数据集放进训练集

parent 1b9c29c6
......@@ -105,7 +105,8 @@ def get_data():
value_map = dict(zip(unique_values, temp))
df = df.drop("device_id", axis=1)
train = df[df["stat_date"] != validate_date + "stat_date"]
# 最近一天的数据集放进训练集,这样用户的正、负反馈能及时获取
train = df
test = df[df["stat_date"] == validate_date + "stat_date"]
for i in ["ucity_id", "ccity_name", "device_type", "manufacturer",
"channel", "top", "time", "stat_date", "hospital_id",
......@@ -113,8 +114,8 @@ def get_data():
train[i] = train[i].map(value_map)
test[i] = test[i].map(value_map)
print("train shape")
print(train.shape)
# print("train shape")
# print(train.shape)
print("test shape")
print(test.shape)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment