Skip to content

Commit 86d7424

Browse files
authored
Update FF-SVM.py
1 parent b7d1e21 commit 86d7424

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

FF-SVM.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ def evaluation(feature_possibilities):
153153
true_number = np.array(np.unique(feature_take_or_not, return_counts=True)).T
154154

155155

156-
bestX = X[:, gene_take_or_not]
156+
bestX = X[:, feature_take_or_not]
157157

158158
print(true_number)
159159

@@ -162,7 +162,7 @@ def evaluation(feature_possibilities):
162162
evaluation = cross_val_score(s, bestX, y, cv=loocv)
163163
print("Final Accuracy: %.6f%% (%.6f%%)" % (evaluation.mean(), evaluation.std()))
164164

165-
total = ((df.drop("Label", axis=1).columns.values, gene_take_or_not, Best))
165+
total = ((df.drop("Label", axis=1).columns.values, feature_take_or_not, Best))
166166

167167
df2 = pd.DataFrame(total, ["Features", "Selection", "Importance"])
168168
df2.to_excel(f"FF-SVM-Feature-Selection-{file_}", index=False)

0 commit comments

Comments
 (0)