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

change test file

parent 02e1d7ad
...@@ -76,32 +76,38 @@ def con_sql(db,sql): ...@@ -76,32 +76,38 @@ def con_sql(db,sql):
return df return df
def train_yingshe(x): def train_yingshe(y):
tmp = (x[0], float(x[1]), float(x[2]), app_list_func(x[3], app_list_map), app_list_func(x[4], leve2_map), tmp = []
app_list_func(x[5], leve3_map), app_list_func(x[6], leve2_map), app_list_func(x[7], leve2_map), for x in y:
app_list_func(x[8], leve2_map), app_list_func(x[9], leve2_map), app_list_func(x[10], leve2_map), i = (x[0], float(x[1]), float(x[2]), app_list_func(x[3], app_list_map), app_list_func(x[4], leve2_map),
app_list_func(x[11], leve2_map), app_list_func(x[12], leve2_map), app_list_func(x[5], leve3_map), app_list_func(x[6], leve2_map), app_list_func(x[7], leve2_map),
[value_map[x[0]], value_map[x[13]], value_map[x[14]], value_map[x[15]], value_map[x[16]], app_list_func(x[8], leve2_map), app_list_func(x[9], leve2_map), app_list_func(x[10], leve2_map),
value_map[x[17]], value_map[x[18]], value_map[x[19]], value_map[x[20]], value_map[x[21]], app_list_func(x[11], leve2_map), app_list_func(x[12], leve2_map),
value_map[x[22]], value_map[x[23]], value_map[x[24]], value_map[x[25]], value_map[x[26]]]) [value_map[x[0]], value_map[x[13]], value_map[x[14]], value_map[x[15]], value_map[x[16]],
value_map[x[17]], value_map[x[18]], value_map[x[19]], value_map[x[20]], value_map[x[21]],
value_map[x[22]], value_map[x[23]], value_map[x[24]], value_map[x[25]], value_map[x[26]]])
tmp.append(i)
return tmp return tmp
def pre_yingshe(x): def pre_yingshe(y):
tmp = (x[0], float(x[1]), float(x[2]), x[3], x[4], x[5], tmp = []
app_list_func(x[6], app_list_map), app_list_func(x[7], leve2_map), for x in y:
app_list_func(x[8], leve3_map), app_list_func(x[9], leve2_map), i = (x[0], float(x[1]), float(x[2]), x[3], x[4], x[5],
app_list_func(x[10], leve2_map), app_list_func(x[11], leve2_map), app_list_func(x[6], app_list_map), app_list_func(x[7], leve2_map),
app_list_func(x[12], leve2_map), app_list_func(x[13], leve2_map), app_list_func(x[8], leve3_map), app_list_func(x[9], leve2_map),
app_list_func(x[14], leve2_map), app_list_func(x[15], leve2_map), app_list_func(x[10], leve2_map), app_list_func(x[11], leve2_map),
[value_map.get(validate_date, 1), value_map.get(x[16], 2), app_list_func(x[12], leve2_map), app_list_func(x[13], leve2_map),
value_map.get(x[17], 3), value_map.get(x[18], 4), app_list_func(x[14], leve2_map), app_list_func(x[15], leve2_map),
value_map.get(x[19], 5), value_map.get(x[20], 6), [value_map.get(validate_date, 1), value_map.get(x[16], 2),
value_map.get(x[21], 7), value_map.get(x[22], 8), value_map.get(x[17], 3), value_map.get(x[18], 4),
value_map.get(x[23], 9), value_map.get(x[24], 10), value_map.get(x[19], 5), value_map.get(x[20], 6),
value_map.get(x[25], 11), value_map.get(x[26], 12), value_map.get(x[21], 7), value_map.get(x[22], 8),
value_map.get(x[27], 13), value_map.get(x[28], 14), value_map.get(x[23], 9), value_map.get(x[24], 10),
value_map.get(x[29], 15) value_map.get(x[25], 11), value_map.get(x[26], 12),
]) value_map.get(x[27], 13), value_map.get(x[28], 14),
value_map.get(x[29], 15)
])
tmp.append(i)
return tmp return tmp
def feature_engineer(): def feature_engineer():
......
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