Mekam commited on
Commit
66907e4
·
1 Parent(s): 970ef03

feat(predict): select feature for level 1

Browse files
src/controllers/prediction_controller.py CHANGED
@@ -93,10 +93,25 @@ def global_prediction_on_csv(file: UploadFile):
93
  print("drop label column if exists")
94
 
95
  # Préparation des features
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
96
  if "label" in data.columns:
97
- X = data.drop(columns=["label"])
98
  else:
99
- X = data
100
 
101
  print("features prepared, starting prediction")
102
 
 
93
  print("drop label column if exists")
94
 
95
  # Préparation des features
96
+ features = [
97
+ "Header_Length",
98
+ "Time_To_Live",
99
+ "Rate",
100
+ "Tot sum",
101
+ "Tot size",
102
+ "Min",
103
+ "Max",
104
+ "AVG",
105
+ "Std",
106
+ "Variance",
107
+ "IAT",
108
+ "Number"
109
+ ]
110
+
111
  if "label" in data.columns:
112
+ X = data[features]
113
  else:
114
+ X = data[features]
115
 
116
  print("features prepared, starting prediction")
117