| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Harmonic.Evaluation.Analysis.Markov
Description
This module is used exclusively during data ingestion (app/Main.hs) to
compute transition probabilities from the YCACL corpus. These probabilities
are stored as edge weights in the Neo4j graph database.
This module is NOT used in the runtime generation path. At runtime, transition weights are read from Neo4j edges by Harmonic.Evaluation.Database.Query.
Academic Lineage
Data Science In The Creative Process (South, 2018), Section: Markov module. The Markov chain approach resolves "Generative Uninspiration" — the problem of manually traversing exhaustive overtone combination charts — by training transition probabilities on the Yale Classical Archives Corpus (Bach chorales and other composers).
Synopsis
- type Edge = (Cadence, Cadence)
- type TransitionCounts = Map Edge Double
- probabilitiesFromCounts :: TransitionCounts -> Map Edge Double
Documentation
type TransitionCounts = Map Edge Double Source #
Raw observed (possibly fractional) counts per edge, before
normalisation. Produced by
buildTransitionCounts.
probabilitiesFromCounts :: TransitionCounts -> Map Edge Double Source #
Normalise edge counts into per-source transition probabilities, so the outgoing edges of each cadence sum to 1.