|
# Cybercrime LSTM + GloVe Model |
|
|
|
This model is a Long Short-Term Memory (LSTM) model trained with GloVe embeddings for classifying cybercrime categories. It has been trained on various cybercrime data and aims to provide high accuracy in detecting and categorizing different cybercrime types. |
|
|
|
## Model Details |
|
- **Model Type**: LSTM |
|
- **Embeddings**: GloVe |
|
- **Categories**: Offensive, botnet, DDoS, ransomware, vulnerability, non-cybercrime, etc. |
|
|
|
## Usage |
|
This model can be used for cybercrime classification tasks. |
|
|
|
Accuracy: 0.9803 |
|
|
|
Precision: 0.9804 |
|
|
|
Recall: 0.9803 |
|
|
|
F1 Score: 0.9803 |
|
|
|
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy |
|
df_org['label'] = df_org['label'].replace('unknown', 'not cybercrime') # Replace 'unknown' with 'not cybercrime' |
|
<ipython-input-6-8f9ee34c78b4>:37: DeprecationWarning: DataFrameGroupBy.apply operated on the grouping columns. This behavior is deprecated, and in a future version of pandas the grouping columns will be excluded from the operation. Either pass `include_groups=False` to exclude the groupings or explicitly select the grouping columns after groupby to silence this warning. |
|
df_balanced = df_org.groupby('label', group_keys=False).apply(lambda x: x.sample(max_samples, replace=True)) |
|
|
|
Epoch 1/10 |
|
|
|
158/158 [==============================] - 65s 316ms/step - loss: 1.4255 - accuracy: 0.5900 - val_loss: 0.9644 - val_accuracy: 0.8066 |
|
|
|
Epoch 2/10 |
|
158/158 [==============================] - 73s 461ms/step - loss: 0.6081 - accuracy: 0.8742 - val_loss: 0.3353 - val_accuracy: 0.9132 |
|
|
|
Epoch 3/10 |
|
158/158 [==============================] - 50s 316ms/step - loss: 0.2752 - accuracy: 0.9344 - val_loss: 0.1922 - val_accuracy: 0.9534 |
|
|
|
Epoch 4/10 |
|
158/158 [==============================] - 59s 376ms/step - loss: 0.1848 - accuracy: 0.9563 - val_loss: 0.1487 - val_accuracy: 0.9664 |
|
|
|
Epoch 5/10 |
|
158/158 [==============================] - 66s 419ms/step - loss: 0.1423 - accuracy: 0.9676 - val_loss: 0.1272 - val_accuracy: 0.9714 |
|
|
|
Epoch 6/10 |
|
158/158 [==============================] - 64s 408ms/step - loss: 0.1176 - accuracy: 0.9722 - val_loss: 0.1133 - val_accuracy: 0.9745 |
|
|
|
Epoch 7/10 |
|
158/158 [==============================] - 67s 422ms/step - loss: 0.0971 - accuracy: 0.9789 - val_loss: 0.1042 - val_accuracy: 0.9749 |
|
|
|
Epoch 8/10 |
|
158/158 [==============================] - 76s 479ms/step - loss: 0.0814 - accuracy: 0.9818 - val_loss: 0.0910 - val_accuracy: 0.9794 |
|
|
|
Epoch 9/10 |
|
158/158 [==============================] - 51s 324ms/step - loss: 0.0727 - accuracy: 0.9859 - val_loss: 0.0862 - val_accuracy: 0.9799 |
|
|
|
Epoch 10/10 |
|
158/158 [==============================] - 41s 260ms/step - loss: 0.0638 - accuracy: 0.9864 - val_loss: 0.0791 - val_accuracy: 0.9803 |
|
|
|
|