Commit 4863e628 authored by Your Name's avatar Your Name

test

parent aad18f6f
...@@ -182,6 +182,8 @@ def predict(te_file): ...@@ -182,6 +182,8 @@ def predict(te_file):
result.append([str(prob["uid"][0]), str(prob["city"][0]), str(prob["cid_id"][0]), str(prob['pctcvr'])]) result.append([str(prob["uid"][0]), str(prob["city"][0]), str(prob["cid_id"][0]), str(prob['pctcvr'])])
print("result[0]") print("result[0]")
print(result[0]) print(result[0])
df = pd.DataFrame(result, columns=["uid", "city", "cid_id", "pctcvr"])
df.head(10)
return result return result
def trans(x): def trans(x):
...@@ -224,8 +226,8 @@ if __name__ == "__main__": ...@@ -224,8 +226,8 @@ if __name__ == "__main__":
te_files = ["hdfs://172.16.32.4:8020/strategy/esmm/test_nearby/part-r-00000"] te_files = ["hdfs://172.16.32.4:8020/strategy/esmm/test_nearby/part-r-00000"]
result = predict(te_files) result = predict(te_files)
df = pd.DataFrame(result, columns=["uid", "city", "cid_id", "pctcvr"]) # df = pd.DataFrame(result, columns=["uid", "city", "cid_id", "pctcvr"])
df.head(10) # 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