|
Algorithm 2: Fraud detection through XGboost |
-
1:
Inputs: Balanced Dataset S
-
2:
Outputs: Transactions in Blockchain B
-
3:
Initialization of Dataset
-
4:
Spliting of S into training and testing
-
5:
input variables from dataset
-
6:
target variables to dataset
-
7:
input variables from test dataset
-
8:
target variables from test dataset
-
9:
Model = XGBClassifier
-
10:
Model = Model.fit(, )
-
11:
= Model.predict
-
12:
Predictions = [round(value) for value in
-
13:
ifthen
-
14:
-
15:
B.add ()
-
16:
else ifthen
-
17:
-
18:
end if
-
19:
return
B
-
20:
End
|