序列符号的定义...(A),(A> B)和(A)-(A> B) [英] Definition of sequence notation...(A), (A>B), and (A) - (A>B)

查看:125
本文介绍了序列符号的定义...(A),(A> B)和(A)-(A> B)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

希望很快....

关于seqefsub()操作的输出,请指出输出符号的定义.

Regarding the output from seqefsub() operations, please point me to a definition of the output notation.

更具体地说,括号是例如

To be more specific, the parentheses in e.g.

  • (A)是什么意思;
  • (A>B)中的大于号表示什么;
  • (A)-(A>B)中的连字符表示什么.
  • (A) means what;
  • the greater than sign in (A>B) means what;
  • and the hyphen in (A)-(A>B) means what.

Section 10优秀的用户指南有示例,但是我可能在某处错过了明确的定义语句.

Section 10 of the excellent User Guide has examples, but I may have missed an unambiguous definition statement somewhere.

引用本指南Section 10.2中的示例,(Parent)-(Parent>Left)(Parent>Left)之间的概念区别是什么?

To quote the example in Section 10.2 of the guide, what is the conceptual difference between (Parent)-(Parent>Left) and just (Parent>Left)?

谢谢

戴夫

在吉尔伯特发表评论后进行更新....

在试图澄清用户指南第106页上可能遗漏的内容时,我认为我正在寻找的解释(或至少是确认书)是遵循以下框架的内容.对可能的笨拙词句表示歉意.

In attempting to clarify what I perhaps missed on page 106 of the user guide, I think the explanation - or at least confirmation - that I was looking for was something along the lines of the following framework. Apologies for the possible clumsy wordiness.

这里的上下文是当seqefsub()结果出现在控制台中时....

The context here is when seqefsub() results appear in the console....

(A)这是状态A出现为第一个状态(而不是任何后续状态)的次数.也就是说-它计算A在第一列中出现的次数. 我在这里假设我没有错过另一个配置选项,该选项计算此类型的第一个和所有后续状态.如果有的话,让我知道.

(A) this is the number of times state A appears as the first state, and not as any subsequent state. That is - it counts the number of times A appears in the first column. I assume here that I haven't missed another configuration option that counts first and all subsequent states of this type. If there is please let me know.

(A>B)这是事件从A到B发生(即状态改变)的次数.此计数表示序列中任意位置的事件. 我建议这与上面的状态计数略有不同,假设我没有无意中歪曲了事实.我注意到可以将约束设置为输出单个或多个事件.

(A>B) this is the number of occurrences of an event (i.e. a change of state) from A to B. This count refers to events anywhere in the sequence. I am suggesting this is slightly different therefore to the state count above, assuming I haven't inadvertently misrepresented things. I note that constraints can be set to output single or multiple occurences.

(A)-(A>B)计算状态A作为第一种状态发生的次数,以及A到B事件在序列中任何位置发生的次数.这包括紧接在第一个状态之后的A到B事件,并且可以包括在第一个状态A和事件A到B之间的其他状态.

(A)-(A>B) this counts the number of times state A occurs as a first state, and where the A to B event occurs anywhere in the sequence. This includes A to B events immediately after the first state, and can include intervening other states between the first state A and the event A to B.

我希望这会有所帮助,也希望这是一组正确的陈述(基于比我最初的问题晚的调查).

I hope this helps, and I hope this is a correct set of statements (based on investigations later than my original question).

吉尔伯特发表评论后要求第二次更新的示例....

对于真实数据集...(其中J和我代替A和B)

For the real data set ... (where J and I take the place of A and B)

> data   
   V1 V2 V3 V4 V5 V6 V7 V8 V9 V10 V11
1   I  J  J  I  J  J  I  K  J   D   J
2   G  K  R  I  J  D  J  R  I   J   N
3   K  K  I  R  M  M  K  R  J   K   I
4   R  R  B  R  I  G  R  G  R   G   G
5   J  J  J  J  J  J  J  T  Z   J   Z
6   R  K  R  K  M  R  R  J  J   J   R
7   J  I  I  I  I  I  I  I  I   I   I
8   J  J  J  J  J  J  J  J  J   J   R
9   J  R  J  R  J  R  J  J  I   S   R
10  J  J  J  J  J  I  J  J  J   J   J
11  G  J  J  J  J  I  I  I  R   J   J
12  I  I  D  M  D  I  I  D  I   I   D
13  R  M  R  R  J  J  J  J  J   J   J

然后

> dataseq <- seqdef(data)

> dataseqe <- seqecreate(dataseq)

> datasubseq <- seqefsub(dataseqe, pMinSupport = 0.05)

> datasubseq[1:10]

给予

    Subsequence   Support Count
1          (J) 0.3846154     5
2        (J>I) 0.3846154     5
3        (R>J) 0.3846154     5
4        (J>R) 0.3076923     4
5        (I>J) 0.2307692     3
6    (J)-(J>I) 0.2307692     3
7        (K>R) 0.2307692     3
8          (R) 0.2307692     3
9        (D>J) 0.1538462     2
10         (G) 0.1538462     2

所以....

1)5个J状态的计数(J)仅适用于第一列/出现,而不适用于任何后续的J状态.共有57个J状态.

