selseq | Classify data records into sequences |
-d <data> | source data |
-cout <cldata> | target classified data |
-len <lenght> | the length of the sequence |
[-step1 <step1>] | step between time windows, default=1 |
[-step2 <step2>] | step between data records within a time window, default=1 |
This operation creates a classified data frame and collects the indexes of data records to classes. The principle has been described in the figure below. As the figure shows, the operation moves a sliding window through a data frame collecting those data record indexes inside the window to the classes. The parameter <length> defines the length of the window. The parameter <step1> defines how many data records are skipped when the window is moved, whereas the parameter <step2> defines steps between data records. Of cource, then the true length of the time window is: lenght + (length -1 ) * step2.
Example (ex3.6): This example demonstrates one way to process data including a code sequence. For instance, data includes codes 1, 9, 20, 2, 2, 3, 9, .... In the example, these codes are represented as binary variables (uniq and bin operations), and binary data is summarized over sequences (selseq and clsum).
NDA> load seq.dat # Binarize code data NDA> uniq -d seqdata -cout sequniq NDA> bin -d seqdata -c sequniq -dout binseq # Select sequences and summarize them NDA> selseq -d binseq -cout seqcld -len 3 NDA> clsum -d binseq -c seqcld -dout binhst # Basic SOM analysis for the sequence data NDA> prepro -d binhst -dout pre -edev -n NDA> somtr -d pre -sout som1 -l 5 ... NDA> somcl -d pre -s som1 -cout cld NDA> clstat -d binhst -c cld -dout sta -avg -min -max -hits # Create a graph NDA> mkgrp win1 -s som1 NDA> setgdat win1 -d sta NDA> setgcld win1 -c cld NDA> layer win1 -l 4 # Show bars indicating different codes and a trajectory NDA> bar win1 -f sta.code_0_avg -co red NDA> bar win1 -f sta.code_6_avg -co green NDA> bar win1 -f sta.code_8_avg -co blue NDA> bar win1 -f sta.code_10_avg -co yellow NDA> traj win1 -n tr1 -min 100 -max 110 -co black NDA> show win1 -hide