docs: update readme and replace dami result
This commit is contained in:
@@ -1,78 +1,62 @@
|
||||
# Praktikum Deep Learning - Kelompok 3
|
||||
|
||||
Repository ini berisi implementasi tugas dan eksperimen Deep Learning, mencakup perbandingan arsitektur Multi-Layer Perceptron (MLP), teknik regularisasi (Batch Normalization & Dropout), studi kasus pemilihan model (*Model Selection*), serta implementasi Convolutional Neural Network (CNN) pada dataset MNIST.
|
||||
Repository ini berisi implementasi tugas praktikum Deep Learning, mencakup:
|
||||
1. **Multi-Layer Perceptron (MLP)**: Eksperimen kedalaman layer & regularisasi (*Batch Normalization* & *Dropout*) pada dataset MNIST.
|
||||
2. **Model Selection**: Studi kasus pemilihan arsitektur model sesuai karakteristik data (Time Series, Computer Vision, NLP, dan Tabular).
|
||||
3. **Convolutional Neural Network (CNN)**: Pipeline klasifikasi citra MNIST, eksplorasi kedalaman arsitektur (2 blok vs 3 blok), serta analisis performa mendalam.
|
||||
4. **Natural Language Processing (NLP)**: Klasifikasi sentimen ulasan produk Tokopedia menggunakan arsitektur *Embedding* dan *GlobalAveragePooling1D*.
|
||||
|
||||
---
|
||||
|
||||
## 📁 Struktur Folder Proyek
|
||||
|
||||
Struktur direktori dirapikan secara modular dan terkelompok berdasarkan topik tugas:
|
||||
## 📁 Struktur Direktori
|
||||
|
||||
```text
|
||||
kelompok3-deeplearning/
|
||||
├── .gitignore # Konfigurasi file & folder yang diabaikan git
|
||||
├── requirements.txt # Daftar pustaka / dependensi Python
|
||||
├── README.md # Dokumentasi utama proyek
|
||||
├── docs/ # Dokumentasi dan analisis laporan
|
||||
│ ├── laporan_akhir.md
|
||||
│ ├── PRESENTATION.md
|
||||
│ ├── model_selection.md
|
||||
│ └── analisis_evaluasi_model_sentimen_gap.md
|
||||
├── src/ # Modul reusable / fungsi pembantu bersama
|
||||
│ ├── __init__.py
|
||||
│ ├── data_loader.py # Loader & preprocessor dataset MNIST (MLP & CNN)
|
||||
│ ├── models.py # Definisi arsitektur model (MLP, Regularized MLP, CNN)
|
||||
│ └── utils.py # Callback timer, manajemen folder, plotting helper
|
||||
├── tasks/ # Skrip tugas yang dikelompokkan berdasarkan topik
|
||||
│ ├── mlp/ # Topik 1: Multi-Layer Perceptron (MNIST)
|
||||
│ │ ├── 01_mlp_comparison.py # Eksperimen perbandingan 3 arsitektur MLP
|
||||
│ │ ├── 02_regularization.py # Eksperimen regularisasi (BatchNorm + Dropout)
|
||||
│ │ └── 03_model_selection.py # Studi kasus pemilihan arsitektur model
|
||||
│ ├── cnn/ # Topik 2: Convolutional Neural Network (MNIST)
|
||||
│ │ ├── 04_cnn_mnist.py # Baseline CNN vs MLP
|
||||
│ │ ├── 05_cnn_full_pipeline.py # Pipeline CNN lengkap (Loss/Acc curve, Confusion Matrix)
|
||||
│ │ ├── 06_cnn_deeper.py # Eksplorasi kedalaman CNN (2 blok vs 3 blok)
|
||||
│ │ └── 07_cnn_evaluation.py # Evaluasi mendalam (per-class metrics, confidence, misclassified)
|
||||
│ └── nlp_sentiment/ # Topik 3: NLP Analisis Sentimen (Tokopedia)
|
||||
│ └── 08_sentimen_gap.py # Klasifikasi sentimen ulasan Tokopedia (GlobalAveragePooling1D)
|
||||
└── results/ # Output terorganisir per kelompok tugas
|
||||
├── 01_mlp/
|
||||
│ ├── figures/ # Visualisasi grafik MLP & regularisasi
|
||||
│ ├── models/ # Model terlatih MLP (.keras)
|
||||
│ └── reports/ # Laporan & ringkasan metrik MLP (.csv)
|
||||
├── 02_cnn/
|
||||
│ ├── figures/ # Visualisasi grafik, confusion matrix, error analysis CNN
|
||||
│ ├── models/ # Model terlatih CNN (.keras)
|
||||
│ └── reports/ # Classification report (.txt, .csv) & evaluasi CNN
|
||||
└── 03_nlp_sentiment/
|
||||
├── figures/ # Distribusi label, kurva training, confusion matrix GAP
|
||||
├── models/ # Model terlatih sentiment GAP (.keras)
|
||||
└── reports/ # Classification report sentimen (.txt)
|
||||
├── requirements.txt # Dependensi Python proyek
|
||||
├── README.md # Panduan utama proyek
|
||||
├── docs/ # Laporan & materi presentasi
|
||||
│ ├── laporan_akhir.md # Laporan akhir praktikum lengkap
|
||||
│ ├── PRESENTATION.md # Panduan materi slide presentasi
|
||||
│ ├── model_selection.md # Analisis justifikasi pemilihan model
|
||||
│ └── analisis_evaluasi_model_sentimen_gap.md # Analisis model NLP Tokopedia
|
||||
├── src/ # Modul bersama (data loader, arsitektur, utils)
|
||||
│ ├── data_loader.py # Data loader & preprocessor MNIST
|
||||
│ ├── models.py # Fungsi pembangun arsitektur model
|
||||
│ └── utils.py # Timer callback & helper visualisasi
|
||||
├── tasks/ # Skrip tugas yang siap dieksekusi per topik
|
||||
│ ├── mlp/ # Topik 1: Multi-Layer Perceptron
|
||||
│ │ ├── 01_mlp_comparison.py # Perbandingan 3 arsitektur MLP (1, 2, 3 hidden layer)
|
||||
│ │ ├── 02_regularization.py # Uji regularisasi BatchNorm + Dropout pada MLP
|
||||
│ │ └── 03_model_selection.py # Implementasi contoh arsitektur model selection
|
||||
│ ├── cnn/ # Topik 2: Convolutional Neural Network
|
||||
│ │ ├── 04_cnn_mnist.py # Baseline CNN MNIST & perbandingan awal vs MLP
|
||||
│ │ ├── 05_cnn_full_pipeline.py # Training pipeline CNN lengkap & confusion matrix
|
||||
│ │ ├── 06_cnn_deeper.py # Eksplorasi kedalaman arsitektur CNN (2 blok vs 3 blok)
|
||||
│ │ └── 07_cnn_evaluation.py # Evaluasi mendalam (metrik per kelas, confidence, error analysis)
|
||||
│ └── nlp_sentiment/ # Topik 3: NLP Analisis Sentimen
|
||||
│ └── 08_sentimen_gap.py # Klasifikasi sentimen ulasan Tokopedia (GAP Model)
|
||||
└── results/ # Output hasil training (grafik, bobot model, laporan)
|
||||
├── 01_mlp/ # Output tugas MLP
|
||||
├── 02_cnn/ # Output tugas CNN
|
||||
└── 03_nlp_sentiment/ # Output tugas NLP Sentimen
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🚀 Panduan Instalasi & Menjalankan
|
||||
## 🚀 Panduan Menjalankan
|
||||
|
||||
### 1. Buat dan Aktifkan Virtual Environment
|
||||
### 1. Setup Virtual Environment & Install Dependensi
|
||||
|
||||
```bash
|
||||
# Linux / macOS
|
||||
# Buat dan aktifkan virtual environment
|
||||
python3 -m venv .venv
|
||||
source .venv/bin/activate
|
||||
|
||||
# Windows (Command Prompt / PowerShell)
|
||||
python -m venv .venv
|
||||
.venv\Scripts\activate
|
||||
```
|
||||
|
||||
### 2. Install Dependensi
|
||||
|
||||
```bash
|
||||
# Install seluruh dependensi yang dibutuhkan
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
|
||||
### 3. Menjalankan Tugas
|
||||
### 2. Eksekusi Script per Topik
|
||||
|
||||
#### 🔹 Topik 1: Multi-Layer Perceptron (MLP)
|
||||
```bash
|
||||
@@ -89,37 +73,26 @@ python tasks/cnn/06_cnn_deeper.py
|
||||
python tasks/cnn/07_cnn_evaluation.py
|
||||
```
|
||||
|
||||
#### 🔹 Topik 3: NLP Analisis Sentimen
|
||||
#### 🔹 Topik 3: NLP Analisis Sentimen (Tokopedia)
|
||||
```bash
|
||||
python tasks/nlp_sentiment/08_sentimen_gap.py
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 📊 Ringkasan Hasil Eksperimen
|
||||
## 📚 Dokumen Terkait
|
||||
|
||||
### 1. Perbandingan Arsitektur MLP (Tugas 1)
|
||||
- **Model A (1 Hidden Layer - 64)**: ~97.06% Akurasi, 50,890 Parameter
|
||||
- **Model B (2 Hidden Layers - 128 → 64)**: ~97.24% Akurasi, 109,386 Parameter
|
||||
- **Model C (3 Hidden Layers - 256 → 128 → 64)**: ~97.64% Akurasi, 242,762 Parameter
|
||||
|
||||
### 2. Regularisasi pada Model C (Tugas 2)
|
||||
- Penambahan **Batch Normalization** dan **Dropout (0.3)** terbukti menstabilkan proses training dan menekan *generalization gap* / overfitting pada kurva validasi.
|
||||
|
||||
### 3. Keunggulan CNN vs MLP pada MNIST (Tugas 4)
|
||||
| Metrik | MLP Terbaik (Model C) | CNN Sederhana | Perubahan |
|
||||
| :--- | :--- | :--- | :--- |
|
||||
| **Test Accuracy** | 97.64% | **99.03%** | **+1.39%** |
|
||||
| **Error Rate** | 2.36% | **0.97%** | **-58.9% (relatif)** |
|
||||
| **Jumlah Parameter** | 242,762 | **121,930** | **-49.8% (lebih efisien)** |
|
||||
| **Salah Klasifikasi** | 236 / 10,000 | **97 / 10,000** | **139 gambar lebih sedikit** |
|
||||
- **Laporan Akhir Praktikum:** [docs/laporan_akhir.md](docs/laporan_akhir.md)
|
||||
- **Materi Presentasi (PPT):** [docs/PRESENTATION.md](docs/PRESENTATION.md)
|
||||
- **Analisis Model Selection:** [docs/model_selection.md](docs/model_selection.md)
|
||||
- **Analisis Sentimen Tokopedia:** [docs/analisis_evaluasi_model_sentimen_gap.md](docs/analisis_evaluasi_model_sentimen_gap.md)
|
||||
|
||||
---
|
||||
|
||||
## 🛠️ Teknologi & Framework
|
||||
- Python 3.10+
|
||||
- TensorFlow / Keras
|
||||
- NumPy & Pandas
|
||||
- Matplotlib & Seaborn
|
||||
- XGBoost & Scikit-Learn
|
||||
## 🛠️ Stack Teknologi
|
||||
|
||||
- **Bahasa:** Python 3.10+
|
||||
- **Deep Learning:** TensorFlow & Keras
|
||||
- **NLP & Dataset:** Hugging Face Datasets & Scikit-Learn
|
||||
- **Data & Visualisasi:** NumPy, Pandas, Matplotlib, & Seaborn
|
||||
- **Machine Learning Klasik:** XGBoost
|
||||
|
||||
Reference in New Issue
Block a user