annotate tools/segmentation/generics.lisp @ 330:2fbff655ba47 tip

Removed cpitch-adj and cents SQL columns
author Jeremy Gow <jeremy.gow@gmail.com>
date Mon, 21 Jan 2013 11:08:11 +0000
parents 56c2fc41a837
children
rev   line source
d@74 1 (in-package "AMUSE-SEGMENTATION")
d@74 2
d@74 3 (defgeneric boundary-strength (segmenter object composition)
d@74 4 (:documentation "Returns a (positive?) number, with 0
d@74 5 indicating no boundary. N.B. Whether this indicates a boundary
m@140 6 before or after a moment is the responsibility of the caller to
m@140 7 know."))
d@74 8
d@74 9 (defgeneric boundary-time (segmenter object)
d@74 10 (:documentation "Returns the moment that the value returned by
d@74 11 boundary-strength applies to if object is the second input to
d@74 12 the method. Essentially, this distinguishes between segmenters
d@74 13 that look to the beginning of a note and those that look at the
d@75 14 end."))
d@74 15
d@74 16 (defgeneric ground-truth-segmenter-before (composition)
d@74 17 (:documentation "Returns the segmenter that, when put into
d@74 18 boundary-strength, supplies segmentation as given in a
d@74 19 ground truth for the composition. N.B. This needs to return one
d@74 20 segmenter only, so in cases of multiple ground truths, this
d@74 21 method must arbitrate."))
d@74 22
d@74 23 (defgeneric ground-truth-segmenter-after (composition)
d@74 24 (:documentation "Returns the segmenter that, when put into
d@74 25 boundary-strength-after, supplies segmentation as given in a
d@74 26 ground truth for the composition. N.B. This needs to return one
d@74 27 segmenter only, so in cases of multiple ground truths, this
d@74 28 method must arbitrate."))
d@74 29
d@75 30 (defgeneric ground-truth-segmenterp (segmenter)
d@75 31 (:method ((s ground-truth-segmenter)) t)
d@75 32 (:method (s) nil)) ;; prob not necessary?
d@75 33 (defgeneric segments-beforep (segmenter)
d@75 34 (:method ((s before-segmenter)) t)
d@75 35 (:method ((s after-segmenter)) nil))
d@74 36 (defgeneric segments-afterp (segmenter)
d@74 37 (:method (s) (not (segments-beforep s))))
d@80 38
d@80 39 (defgeneric make-segmentation (segmenter composition)
d@80 40 (:documentation "Basic way to generate segmentation
d@80 41 object. N.B. Requires segmenter to do more work than
d@80 42 hitherto."))
d@80 43
d@80 44 (defgeneric ground-truth-segmentation (segmentation)
d@80 45 (:documentation "Returns the relevant ground-truth for
d@80 46 evaluating segmentation"))
d@80 47 (defgeneric (setf ground-truth-segmentation) (segmentation value)
d@80 48 (:documentation "Sets the segmentation to be used as ground
d@80 49 truth by segmentation to value"))
d@80 50 (defgeneric precision (segmentation)
m@85 51 (:documentation "Returns the precision ratio for segmentation
d@80 52 when compared with the (ground-truth-segmentation
d@80 53 segmentation)"))
d@80 54 (defgeneric recall (segmentation)
m@85 55 (:documentation "Returns the precision ratio for segmentation
d@80 56 when compared with the (ground-truth-segmentation
d@80 57 segmentation)"))
d@80 58 (defgeneric fall-out (segmentation)
m@85 59 (:documentation "Returns the precision ratio for segmentation
d@80 60 when compared with the (ground-truth-segmentation
d@80 61 segmentation)"))
d@80 62 (defgeneric F-measure (segmentation)
m@85 63 (:documentation "Returns the precision ratio for segmentation
d@80 64 when compared with the (ground-truth-segmentation
d@80 65 segmentation)"))
d@80 66
d@80 67 (defgeneric boundary-list (segmentation)
d@80 68 (:documentation "Returns a list of moments corresponding to the
d@80 69 boundary points of the segmentation"))
d@80 70 (defgeneric segment-list (segmentation)
d@80 71 (:documentation "Returns a list of anchored periods
m@85 72 corresponding to the segments resulting from the segmentation"))