You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
554 B
20 lines
554 B
import os |
|
import pickle |
|
|
|
from src import config |
|
from src.p2_preprocessing_feature.load_feature import load_yam_feature, load_luo_feature |
|
|
|
for dataset in config.datasets: |
|
# feature: lil_matrix |
|
if dataset == 'luo': |
|
feature = load_luo_feature(dataset) |
|
else: |
|
feature = load_yam_feature(dataset) |
|
|
|
# 保存特征 |
|
path = "../../data/partitioned_data/{}/feature/".format(dataset) |
|
if not os.path.exists(path): |
|
os.makedirs(path) |
|
pickle.dump(feature, open(path + dataset + "_feature.pkl", 'wb')) |
|
|
|
print("ok")
|
|
|