Skip to content
mtpearce edited this page May 14, 2020 · 2 revisions

Mean melody IC

To get mean information contents (IC) for each composition of dataset 0 in a list. The first value represents the average IC for the whole dataset, the second value is a list of average ICs for each composition in the dataset. If :detail 3 is specified, then the output would contain a third list, containing lists of ICs for each event in each composition in the database.

CL-USER> (idyom:idyom 0 '(cpitch) '(cpintfref cpint) :detail 2)
2.493305
(2.1368716 2.8534691 2.6938546 2.6491673 2.4993074 2.6098127 2.7728052 2.772861
 2.5921957 2.905856 2.3591626 2.957503 2.4042292 2.7562473 2.3996017 2.8073587
 2.114944 1.7434102 2.2310295 2.6374347 2.361792 1.9476132 2.501488 2.5472867
 2.1056154 2.8225484 2.134257 2.9162033 3.0715692 2.9012227 2.7291088 2.866882
 2.8795822 2.4571223 2.9277062 2.7861307 2.6623116 2.3304622 2.4217033
 2.0556943 2.4048684 2.914848 2.7182267 3.0894585 2.873869 1.8821808 2.640174
 2.8165438 2.5423129 2.3011856 3.1477294 2.655349 2.5216308 2.0667994 3.2579045
 2.573013 2.6035044 2.202191 2.622113 2.2621205 2.3617425 2.7526956 2.3281655
 2.9357266 2.3372407 3.1848125 2.67367 2.1906006 2.7835917 2.6332111 3.206142
 2.1426969 2.194259 2.415167 1.9769101 2.0870917 2.7844474 2.2373738 2.772138
 2.9702199 1.724408 2.473073 2.2464263 2.2452457 2.688889 2.6299863 2.2223835
 2.8082614 2.673671 2.7693706 2.3369458 2.5016947 2.3837066 2.3682225 2.795649
 2.9063463 2.5880773 2.0457468 1.8635312 2.4522712 1.5877498 2.8802161
 2.7988417 2.3125513 1.7245895 2.2404804 2.1694546 2.365556 1.5905867 1.3827317
 2.2706041 3.023884 2.2864542 2.1259797 2.713626 2.1967313 2.5721254 2.5812547
 2.8233812 2.3134546 2.6203637 2.945946 2.601433 2.1920888 2.3732007 2.440137
 2.4291563 2.3676903 2.734724 3.0283954 2.8076048 2.7796154 2.326931 2.1779459
 2.2570527 2.2688026 1.3976555 2.030298 2.640235 2.568248 2.6338177 2.157162
 2.3915367 2.7873137 2.3088667 2.2176988 2.4402564 2.8062992 2.784044 2.4296925
 2.3520193 2.6146257)

Write note IC to file

To write the information contents for each note of each melody in dataset 0 to a file:

CL-USER> (idyom:idyom 0 '(cpitch) '((cpintfref cpint)) :detail 3 :output-path "/tmp/")

See IDyOM Output for a description of the output files.

Viewpoint Selection

The following example predicts the pitch values in dataset 17 using the short-term model based on the optimal set of defined viewpoints (i.e., the set which minimizes the mean information content of the dataset, in this case with precision of three decimal places). The viewpoint selection procedure settled on a system that predicts pitch in terms of linked cpitch-class and contour.

