saveExamples - writes an example set to an example file

USAGE

    saveExamples <example-set> <file-name> [-binary | -append]

DESCRIPTION

This writes an example file in either text or binary format. If the file name ends in .gz, .bz, .bz2, or .Z it will automatically be compressed. The -binary flag results in the file being written in binary format. Text is the default.

This command is useful for converting text example files to standard text format or to binary format or for producing combined files after multiple sets have been appended. Only the stored examples will be written to the file, so if the example set is reading from a pipe, the pipe is ignored.

Binary example files will be much quicker to load with loadExamples because little parsing is required. They will also tend to take up less space. However, if the inputs and targets have little precision (like 0 and 1 values), a compressed text example file may be smaller than a compressed binary file.

It is suggested that example files be given the extension .ex and binary example files the extension .bex, but this is not done automatically.

If the -append flag is used, the examples will be appended to the file. This only works when writing text files. When appending to a file, the example set header information will not be written, only the examples themselves. Appending is useful for combining example sets, or perhaps for constructing them one example at a time.

EXAMPLES

To save the set "my set" as the compressed binary file Examples/mySet.bex.gz:

    lens> saveExamples "my set" Examples/mySet.bex.gz -b

SEE ALSO

loadExamples, moveExamples


Last modified: Wed Nov 15 11:13:42 EST 2000