Resampling » History » Version 1

Version 1/3 - Next » - Current version
Marcus Pearce, 2013-07-15 03:29 PM


Resampling

These are some low-level functions in the resampling package, which are called by the idyom:idyom function. You shouldn't need to use them unless you are developing the code.

resampling:idyom-resample

idyom:idyom uses resampling:idyom-resample to compute the note-by-note IC values, and can be used to obtain these a list. The function takes a subset of the top-level arguments (see above):
  • Required: dataset-id, target-viewpoints, source-viewpoints (no viewpoint selection)
  • Model: models, ltmo, stmo
  • Training: pretraining-ids, k, resampling-indices

resampling:output-information-content

Takes the output of resampling:idyom-resample and returns the average information content. It takes the following arguments:

  • predictions: the output of resampling:idyom-resample
  • detail: an integer which determines how the information content is averaged (these are returned as multiple values):
    • 1: averaged over the entire dataset
    • 2: and also averaged over each composition
    • 3: and also for each event in each composition

resampling:format-information-content

resampling:format-information-content takes the output of resampling:idyom-resample and writes it to file. It takes the following arguments:
  • predictions: the output of resampling:idyom-resample
  • file: a string denoting a file
  • dataset-id: an integer reflecting the dataset-id
  • detail: an integer which determines how the information content is averaged (these are returned as multiple values):
    • 1: averaged over the entire dataset
    • 2: and also averaged over each composition
    • 3: and also for each event in each composition