change something

This commit is contained in:
jackyu66git
2025-04-27 18:37:50 +08:00
parent 88701608bd
commit fceb57d2b8
10 changed files with 285 additions and 162 deletions
+2 -3
View File
@@ -288,7 +288,6 @@ class ChanLunClassifier:
# 使用ChanLun获取bi_list
klc_list = self.chan.get_klc_list(dataframe)
bi_list = self.chan.cal_bi_list(klc_list)
seg_list = self.chan.get_seg_list(bi_list)
# 筛选方向为UP的bi的起始klc
feature_data = []
labels = []
@@ -312,7 +311,6 @@ class ChanLunClassifier:
# 保存第一个样本的特征名称,用于CSV列名
if len(feature_keys) == 0:
feature_keys = list(features.keys())
# 将特征转换为模型可用的格式
feature_vec = []
for key, value in features.items():
@@ -335,7 +333,8 @@ class ChanLunClassifier:
feature_data.append(feature_vec)
labels.append(label)
for index, key in enumerate(feature_keys):
print(index, key, feature_data[0][index])
# 如果需要保存到CSV
if save_csv:
# 创建DataFrame保存特征数据