(self, node_feature_path, group_config_path)
| 180 | fout.write("\n") |
| 181 | |
| 182 | def write_node_feature(self, node_feature_path, group_config_path): |
| 183 | assert self.has_feature |
| 184 | max_feature_num = 0 |
| 185 | with open(node_feature_path, 'w', encoding='utf-8') as fout: |
| 186 | for node in self.next_node(): |
| 187 | fout.write(EmbedxNode.get_node_feature_str(node)) |
| 188 | fout.write("\n") |
| 189 | |
| 190 | max_feature_num = max(max_feature_num, len(node.feature)) |
| 191 | |
| 192 | with open(group_config_path, 'w', encoding='utf-8') as fout: |
| 193 | fout.write(Context.get_group_config_str(max_feature_num)) |
| 194 | fout.write("\n") |
| 195 | |
| 196 | def write_node_label(self, label_path, train_label_path, test_label_path): |
| 197 | with open(label_path, 'w', encoding='utf-8') as label_f, \ |
no test coverage detected