next up previous contents
Next: Picking data records based Up: Data reorganization Previous: Converting sum values into

Binarizing a classification to data fields

 

bin Code classes in a classified data into binary variables
-c <cldata> classified data for identifying records
-d <data> source data
-dout <trgdata> result data
[-pre <prefix>] prefix for fields to be created

This command encodes a given classified data related to a source data. For each class a new binary (integer) field is created. Then, the index of each data record is matched to the indexes in the class. If the index is found, the value of the binary variable corresponding to that class will be `1', otherwise `0'. Target data can be the same as source data. In that case, new fields are created to the existing data frame. Otherwise, a new data frame is created. If <prefix> is specified, created fields are named as prefix_n, otherwise the names of the classes of <cldata> are used.

Example (ex3.3): This example shows necessary commands and phases needed to create a binary coding for a grouping of data.

...
NDA> somtr -d boston -sout som1 -l 4
...
NDA> somcl -d boston -s som1 -cout cld1
NDA> mkgrp grp1 -s som1
...
# Interactive selection of groups
NDA> mergecld -c1 som1Grp -c2 cld1 -cout classif
# Create a binary data according to selected groups
NDA> bin -d boston -c classif -dout data

figure1258


next up previous contents
Next: Picking data records based Up: Data reorganization Previous: Converting sum values into

Anssi Lensu
Tue Jul 23 11:58:18 EET DST 2002