next up previous contents
Next: Creating a data field Up: Basic operations for managing Previous: Attaching a data frame

Handling classified data frames

      

addcld Create an empty classified data
-c <cldata> name of the classified data
addcl Add a new class to classified data
-c <cldata> classified data
-cl <class> name of the new class
updcl Update a class by an identifier
-cl <class> name of the class
-id <id> an identifier
cpcld Copy a classified data frame
-c <cldata> source frame
-cout <cldataout> target frame
cpcl Copy a single class
-cl <class> source class
-cout <cldata> target classified data
-clout <classtrg> target class
shftcld Shift indexes in a classified data
-c <cldata> source classified data
[-id <shift-id>] the number to be added to indexes
[-cout <cldata>] target classified data (source is used, if this is omitted)

These commands are meant for handling classified data frames. addcld creates an empty classified data frame. addcl creates a new empty class to a classified data. updcl updates a class with an identifier. The identifier is created to the class, if it does not exist, otherwise the identifier is removed from the class. shftcld adds a constant index to all the indexes in a classified data (or 0 if -id is omitted).

Example (ex2.2): A typical use for these commands is grouping of SOM neurons. The whole grouping is placed into a classified data frame, in which each class corresponds to one group of neurons.

NDA> somtr...
...
NDA> addcld -c groups
NDA> addcl -c groups -cl goodAp
NDA> updcl -cl groups.goodAp -id 14
NDA> updcl -cl groups.goodAp -id 16
NDA> addcl -c groups -cl badAp
NDA> updcl -cl groups.badAp -id 17
# Remove 17 from badAp
NDA> updcl -cl groups.badAp -id 17

Example: Normally, the grouping is not performed manually but with the graphical user interface (GUI). The following command sequence describes, what happens behind the GUI.

The identifiers of the neurons are got from a graphical image by the commands fndpnt and fndreg (see section 7.13.2). This can also be invoked by runevent (see section 7.13.3). Typically the coordinates for these commands are got from a mouse event. First you should run the example `ex7.4' and then apply the following commands:

...
# When a window is opened:
# Create a grouping and a group (if they do not exist)
NDA> addcld -c som1Grp
NDA> addcl -c som1Grp -cl goodAp
...
# A mouse click event causes the following commands to be run:
# For updating a single neuron to current group
NDA> fndpnt grp1 0.3 0.4
# -> neuron id = 8
NDA> updcl -cl som1Grp.goodAp -id 8
...
# A mouse choose_region event causes the following commands:
# For updating a region of neurons to current group
NDA> fndreg grp1 0.1 0.1 0.5 0.1 0.5 0.5 0.1 0.5
# -> neuron ids = 8, 6, 5, 7
NDA> updcl -cl som1Grp.goodAp -id 6
NDA> updcl -cl som1Grp.goodAp -id 5
NDA> updcl -cl som1Grp.goodAp -id 7


next up previous contents
Next: Creating a data field Up: Basic operations for managing Previous: Attaching a data frame

Anssi Lensu
Thu May 17 15:00:44 EET DST 2001