refactor: restrukturisasi folder eksperimen ke tasks modular
This commit is contained in:
@@ -6,32 +6,48 @@ Repository ini berisi implementasi tugas dan eksperimen Deep Learning, mencakup
|
||||
|
||||
## 📁 Struktur Folder Proyek
|
||||
|
||||
Struktur direktori telah dirapikan secara modular sebagai berikut:
|
||||
Struktur direktori dirapikan secara modular dan terkelompok berdasarkan topik tugas:
|
||||
|
||||
```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 tambahan
|
||||
│ └── model_selection.md # Analisis justifikasi pemilihan model (Tugas 3)
|
||||
├── src/ # Modul reusable / fungsi pembantu
|
||||
├── 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
|
||||
├── experiments/ # Skrip eksperimen & tugas utama
|
||||
│ ├── 01_mlp_comparison.py # Tugas 1: Perbandingan 3 arsitektur MLP
|
||||
│ ├── 02_regularization.py # Tugas 2: Eksperimen Regularisasi BatchNorm + Dropout
|
||||
│ ├── 03_model_selection.py # Tugas 3: Implementasi contoh arsitektur model
|
||||
│ └── 04_cnn_mnist.py # Tugas 4: Implementasi CNN MNIST & perbandingan vs MLP
|
||||
└── results/ # Output dari eksperimen
|
||||
├── figures/ # Plot visualisasi (akurasi, loss curve, bar chart)
|
||||
│ ├── hasil_cnn.png
|
||||
│ └── loss_regularization.png
|
||||
└── models/ # Bobot model terlatih (.keras)
|
||||
├── model_cnn_mnist.keras
|
||||
└── model_c_regularized.keras
|
||||
├── 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)
|
||||
```
|
||||
|
||||
---
|
||||
@@ -56,29 +72,27 @@ python -m venv .venv
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
|
||||
### 3. Menjalankan Eksperimen
|
||||
### 3. Menjalankan Tugas
|
||||
|
||||
Semua skrip eksperimen berada di dalam folder `experiments/`:
|
||||
#### 🔹 Topik 1: Multi-Layer Perceptron (MLP)
|
||||
```bash
|
||||
python tasks/mlp/01_mlp_comparison.py
|
||||
python tasks/mlp/02_regularization.py
|
||||
python tasks/mlp/03_model_selection.py
|
||||
```
|
||||
|
||||
- **Eksperimen 1: Perbandingan Arsitektur MLP**
|
||||
```bash
|
||||
python experiments/01_mlp_comparison.py
|
||||
```
|
||||
#### 🔹 Topik 2: Convolutional Neural Network (CNN)
|
||||
```bash
|
||||
python tasks/cnn/04_cnn_mnist.py
|
||||
python tasks/cnn/05_cnn_full_pipeline.py
|
||||
python tasks/cnn/06_cnn_deeper.py
|
||||
python tasks/cnn/07_cnn_evaluation.py
|
||||
```
|
||||
|
||||
- **Eksperimen 2: Regularisasi (BatchNorm + Dropout)**
|
||||
```bash
|
||||
python experiments/02_regularization.py
|
||||
```
|
||||
|
||||
- **Eksperimen 3: Contoh Model Selection (LSTM, CNN, NLP, XGBoost)**
|
||||
```bash
|
||||
python experiments/03_model_selection.py
|
||||
```
|
||||
|
||||
- **Eksperimen 4: CNN MNIST vs MLP**
|
||||
```bash
|
||||
python experiments/04_cnn_mnist.py
|
||||
```
|
||||
#### 🔹 Topik 3: NLP Analisis Sentimen
|
||||
```bash
|
||||
python tasks/nlp_sentiment/08_sentimen_gap.py
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user