浏览代码

更新初始化代码

罗俊辉 1 年之前
父节点
当前提交
0161227511
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      main.py

+ 2 - 2
main.py

@@ -43,7 +43,7 @@ float_cols = [
         "out_collection_cnt"
     ]
 with open("whole_data/x_data.json") as f1:
-    x_list = json.loads(f1.read())
+    x_list = json.loads(f1.read())[:20000]
     print(len(x_list))
     index_t = int(len(x_list) * 0.7)
     X_train = pd.DataFrame(x_list[:index_t], columns=my_c)
@@ -61,7 +61,7 @@ print("读取X数据成功!")
 
 
 with open("whole_data/y_data.json") as f2:
-    y_list = json.loads(f2.read())
+    y_list = json.loads(f2.read())[:20000]
     print(len(y_list))
     index_t = int(len(y_list) * 0.7)
     temp = sorted(y_list)