CL-USER> (idyom:idyom 17 '(cpitch) :select :models :stm :dp 3)
Selecting viewpoints for the STM model on dataset 17 predicting viewpoints (CPITCH).
Generating candidate viewpoints from: (CPITCH CPITCH-CLASS CPINT
                                       CPINT-SIZE CONTOUR NEWCONTOUR)
Max. links 2, whitelist (ANY), blacklist NIL
Candidate viewpoints: (CPITCH CPITCH-CLASS CPINT CPINT-SIZE CONTOUR
                       NEWCONTOUR (CONTOUR NEWCONTOUR)
                       (CPINT-SIZE NEWCONTOUR) (CPINT-SIZE CONTOUR)
                       (CPINT NEWCONTOUR) (CPINT CONTOUR)
                       (CPINT CPINT-SIZE) (CPITCH-CLASS NEWCONTOUR)
                       (CPITCH-CLASS CONTOUR) (CPITCH-CLASS CPINT-SIZE)
                       (CPITCH-CLASS CPINT) (CPITCH NEWCONTOUR)
                       (CPITCH CONTOUR) (CPITCH CPINT-SIZE) (CPITCH CPINT)
                       (CPITCH CPITCH-CLASS))

Selected system NIL, mean IC = NIL

Selected system ((CPITCH-CLASS CONTOUR)), mean IC = 3.0302427
 =======================================================================================
The selected viewpoint system with a mean IC of 3.0302427 is ((CPITCH-CLASS
                                                               CONTOUR))
3.0302427
(3.169925 3.169925 3.0849624 3.0849624 2.9886398 2.9886398 2.8774438 2.8774438)
((3.169925 3.169925) (3.169925 3.169925) (3.169925 3.0) (3.169925 3.0)
 (3.169925 2.807355) (3.169925 2.807355) (3.169925 2.5849626)
 (3.169925 2.5849626))

The following example predicts the pitch values in dataset 12 based on the optimal set of viewpoints in the pitch-short basis set, with up to one link at a time. The viewpoint selection procedure settled on a system that predicts pitch in terms of (unlinked) cpitch and cpint.

CL-USER> (idyom:idyom 12 '(cpitch) :select :basis :pitch-short :max-links 1)
Selecting viewpoints for the BOTH+ model on dataset 12 predicting viewpoints (CPITCH).
Generating candidate viewpoints from: (CPITCH CPINT CONTOUR CPINTFREF)
Max. links 1, whitelist (ANY), blacklist NIL
Candidate viewpoints: (CPITCH CPINT CONTOUR CPINTFREF)

Selected system NIL, mean IC = NIL

Selected system (CPINT), mean IC = 3.7895417

Selected system (CPITCH CPINT), mean IC = 3.7376742
 =======================================================================================
The selected viewpoint system with a mean IC of 3.7376742 is (CPITCH CPINT)
3.7376742
(3.9260304 4.1582417 3.751911 3.6064732 3.2210944 2.8727105 3.0521867 4.3247104
 3.6203105 3.966651 3.7372475 4.083516 3.8313186 4.1036334 4.187075 3.4364297
 3.7849827 3.2999115 3.6294613 4.1595836)
((4.1709256 4.3708363 3.6702404 4.2592373 3.1589127)
 (4.5585337 4.093669 2.4383135 5.0920763 4.53643 4.230427)
 (5.090137 3.5416226 4.473012 2.9148462 3.8977542 2.5940926)
 (3.9261668 4.202055 2.9928908 4.3431 3.5786173 2.5960097)
 (4.0608945 4.230951 3.3359437 2.083827 3.4474165 2.1675336)
 (4.194988 4.1491704 3.8509068 1.0185144 2.9878855 1.0347978)
 (4.201399 3.6695127 2.7513106 4.227906 2.0919714 3.3589873 1.0642183)
 (4.1551943 4.396271 5.0603714 5.8716707 4.067729 2.3970249)
 (3.9431055 4.563211 3.3521545 4.0508695 3.5459816 2.266541)
 (4.221346 3.6652822 4.02317 5.0140486 3.4237287 3.4523292)
 (4.503613 3.3027549 4.369455 3.3479471 1.732882 5.166831)
 (4.0695643 3.6662188 4.4439473 4.9608116 3.2770386)
 (4.2264395 3.8040807 3.924297 4.070324 3.0400128 3.1923976 4.561678)
 (4.089103 3.692827 3.3639944 4.302426 4.5587425 4.6147075)
 (3.986353 5.397743 2.4407306 4.25579 4.2020874 5.218803 3.8080173)
 (4.067979 4.177483 4.3041263 1.6089504 3.4185483 3.0414906)
 (3.8922036 4.4922967 2.7819204 3.1301258 5.2425566 3.1707919)
 (4.2027206 3.868896 2.9337564 3.205565 2.980592 2.6079388)
 (4.309007 3.3705285 4.138041 4.3944063 1.9353238)
 (4.0367713 3.8443778 4.1985188 4.89163 5.230077 3.170318 3.7453916))

The next example predicts the pitch values in dataset 12 based on the optimal set of viewpoints in a user-defined basis set.

CL-USER> (idyom:idyom 12 '(cpitch) :select :basis '(cpitch cpint contour cpintfref ioi ioi-ratio ioi-contour))
Selecting viewpoints for the BOTH+ model on dataset 12 predicting viewpoints (CPITCH).
Generating candidate viewpoints from: (CPITCH CPINT CONTOUR CPINTFREF IOI IOI-RATIO IOI-CONTOUR)
Max. links 2, whitelist (ANY), blacklist NIL
Candidate viewpoints: (CPITCH CPINT CONTOUR CPINTFREF IOI IOI-RATIO IOI CONTOUR
                       (IOI-RATIO IOI-CONTOUR) (IOI IOI-CONTOUR) (IOI IOI-RATIO)
                       (CPINTFREF IOI-CONTOUR) (CPINTFREF IOI-RATIO) (CPINTFREF IOI)
                       (CONTOUR IOI-CONTOUR) (CONTOUR IOI-RATIO) (CONTOUR IOI)
                       (CONTOUR CPINTFREF) (CPINT IOI-CONTOUR) (CPINT IOI-RATIO)
                       (CPINT IOI) (CPINT CPINTFREF) (CPINT CONTOUR)
                       (CPITCH IOI-CONTOUR) (CPITCH IOI-RATIO) (CPITCH IOI)
                       (CPITCH CPINTFREF) (CPITCH CONTOUR) (CPITCH CPINT))

Selected system NIL, mean IC = NIL

Selected system ((CPINT IOI)), mean IC = 3.770821

Selected system ((CPITCH CPINTFREF) (CPINT IOI)), mean IC = 3.6149604

Selected system ((CPINT CONTOUR) (CPITCH CPINTFREF) (CPINT IOI)), mean IC = 3.6071105
 =======================================================================================
The selected viewpoint system with a mean IC of 3.6071105 is ((CPINT CONTOUR) 
                                                              (CPITCH CPITNFREF)
                                                              (CPINT IOI))
3.6071105
(3.7069716 4.1141763 3.4340029 3.7762835 3.1738904 2.4645383 2.4136221 4.223004
 3.4266312 3.8578565 3.7037613 3.817009 3.6925507 4.0067887 4.1862245 3.6948318
 3.589941 3.064828 3.3741925 4.421102)
((5.3762937 3.8069913 3.4256396 3.7279553 2.1979797)
 (5.406521 3.9328952 1.6147243 4.865456 4.6199756 4.245484)
 (4.6517315 3.4264023 4.291026 2.6270108 2.5568907 3.050957)
 (4.039653 4.013669 3.1277993 4.1607184 3.9867034 3.3291585)
 (3.5482352 4.053865 3.0147352 2.5772405 3.1147695 2.734497)
 (4.095926 3.8725657 3.6051478 0.9961951 1.5107476 0.70664775)
 (3.9636786 3.326812 2.0141377 4.0441613 1.119383 1.729509 0.69767416)
 (4.1886916 4.5414157 5.062776 5.489889 4.037985 2.0172682)
 (3.5929346 4.3974833 2.9522645 4.2939487 3.0597897 2.2633674)
 (4.07 3.6615388 4.108321 5.3484364 3.262607 2.696233)
 (4.4896207 3.144421 4.3190002 3.4161656 1.8944254 4.958934)
 (5.3435025 3.1466641 3.633649 4.72796 2.2332697)
 (3.694705 4.086484 4.024034 4.132382 2.896908 2.798687 4.2146544)
 (4.1652365 3.3973591 2.6912768 4.619747 4.5167165 4.650396)
 (4.002263 5.214774 2.1544046 4.07317 4.1688104 5.979909 3.7102401)
 (4.0527534 4.005324 4.3051944 1.9578742 4.4143214 3.4335225)
 (4.070589 4.2904906 2.135268 3.6722345 4.4667535 2.9043095)
 (4.353565 3.894249 2.6555986 1.9654889 3.3974392 2.1226246)
 (4.002883 2.5358756 3.6717956 4.050692 2.6097157)
 (4.693487 3.7570174 3.8433042 5.2198052 5.3659387 3.8080502 4.2601147))

Conklin & Witten (1995)

To simulate the experiments of Conklin & Witten (1995)

CL-USER> (idyom:conkwit95)

Simulation of the experiments of Conklin & Witten (1995, Table 4).
System 1; Mean Information Content: 2.33 
System 2; Mean Information Content: 2.36 
System 3; Mean Information Content: 2.09 
System 4; Mean Information Content: 2.01 
System 5; Mean Information Content: 2.08 
System 6; Mean Information Content: 1.90 
System 7; Mean Information Content: 1.88 
System 8; Mean Information Content: 1.86 
NIL

Compare with Table 4 in:

Conklin, D. and Witten, I. (1995). Multiple viewpoint systems for music prediction. Journal of New Music Research, 24(1), 51-73.