Hi, I am looking for an algorithm (better if it is implemented in R) which can do the following: from the following list: a,b,c,d a,b,c b,c a,b,c,d,e to calculate a,b,c,d: 2 a,b,c: 3 a,b: 3 a,c: 3 b,c: 4 b,c,d:2 here, the order is not important. Thanks. -- Weiwei Shi, Ph.D Research Scientist GeneGO, Inc. "Did you always know?" "No, I did not. But I believed..." ---Matrix III
jim holtman
2007-Oct-18 22:16 UTC
[R] alignment algorithm or pattern frequency calculation
It would be helpful if you explained what the numbers mean. On 10/18/07, Weiwei Shi <helprhelp at gmail.com> wrote:> Hi, > > I am looking for an algorithm (better if it is implemented in R) which > can do the following: > > from the following list: > a,b,c,d > a,b,c > b,c > a,b,c,d,e > > to calculate > a,b,c,d: 2 > a,b,c: 3 > a,b: 3 > a,c: 3 > b,c: 4 > b,c,d:2 > > here, the order is not important. > > Thanks. > > -- > Weiwei Shi, Ph.D > Research Scientist > GeneGO, Inc. > > "Did you always know?" > "No, I did not. But I believed..." > ---Matrix III > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >-- Jim Holtman Cincinnati, OH +1 513 646 9390 What is the problem you are trying to solve?
for example, a,b: 3 which means a and b appear together 3 times in my input list. On 10/18/07, jim holtman <jholtman at gmail.com> wrote:> It would be helpful if you explained what the numbers mean. > > On 10/18/07, Weiwei Shi <helprhelp at gmail.com> wrote: > > Hi, > > > > I am looking for an algorithm (better if it is implemented in R) which > > can do the following: > > > > from the following list: > > a,b,c,d > > a,b,c > > b,c > > a,b,c,d,e > > > > to calculate > > a,b,c,d: 2 > > a,b,c: 3 > > a,b: 3 > > a,c: 3 > > b,c: 4 > > b,c,d:2 > > > > here, the order is not important. > > > > Thanks. > > > > -- > > Weiwei Shi, Ph.D > > Research Scientist > > GeneGO, Inc. > > > > "Did you always know?" > > "No, I did not. But I believed..." > > ---Matrix III > > > > ______________________________________________ > > R-help at r-project.org mailing list > > https://stat.ethz.ch/mailman/listinfo/r-help > > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > > and provide commented, minimal, self-contained, reproducible code. > > > > > -- > Jim Holtman > Cincinnati, OH > +1 513 646 9390 > > What is the problem you are trying to solve? >-- Weiwei Shi, Ph.D Research Scientist GeneGO, Inc. "Did you always know?" "No, I did not. But I believed..." ---Matrix III
the naive way is to exhausive search, but too bad for large and real situation. On 10/18/07, Weiwei Shi <helprhelp at gmail.com> wrote:> for example, > > a,b: 3 which means a and b appear together 3 times in my input list. > > On 10/18/07, jim holtman <jholtman at gmail.com> wrote: > > It would be helpful if you explained what the numbers mean. > > > > On 10/18/07, Weiwei Shi <helprhelp at gmail.com> wrote: > > > Hi, > > > > > > I am looking for an algorithm (better if it is implemented in R) which > > > can do the following: > > > > > > from the following list: > > > a,b,c,d > > > a,b,c > > > b,c > > > a,b,c,d,e > > > > > > to calculate > > > a,b,c,d: 2 > > > a,b,c: 3 > > > a,b: 3 > > > a,c: 3 > > > b,c: 4 > > > b,c,d:2 > > > > > > here, the order is not important. > > > > > > Thanks. > > > > > > -- > > > Weiwei Shi, Ph.D > > > Research Scientist > > > GeneGO, Inc. > > > > > > "Did you always know?" > > > "No, I did not. But I believed..." > > > ---Matrix III > > > > > > ______________________________________________ > > > R-help at r-project.org mailing list > > > https://stat.ethz.ch/mailman/listinfo/r-help > > > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > > > and provide commented, minimal, self-contained, reproducible code. > > > > > > > > > -- > > Jim Holtman > > Cincinnati, OH > > +1 513 646 9390 > > > > What is the problem you are trying to solve? > > > > > -- > Weiwei Shi, Ph.D > Research Scientist > GeneGO, Inc. > > "Did you always know?" > "No, I did not. But I believed..." > ---Matrix III >-- Weiwei Shi, Ph.D Research Scientist GeneGO, Inc. "Did you always know?" "No, I did not. But I believed..." ---Matrix III
Gad Abraham
2007-Oct-19 05:31 UTC
[R] alignment algorithm or pattern frequency calculation
Weiwei Shi wrote:> Hi, > > I am looking for an algorithm (better if it is implemented in R) which > can do the following: > > from the following list: > a,b,c,d > a,b,c > b,c > a,b,c,d,e > > to calculate > a,b,c,d: 2 > a,b,c: 3 > a,b: 3 > a,c: 3 > b,c: 4 > b,c,d:2 > > here, the order is not important. > > Thanks. >In data mining this is called association rule mining, see http://en.wikipedia.org/wiki/Association_rule_learning. If your dataset is large, you may want to use more sophisticated algorithms; have a look at http://www.adrem.ua.ac.be/~goethals/software/ Cheers, Gad -- Gad Abraham Department of Mathematics and Statistics The University of Melbourne Parkville 3010, Victoria, Australia email: g.abraham at ms.unimelb.edu.au web: http://www.ms.unimelb.edu.au/~gabraham
frequent itemset, yeah.. I did not use that for a while.... thanks. On 10/19/07, Gad Abraham <g.abraham at ms.unimelb.edu.au> wrote:> Weiwei Shi wrote: > > Hi, > > > > I am looking for an algorithm (better if it is implemented in R) which > > can do the following: > > > > from the following list: > > a,b,c,d > > a,b,c > > b,c > > a,b,c,d,e > > > > to calculate > > a,b,c,d: 2 > > a,b,c: 3 > > a,b: 3 > > a,c: 3 > > b,c: 4 > > b,c,d:2 > > > > here, the order is not important. > > > > Thanks. > > > > In data mining this is called association rule mining, see > http://en.wikipedia.org/wiki/Association_rule_learning. > > If your dataset is large, you may want to use more sophisticated > algorithms; have a look at > http://www.adrem.ua.ac.be/~goethals/software/ > > > Cheers, > Gad > > -- > Gad Abraham > Department of Mathematics and Statistics > The University of Melbourne > Parkville 3010, Victoria, Australia > email: g.abraham at ms.unimelb.edu.au > web: http://www.ms.unimelb.edu.au/~gabraham >-- Weiwei Shi, Ph.D Research Scientist GeneGO, Inc. "Did you always know?" "No, I did not. But I believed..." ---Matrix III