{
"cells": [
{
"cell_type": "code",
"source": [],
"metadata": {
"id": "b3_hlnrYh30E"
},
"execution_count": null,
"outputs": []
},
{
"cell_type": "markdown",
"source": [
"Acknowledgement:\n",
"Thanks to @RajKKapadia
\n",
"Link: https://github.com/RajKKapadia/Transformers-Text-Classification-BERT-Blog"
],
"metadata": {
"id": "zK4VsKufh4gZ"
}
},
{
"cell_type": "markdown",
"metadata": {
"id": "XLhB2j_Hemio"
},
"source": [
"## Read the dataset csv file"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "hgYEtrYgemir",
"outputId": "d3ddedc7-8bd7-4ba9-c82e-68e4eb1309c3"
},
"outputs": [
{
"data": {
"text/html": [
"
\n", " | Unnamed: 0 | \n", "Text | \n", "target | \n", "
---|---|---|---|
0 | \n", "0.0 | \n", "polis tangkap | \n", "NonCyberbully | \n", "
1 | \n", "1.0 | \n", "kenapa lokasi kebakaran terlalu spesifik | \n", "NonCyberbully | \n", "
2 | \n", "2.0 | \n", "menyesal tanya nak for birthday | \n", "NonCyberbully | \n", "
3 | \n", "3.0 | \n", "meriah tah | \n", "NonCyberbully | \n", "
4 | \n", "4.0 | \n", "asal bs kelar kerja jam sik kl baru diajak mee... | \n", "NonCyberbully | \n", "
Epoch | \n", "Training Loss | \n", "Validation Loss | \n", "Accuracy | \n", "Precision | \n", "Recall | \n", "F1 | \n", "
---|---|---|---|---|---|---|
1 | \n", "No log | \n", "0.493876 | \n", "0.779783 | \n", "0.657343 | \n", "0.886792 | \n", "0.755020 | \n", "
2 | \n", "No log | \n", "0.542367 | \n", "0.870036 | \n", "0.850000 | \n", "0.801887 | \n", "0.825243 | \n", "
3 | \n", "No log | \n", "0.725669 | \n", "0.848375 | \n", "0.820000 | \n", "0.773585 | \n", "0.796117 | \n", "
"
],
"text/plain": [
"