Portability | non-portable |
---|---|
Stability | experimental |
Maintainer | bash@cs.uu.nl, jpm@cs.ox.ac.uk |
Safe Haskell | None |
Summary: A module for evaluating chord and key annotations
- relCorrectOverlap :: (a -> a -> Bool) -> [TimedData a] -> [TimedData a] -> Double
- achievScore :: [TimedData ChordLabel] -> [TimedData [ChordLabel]] -> Double
- chordChangeRatio :: (ChordLabel -> ChordLabel -> Bool) -> [TimedData ChordLabel] -> [TimedData ChordLabel] -> Double
- avgDistToOne :: [Double] -> Double
- chordTriadEq :: ChordLabel -> ChordLabel -> Bool
- chordClassEq :: ChordLabel -> ChordLabel -> Bool
- majMinEq :: ChordLabel -> ChordLabel -> Bool
- printChordRCO :: (AudioFeat -> ChordAnnotation) -> [TimedData Key] -> AudioFeat -> [TimedData ChordLabel] -> IO Double
- printRCO :: (a -> a -> IO Bool) -> [TimedData a] -> [TimedData a] -> IO Double
- sample :: [TimedData a] -> [a]
Evaluation functions
relCorrectOverlap :: (a -> a -> Bool) -> [TimedData a] -> [TimedData a] -> DoubleSource
Calculates the relative correct overlap, which is the recall of matching frames, and defined as the nr of matching frames (sampled at an 10 milisecond interval) divided by all frames.
achievScore :: [TimedData ChordLabel] -> [TimedData [ChordLabel]] -> DoubleSource
calculates the maximal achievable score given a ground truth annotation and a chord candidate list.
chordChangeRatio :: (ChordLabel -> ChordLabel -> Bool) -> [TimedData ChordLabel] -> [TimedData ChordLabel] -> DoubleSource
avgDistToOne :: [Double] -> DoubleSource
The chordChangeRatio
is optimal if it is one, but it can be larger or
smaller than 1. Therefore, calculating the average blurs the actual result.
avgDistToOne
takes the absolute difference to 1.0 and averages these for a
list of Doubles.
Chord and key equality functions
chordTriadEq :: ChordLabel -> ChordLabel -> BoolSource
Returns True if both ChordLabel
s are equal at the triad level: they are
either moth major or both minor. None Chords match only with other None
Chords and with nothing else
chordClassEq :: ChordLabel -> ChordLabel -> BoolSource
Returns True if both ChordLabel
s are equal at the chord class level:
A chord is classified as being major, minor, dominant seventh, or dimished
seventh. chordClassEq
only returns True if the class of compared chords
is the same. None Chords match only with other None Chords and
with nothing else
majMinEq :: ChordLabel -> ChordLabel -> BoolSource
Displaying evaluations
printChordRCO :: (AudioFeat -> ChordAnnotation) -> [TimedData Key] -> AudioFeat -> [TimedData ChordLabel] -> IO DoubleSource
does the same thing as relCorrectOverlap, but it also prints the
chords and uses a lower sample rate. N.B. the number output by
printRelCorrectOverlap
might differ from the output of
relCorrectOverlap
, because a different sample rate might be used (see
Constants
).
printRCO :: (a -> a -> IO Bool) -> [TimedData a] -> [TimedData a] -> IO DoubleSource
Calculates the relative correct overlap, which is the recall
of matching frames, and defined as the nr of matching frames (sampled at
an interval set in Constants
divided by all frames.
This functions difers from relCorrectOverlap
in that it uses an
equality function that is in IO.