The Complete SPRLIB & ANNLIB

ioset_to_labelset

- convert an IOSET to a LABELSET

SYNOPSIS

DATASET *ioset_to_labelset (ioset)

ARGUMENTS

DATASET *ioset A pointer to the DATASET structure to be converted.

RETURNS

The set ioset, converted to a LABELSET (see DATASET-flags); or NULL if an error occured.

FUNCTION

A new dataset is created using malloc_dataset and the contents of ioset are copied into it, including all descriptions. The SetId field is increased by 1, and to the SetText the string "++ REMADE FROM AN IOSET ++" is added. Also, the CreationDate is set using the time_stamp routine and SetFlag is set to LABELSET. Finally, all SAMPLE structures are copied (using malloc_sample). An output vector is constructed assuming place coding - each output vector is replaced with an output label containing the index of the maximum element in the output vector. This index is found using the vector_index_max function. If the set's NumOutputs was 1, the NumOutputs of the new set will be set to 2, i.e. the dataset is believed to have two classes, represented by an output value smaller than 0.5 and larger than 0.5, respectively.

NOTE

The original dataset (ioset) is not freed or changed.

SEE ALSO

labelset_to_ioset

This document was generated using api2html on Thu Mar 5 09:00:00 MET DST 1998