next up previous contents
Next: Overlapping sequential data sets Up: Data reorganization Previous: Classifying data records to

Concatenating sequences

 

concseq Concatenate data into sequences
-d <data> source data
-dout <dataout> target data
-len <lenght> the length of the sequence
[-c <cldata>] classified data for data record order
[-step1 <step1>] step between time windows, default=1
[-step2 <step2>] step between data records within a time window, default=1
[-empty] should partially empty sequences be created

This operation creates a new data frame, into which it concates data records from the given frame. The operation slides a window over the source data and concates data records falling within the window. If <cldata> has been defined, sequences are created according to the order provided by the classes. If -empty is not specified, all sequences for classes smaller than <lenght> are discarded.

For instance, if source data includes records tex2html_wrap_inline7701 , tex2html_wrap_inline7703 , tex2html_wrap_inline7705 , tex2html_wrap_inline7707 , and so on. If parameter <length> is 2 and <step1> is 1 (default), then target data will contain data records tex2html_wrap_inline7713 , tex2html_wrap_inline7715 , and so on. Here the indexes refer to the data records of source data. If parameter <step1> is specified, then the procedure skips over as many data records as defined, while moving the window. Parameter <step2> specifies the step between data records within the time window. See also the figure below and selseq (section 3.17).

The resulting data fields are named according to the names in source data with indexed extensions. The indexes are created to indicate the position inside the window. For instance, the field x would lead to new fields called x_0, x_1, x_2 and so on.

figure1313

Example (ex3.7): The following example demonstrates the use of concseq. The length of the window is in this case four.

NDA> load gauss3.dat
# Collecting records
NDA> concseq -d gauss -dout gauss2 -len 4
# Normal SOM processing
NDA> prepro -d gauss2 -dout pre -edev -n
NDA> somtr -d pre -sout som1 -l 5
...
NDA> somcl -d pre -s som1 -cout cld
NDA> clstat -d gauss2 -c cld -dout sta -all
NDA> mkgrp win1 -s som1
NDA> setgdat win1 -d sta
NDA> setgcld win1 -c cld
NDA> show win1 -hide
# Visualization through line diagrams
NDA> ldgr win1 -n x -co red
NDA> ldgrc win1 -n x -inx 0 -f sta.x_0_avg -sca som2
NDA> ldgrc win1 -n x -inx 1 -f sta.x_1_avg -sca som2
NDA> ldgrc win1 -n x -inx 2 -f sta.x_2_avg -sca som2
NDA> ldgrc win1 -n x -inx 3 -f sta.x_3_avg -sca som2
NDA> ldgr win1 -n y -co blue
NDA> ldgrc win1 -n y -inx 0 -f sta.y_0_avg -sca som2
NDA> ldgrc win1 -n y -inx 1 -f sta.y_1_avg -sca som2
NDA> ldgrc win1 -n y -inx 2 -f sta.y_2_avg -sca som2
NDA> ldgrc win1 -n y -inx 3 -f sta.y_3_avg -sca som2
NDA> dis win1 ldgrlab
NDA> layer win1 -l 3
NDA> draw /win1

figure1319


next up previous contents
Next: Overlapping sequential data sets Up: Data reorganization Previous: Classifying data records to

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