更新 function.py
Gitea Actions Experiment Test / Experiment-Actions (push) Successful in 31s

This commit is contained in:
2024-11-02 15:48:50 +08:00
parent 275a84bc76
commit e2bbb3b69a
+4 -1
View File
@@ -90,7 +90,10 @@ def load_data(filepath):
data = np.array(data)
labels = np.array(labels)
target_variable = np.where((labels == 2) | (labels == 3), 0, labels)
data = np.delete(data, [2] + list(range(23, 28)), axis=1)
n_features = data.shape[1]
columns_to_delete = [2] + list(range(23, min(28, n_features)))
data = np.delete(data, columns_to_delete, axis=1)
scaler = StandardScaler()
data = scaler.fit_transform(data)