Commit 24ccd069 authored by Your Name's avatar Your Name

test

parent 4d8012c6
......@@ -180,13 +180,6 @@ def predict(te_file):
result = []
for prob in preds:
result.append([str(prob["uid"][0]), str(prob["city"][0]), str(prob["cid_id"][0]), str(prob['pctcvr'])])
print("result")
print(result)
print('*'*100)
df = pd.DataFrame(result, columns=["uid", "city", "cid_id", "pctcvr"])
df.head(10)
print("type result")
print(type(result))
return result
def trans(x):
......@@ -229,8 +222,8 @@ if __name__ == "__main__":
te_files = ["hdfs://172.16.32.4:8020/strategy/esmm/test_nearby/part-r-00000"]
result = predict(te_files)
# df = pd.DataFrame(result, columns=["uid", "city", "cid_id", "pctcvr"])
# df.head(10)
df = pd.DataFrame(result, columns=["uid", "city", "cid_id", "pctcvr"])
print(df.head(10))
......
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