next up previous contents
Next: Converting SOM classification to Up: Data reorganization Previous: Set-relational operations for classes

Convert a classification into a field

 

cldind Convert cldata into a field
-c <cldata> classified data to be converted
-d <data> original data frame
-fout <field> field to be created

This operation makes it possible to convert a classified data into a data field. The resulting data field contains the index of the class (ranging from 1 to n, where n is the number of classes), to which the record belongs. The conversion is complete only if each data record belongs to only one class. Otherwise each record gets the index of the last class, to which it belongs to.

Example: In this example a SOM classification is converted into a field to be used as training data for another SOM.

# Load training data set
NDA> load opetus
# Train a SOM and create field containing SOM layers
NDA> somtr -d opetus -sout som -cout cldata -l 7
...
NDA> somlayer -s som -fout soml
# Select the 6th layer of TS-SOM into a new cldata
NDA> selcld -c cldata -cout clsel -expr 'soml' = 6;
# Convert classification into a data field
NDA> cldind -c clsel -d opetus -fout opetus.somind



Anssi Lensu
Wed Oct 6 12:57:48 EET DST 1999