Chordia / docs /TUTORIAL_EN.md
Corolin's picture
first commit
0a6452f

Emotion Prediction Model - Comprehensive Tutorial

Table of Contents

  1. Project Overview
  2. Installation Guide
  3. Quick Start
  4. Data Preparation
  5. Model Training
  6. Inference
  7. Configuration Files
  8. Command-Line Interface (CLI)
  9. FAQ
  10. 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
git clone <repository-url>
cd ann-playground
  1. Create Virtual Environment
python -m venv venv
source venv/bin/activate  # Linux/Mac
# OR
venv\Scripts\activate  # Windows
  1. Install Dependencies
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:

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:

# 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)