Skip to content
Back to formatted view

Raw Message

Message-ID: <20120714075758.GA14906@cs.cas.cz>
Date: 2012-07-14T07:57:58Z
From: Petr Savicky
Subject: How to find frequent sequences.
In-Reply-To: <CA+hec4S1n6krPxmGQ1K6Hav=9DJfgWWgmRAkicHjpgF-nkMCkQ@mail.gmail.com>

On Fri, Jul 13, 2012 at 02:38:57PM -0500, Vineet Shukla wrote:
> Hi Petr,
>    Yes, that's really very helpful.
> 
> 
> Petr : Using this interpretation, AB occurs at lines 1,3,4 and not 1,3,5.
> Is this correct?
> Vineet : Yes , thats right sorry for the typo.
> 
> 
> 
> Petr: If some sequence contains several ocurrences of a pattern, for
> example,
> the sequence
>    A, B, A, B
> contains AB twice, then it is counted only once?
> 
> Vineet : what needs to be done if I would like to count it as many times as
> it occurred ?
> remove dont call unique function from "unique(embed(rev(x), lpattern))" ?

Hi.

Yes. Without unique() the matrix embed(rev(x), lpattern) contains all occurences
in one sequence and the final result will be the sum of the numbers of
occurences in all sequences.

Petr.