I am using the Spotify algorithm Sort Your Music for my doctoral dissertation on music as an emotion regulation tool. I've utilized energy, popularity, and valence as the primary musical characteristics for my study. Energy and popularity are both well-defined on the Spotify website, however valence is more ambiguous. I've searched through the community posts, Reddit, and even tweeted the developer of the algorithm (he did not reply). However, no one can explain how the Spotify API defines valence, other than as "musical positivity."
I want to know if this is defined by minor/major key, lyrical content, pitch, or something else altogether. I would greatly appreciate any info you may have!