next up previous contents
Next: Smoothing data in a Up: The Tree-Structured Self-Organizing Map Previous: Training a TS-SOM

Classifying data by a TS-SOM

 

somcl Classify data by a TS-SOM
-s <som> name of the TS-SOM structure
[-w <wmatrix>] weight matrix, default is to read from <som>_W
-d <data> data to be classified
-cout <cldata> name of the resulting classified data
[-md <missing-data>] a code value to indicate missing data

This operation classifies data records using a TS-SOM. It creates a classified data in which classes correspond to neurons. Each class has indexes which refer the data records belonging to this class. Note that it is possible to use other weights (or fields) to classify data as were used in the training (see section 5.1.1). To do that, you should select these weights to some data frame, and then give this frame to somcl with the flag -w.

Also, missing data values can be noted. In this case, only such fields that do not include missing values are used to compute the distance between a data record and the neurons of the SOM. See also msdbycen in section 4.1.4 for information about how to replace missing values using the values of the prototypes.

Example (ex5.2): First a TS-SOM is trained using a data frame and then the same data is classified with the same TS-SOM. The second example below uses the result of this example, but loaded from a file.

...
NDA> prepro -d boston -dout predata -e -n
NDA> somtr -d predata -sout som1 -l 4
...
NDA> somcl -d predata -s som1 -cout cld1
# Store trained TS-SOM
NDA> save som1 -o som1
...

Example: This example shows a case, in which a TS-SOM has been trained earlier and stored in a file. The TS-SOM and a data frame are loaded from files, and then the SOM classification is performed. The loaded data is preprocessed first, because the TS-SOM was trained using preprocessed data (see the previous example).

NDA> load som1.som               # name of the TS-SOM is tssom 
NDA> load boston.dat             # name of the data is boston
NDA> prepro -d boston -dout preboston
NDA> somcl -d preboston -s som1 -cout cld2
...


next up previous contents
Next: Smoothing data in a Up: The Tree-Structured Self-Organizing Map Previous: Training a TS-SOM

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