viva_emotion/pad

PAD Model - Pleasure, Arousal, Dominance

The “blood type” of emotional state.

Theory

Three-dimensional affective space (Mehrabian & Russell, 1974; Mehrabian, 1996):

Note on P-D Correlation

Bakker et al. (2014) found P-D correlation ≈ 0.85 in some studies. This implementation treats dimensions as independent (standard approach), but be aware they may not be perfectly orthogonal empirically.

References

Types

Core emotional state All values bounded to [-1.0, 1.0]

pub type Pad {
  Pad(pleasure: Float, arousal: Float, dominance: Float)
}

Constructors

  • Pad(pleasure: Float, arousal: Float, dominance: Float)

Values

pub fn add(a: Pad, b: Pad) -> Pad

Add two PAD states (for applying deltas)

pub fn distance(a: Pad, b: Pad) -> Float

Euclidean distance between two PAD states

pub fn is_suspicious_uniform(noise: Pad) -> Bool

Check if noise is suspiciously uniform (all in [-1,1]) Returns True if noise looks like it might be uniform, not Gaussian

pub fn is_valid_noise(noise: Pad) -> Bool

Validate that noise looks like N(0,1) samples Returns True if all components are within plausible range This is a sanity check, not a statistical test

pub fn lerp(from: Pad, to: Pad, t: Float) -> Pad

Linear interpolation between two PAD states

pub fn neutral() -> Pad

Neutral state - emotional equilibrium

pub fn new(
  pleasure: Float,
  arousal: Float,
  dominance: Float,
) -> Pad

Create a new PAD state (automatically clamped)

pub fn scale(pad: Pad, factor: Float) -> Pad

Scale a PAD state by a factor

Search Document