transMap: Summarizes the type and location of transitions between...

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Summarizes the type and location of transitions between discrete states in an integer vector

Usage

1
transMap(y, y.unique)

Arguments

y

The integer vector whose state transitions will be identified

y.unique

An integer vector containing the unique values of y

Details

The algorithm applies a discrete, 1-1 map, which we'll call m, to the vector y such that the first differences of m(y) uniquely identify the transitions between all the possible values of y. It creates the map, calculates the first differences of m(y), and produces a set of transition labels that indicate which value of m(Y) corresponds to each of the possible transitions among the unique states of y.

Value

A list with the following components: (also see example below)

diffMap

The first differences of m(y) which identify the position and type of state transition in y

from

The 'from' state labels

to

The 'to' state labels

transValue

The value that diffMap will take when y transitions from the state label in from to the corresponding state label in to

Author(s)

Landon Sego

See Also

This function is called in discFeatures

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
transMap(c(1,1,1,2,2,1,1,3,3,2,2), 1:3)

# These are the mapped values which signal when
# a transition took place from one state to another
# and they uniquely identify which type of transistion
# it was.  Their values can be decoded using 'transValue'
# below.  A value of 0 indicates that no transition occured
# at that index.
# $diffMap
#  [1]  0  0  0 -1  0  1  0 -3  0  2  0

# The 'from' state labels
# $from
# [1] 1 1 2 2 3 3

# The 'to' state labels
# $to
# [1] 2 3 1 3 1 2

# The transistion value key.  e.g., -1 corresponds to a
# transition from state 1 to state 2.  -3 corresponds
# to a transition from state 1 to state 3.  etc.
# $transValue
# [1] -1 -3  1 -2  3  2

pnnl/qFeature documentation built on May 25, 2019, 10:22 a.m.