memperbaiki dependencies
This commit is contained in:
+18
-3
@@ -1,11 +1,25 @@
|
|||||||
# Python
|
# Python & Bytecode
|
||||||
__pycache__/
|
__pycache__/
|
||||||
*.py[cod]
|
*.py[cod]
|
||||||
|
*$py.class
|
||||||
|
*.so
|
||||||
|
.Python
|
||||||
|
build/
|
||||||
|
dist/
|
||||||
|
*.egg-info/
|
||||||
|
|
||||||
|
# Environments & Virtual Environments
|
||||||
.venv/
|
.venv/
|
||||||
venv/
|
venv/
|
||||||
|
ENV/
|
||||||
# Environments & IDEs
|
env/
|
||||||
.env
|
.env
|
||||||
|
|
||||||
|
# uv & Version Pinning
|
||||||
|
uv.lock
|
||||||
|
.python-version
|
||||||
|
|
||||||
|
# IDEs & Notebooks
|
||||||
.vscode/
|
.vscode/
|
||||||
.idea/
|
.idea/
|
||||||
.ipynb_checkpoints/
|
.ipynb_checkpoints/
|
||||||
@@ -13,3 +27,4 @@ venv/
|
|||||||
# OS
|
# OS
|
||||||
.DS_Store
|
.DS_Store
|
||||||
Thumbs.db
|
Thumbs.db
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
import os
|
import os
|
||||||
os.environ["TF_USE_LEGACY_KERAS"] = "1" # Bypass Keras 3 & optree
|
|
||||||
|
|
||||||
import re
|
import re
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
@@ -16,11 +14,11 @@ from sklearn.metrics import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
import tensorflow as tf
|
import tensorflow as tf
|
||||||
import tf_keras as keras
|
from tensorflow import keras
|
||||||
from tf_keras import layers
|
from tensorflow.keras import layers
|
||||||
from tf_keras.callbacks import EarlyStopping
|
from tensorflow.keras.callbacks import EarlyStopping
|
||||||
from tf_keras.preprocessing.text import Tokenizer # type: ignore
|
from tensorflow.keras.preprocessing.text import Tokenizer # type: ignore
|
||||||
from tf_keras.preprocessing.sequence import pad_sequences
|
from tensorflow.keras.preprocessing.sequence import pad_sequences
|
||||||
|
|
||||||
# ============================================================
|
# ============================================================
|
||||||
# KONFIGURASI DIREKTORI PENYIMPANAN
|
# KONFIGURASI DIREKTORI PENYIMPANAN
|
||||||
@@ -159,7 +157,7 @@ print("SEL 9 — MODEL GAP")
|
|||||||
print("=" * 60)
|
print("=" * 60)
|
||||||
|
|
||||||
sent_model = keras.Sequential([
|
sent_model = keras.Sequential([
|
||||||
layers.Embedding(input_dim=VOCAB_SIZE, output_dim=EMBED_DIM, input_length=MAX_LEN),
|
layers.Embedding(input_dim=VOCAB_SIZE, output_dim=EMBED_DIM),
|
||||||
layers.GlobalAveragePooling1D(),
|
layers.GlobalAveragePooling1D(),
|
||||||
layers.Dense(64, activation="relu"),
|
layers.Dense(64, activation="relu"),
|
||||||
layers.Dropout(0.4),
|
layers.Dropout(0.4),
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 23 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 18 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 36 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 87 KiB After Width: | Height: | Size: 91 KiB |
Binary file not shown.
Binary file not shown.
@@ -1,8 +1,8 @@
|
|||||||
precision recall f1-score support
|
precision recall f1-score support
|
||||||
|
|
||||||
Negatif (0) 0.58 0.34 0.42 185
|
Negatif (0) 0.59 0.22 0.32 185
|
||||||
Positif (1) 0.98 0.99 0.99 7572
|
Positif (1) 0.98 1.00 0.99 7572
|
||||||
|
|
||||||
accuracy 0.98 7757
|
accuracy 0.98 7757
|
||||||
macro avg 0.78 0.66 0.71 7757
|
macro avg 0.78 0.61 0.65 7757
|
||||||
weighted avg 0.97 0.98 0.98 7757
|
weighted avg 0.97 0.98 0.97 7757
|
||||||
|
|||||||
Reference in New Issue
Block a user