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

change test file

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