Skip to content

Commit

Permalink
improve verifeied data processing
Browse files Browse the repository at this point in the history
  • Loading branch information
kuronosec committed Apr 5, 2024
1 parent fb8a24d commit 9a84704
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"pretraining_data = pd.read_parquet('/data/forta/ethereum/text/pretraining/raw/verified/verified-smart-contracts.parquet', columns=COLS)\n",
"# Is anomaly detection?\n",
"anomaly_detection_training = False\n",
"only_evaluation = True"
"only_evaluation = False"
]
},
{
Expand Down Expand Up @@ -127,8 +127,8 @@
" pretraining_data.loc[pretraining_data['malicious'] == True]['experiment_2_opcodes'].to_csv(\n",
" evaluation_file_path, sep=',', index=False)\n",
"elif not anomaly_detection_training:\n",
" percentaje_normal = number_normal - (number_normal*0.1)\n",
" percentaje_malicious = number_malicious - (number_malicious*0.1)\n",
" percentaje_normal = int(number_normal - (number_normal*0.1))\n",
" percentaje_malicious = int(number_malicious - (number_malicious*0.1))\n",
" # Suffle normal and malicious data if no anomaly detection\n",
" normal_data = pretraining_data.loc[pretraining_data['malicious'] == False]\n",
" malicious_data = pretraining_data.loc[pretraining_data['malicious'] == True]\n",
Expand Down

0 comments on commit 9a84704

Please sign in to comment.