Commit edc15147 authored by 张彦钊's avatar 张彦钊

修改ffm转化函数,改成features累计相加

parent 7477c2e0
......@@ -70,7 +70,7 @@ class multiFFMFormatPandas:
self.feature_index_[col] = last_idx
last_idx += 1
print("last_idx")
print(last_idx)
print(last_idx-1)
return self
def fit_transform(self, df, y=None,n=50000,processes=4):
......@@ -225,8 +225,7 @@ def get_predict_set(ucity_id,model,ccity_name,manufacturer,channel):
"u.device_type,u.manufacturer,u.channel,c.top,df.level2_ids,e.device_id,e.cid_id " \
"from esmm_pre_data e left join user_feature u on e.device_id = u.device_id " \
"left join cid_type_top c on e.device_id = c.device_id " \
"left join diary_feat df on e.cid_id = df.diary_id " \
"where e.device_id = '358035085192742'"
"left join diary_feat df on e.cid_id = df.diary_id"
df = con_sql(db, sql)
df = df.rename(columns={0: "y", 1: "z", 2: "label", 3: "ucity_id", 4: "clevel1_id", 5: "ccity_name",
6: "device_type", 7: "manufacturer", 8: "channel", 9: "top", 10: "level2_ids",
......
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