File size: 2,634 Bytes
0a6452f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# Emotion Prediction Model - Comprehensive Tutorial

## Table of Contents

1. [Project Overview](#project-overview)
2. [Installation Guide](#installation-guide)
3. [Quick Start](#quick-start)
4. [Data Preparation](#data-preparation)
5. [Model Training](#model-training)
6. [Inference](#inference)
7. [Configuration Files](#configuration-files)
8. [Command-Line Interface (CLI)](#command-line-interface)
9. [FAQ](#faq)
10. [Troubleshooting](#troubleshooting)

## Project Overview

This project is a deep learning-based model designed to predict changes in emotional and physiological states. It uses a Multi-Layer Perceptron (MLP) to predict how a user's PAD (Pleasure, Arousal, Dominance) values change based on initial conditions.

### Core Features
- **Input**: 7-dimensional features (User PAD 3D + Vitality 1D + Current PAD 3D)
- **Output**: 3-dimensional predictions (ΔPAD: ΔPleasure, ΔArousal, ΔDominance)
- **Model**: MLP Architecture
- **Support**: Training, Inference, Evaluation, Benchmarking

## Installation Guide

### Requirements
- Python 3.8+
- CUDA Support (Optional, for GPU acceleration)

### Steps

1. **Clone the Project**
```bash
git clone <repository-url>
cd ann-playground
```

2. **Create Virtual Environment**
```bash
python -m venv venv
source venv/bin/activate  # Linux/Mac
# OR
venv\Scripts\activate  # Windows
```

3. **Install Dependencies**
```bash
pip install -r requirements.txt
```

## Quick Start

### 1. Run the Quick Start Script

The easiest way to get started is to run the quick start tutorial:

```bash
cd examples
python quick_start.py
```

This will automatically:
- Generate synthetic training data
- Train a base model
- Perform inference
- Explain the results

### 2. Using the Command-Line Interface

The project provides a comprehensive CLI:

```bash
# Train the model
python -m src.cli.main train --config configs/training_config.yaml

# Perform prediction
python -m src.cli.main predict --model model.pth --quick 0.5 0.3 -0.2 75.0 0.1 0.4 -0.1
```

## Data Preparation

### Data Format

#### Input Features (7D)
| Feature | Type | Range | Description |
|---------|------|-------|-------------|
| user_pleasure | float | [-1, 1] | User's base pleasure |
| user_arousal | float | [-1, 1] | User's base arousal |
| user_dominance | float | [-1, 1] | User's base dominance |
| vitality | float | [0, 100] | Vitality level |
| current_pleasure | float | [-1, 1] | Current pleasure state |
| current_arousal | float | [-1, 1] | Current arousal state |
| current_dominance | float | [-1, 1] | Current dominance state |

---
*(English translation continues for the rest of the document)*