1) the count of 5 J-states (J) applies only to the first column/occurrence, and not to any subsequent J-states. There is a total of 57 J-states.

2)无论何时发生,从5个J状态到I状态变化事件的计数(J>I)都是总数(对于此约束选项).

2) the count of 5 J-state to I-state change events (J>I) is a total count (for this constraint option), whenever they occur.

3)3个J状态后跟J状态到I状态子序列的计数(J)-(J>I)是第7行(第1列和第2列),第9行(第1列,第1行)中事件的计数和第8列和第9列),最后是第10行(第1列,第5列和第6列);最后两种情况在(J)(J>I)之间具有中间状态和/或事件.

3) the count of 3 J-state followed by J-state-to-I-state subsequences (J)-(J>I) are the counts of the events in row 7 (cols 1 & 2), row 9 (col 1, and cols 8 & 9 ) and lastly row 10 (col 1, and cols 5 & 6); the last two cases having intervening states and/or events between the (J) and the (J>I).

再回到问题-这个正确和预期的行为以及正确的解释.如果是这样,为什么状态计数与事件/状态更改计数在不同的基础上进行?

Back then to the question - is this correct and expected behaviour, and a correct interpretation. If so, why are state counts done on a different basis to event/state change counts?

推荐答案

在您的示例中,事件序列是从状态序列对象dataseq派生的,其中 seqecreate(dataseq).由于不提供tevent参数,因此使用默认的tevent = "transition"(请参见help(seqecreate)).使用此值,事件定义为从状态A到状态B的过渡,并标记为A>B.另外,标记为A的特定事件与序列开始关联,以指示序列开始处的状态.因此,尽管使用了相同的符号,但事件序列中的A是一个事件---开始事件---不应与状态状态中的A混淆.

In your example the event sequences are derived from the state sequence object dataseq with seqecreate(dataseq). Since you don't provide the tevent argument, the default tevent = "transition" is used (see help(seqecreate)). With this value, the events are defined as the transitions from a state A to a state B and are labeled A>B. In addition, a specific event labeled A is associated to the sequence start to indicate the state at the beginning of the sequence. So, although the same symbol is used, A in event sequences is an event---the start event---and should not be confused with the A in state sequences where it is a state.

以上内容特定于tevent="transition"选项.例如,对于tevent="state",事件将是咒语的开始,并标记为A,以指示状态为A的咒语的开始.在这种情况下,事件A可能发生在序列中的任何位置,而不仅是在开始时.

The above is specific to the tevent="transition" option. For instance, with tevent="state", the events would be the start of the spells and labeled as A to indicate the start of a spell in state A. In that case the event A could occur anywhere in the sequence, not only at the start.

现在是括号.它们指示过渡(或事务),过渡被定义为引发状态变化的同时发生的事件的集合.例如:

Now about the parentheses. They indicate the transitions (or transactions), a transition being defined as the set of simultaneous events that provoke the state change. For example:

(a,b)表示两个事件ab在同一时间点

(a,b) indicates that two events a and b occur at the same time point,

(A>C)表示我们在该时间点只有一个事件A>C.

(A>C) means that we have the single event A>C at the time point.

(a)-(b)表示长度为2的序列,其中事件a在事件b之前.

(a)-(b) denotes a sequence of length 2 where event a precedes event b.

让我们考虑以下示例

(seq <- seqdef('HHHAABBBAAGGG', stsep=''))
##     Sequence
## [1] H-H-H-A-A-B-B-B-A-A-G-G-G

seqecreate(seq, tevent='state')
## [1] (H)-3-(A)-2-(B)-3-(A)-2-(G)-3

seqecreate(seq, tevent='transition')
## [1] (H)-3-(H>A)-2-(A>B)-3-(B>A)-2-(A>G)-3

状态序列具有5个咒语,状态A中2个,状态HBG中的每个状态1个.现在存在将这种状态序列转换为事件序列的不同可能性. tevent='state'tevent='transition'只是众多可能性中的两种.

The state sequence has 5 spells, 2 in state A and 1 in each of the states H, B, and G. Now there are different possibilities to convert this state sequence into an event sequence. The tevent='state'and tevent='transition' are just two possibilities out of many.

使用tevent='state',我们得到一个事件序列,其中事件(A)发生了两次,因为我们在状态A中有两个咒语.这两个咒语中的每个咒语都是由同一事件(A)启动的,该事件不解释先前的状态.

Using tevent='state' we get an event sequence where the event (A) occurs twice because we have two spells in state A. Each of these two spells is initiated by the same event (A) that does not account for the preceding state.

查看通过tevent='transition'选项获得的事件序列,我们发现A中的咒语是由两个不同的事件(H>A)(B>A)引发的,它们解释了先前的状态.

Looking at the event sequence obtained with the tevent='transition' option, we observe that the spells in A are here initiated by two different events (H>A) and (B>A) that account for the preceding state.

第一个事件序列具有两个子序列(H)-(A),它们分别对应于第二个事件序列中的子序列(H)-(H>A)(H)-(B>A).

The first event sequence has two subsequences (H)-(A), which correspond to the subsequences (H)-(H>A) and (H)-(B>A) in the second event sequence.

这篇关于序列符号的定义...(A),(A> B)和(A)-(A> B)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