Click here to Skip to main content
15,885,032 members
Home / Discussions / Algorithms
   

Algorithms

 
GeneralRe: Algorithm to find a given number is prime or not. Pin
Member 110631236-Sep-14 6:33
Member 110631236-Sep-14 6:33 
GeneralRe: Algorithm to find a given number is prime or not. Pin
harold aptroot6-Sep-14 7:22
harold aptroot6-Sep-14 7:22 
GeneralRe: Algorithm to find a given number is prime or not. Pin
Member 110631236-Sep-14 7:53
Member 110631236-Sep-14 7:53 
GeneralRe: Algorithm to find a given number is prime or not. Pin
Member 110631237-Sep-14 6:23
Member 110631237-Sep-14 6:23 
GeneralRe: Algorithm to find a given number is prime or not. Pin
Member 110631237-Sep-14 6:23
Member 110631237-Sep-14 6:23 
AnswerRe: Algorithm to find a given number is prime or not. Pin
Richard MacCutchan6-Sep-14 5:06
mveRichard MacCutchan6-Sep-14 5:06 
AnswerRe: Algorithm to find a given number is prime or not. Pin
PIEBALDconsult14-Nov-14 3:37
mvePIEBALDconsult14-Nov-14 3:37 
QuestionHow to describe method: SQL for frequent pattern discovery Pin
pseudogrammaton4-Sep-14 18:01
pseudogrammaton4-Sep-14 18:01 
I've prototyped a way to do pattern discovery using SQL, but I still have a poor understanding of where this method fits in the data mining vernacular.

Being set-based, I'm not building a tree, although a functional tree does arise in the result set.

The steps:

1) Build a "look up" table, by doing a cross join, yielding a combinatorial "dictionary" (a rainbow table) of n-gram "words."

2) Get COUNT(*) > n , using SQL GROUP BY, matched against a large table of items

3) Further look for equivalent longer self-matches within the result set.

My seed table is 177 items, allowed to cross-join itself 3x, for a final table 2.8 million 3-gram words (takes about 35 seconds to build this table in Postgres).

The actual itemset table is 10 million rows in series (serially numbered), although the actual number of itemsets might be considered smaller.

I've recorded 35** seconds on the join between the two original tables, yielding all the simple repeating 3-grams meeting group by's count(*) > x (that's the dictionary joined to the itemsets.

That's the Q&D discovery step, and then subsequent steps simply apply a self-join for longer-chained repeating series. These have been pretty quick, in the 50 millisecond range.

My questions are:

1) What's the best way to describe this algorithm? Frequent pattern? Motif?

2) It's a simple enough method, but is it fast enough for general use? I.e. other data mining apps where performance requirements are different from my own?

3) I've wondered if SQL could be convinced to pattern-match like an LCS dynamic programming algorithm, by matching across gaps in the sequence, with maybe a lookup table of allowable variances & distance between matching values?


**Right now I'm seeing 50 seconds after the buffers load, but I reinstalled Postgres & my postgres.conf file apparently is all defaults now (the postgres process back to only 16 mb getting buffered, so it's suffering more I/O to the SSD drive).

Thanks in advance,

-- Lee

-- modified 5-Sep-14 0:17am.
AnswerRe: How to describe method: SQL for frequent pattern discovery Pin
Bernhard Hiller4-Sep-14 20:52
Bernhard Hiller4-Sep-14 20:52 
GeneralRe: How to describe method: SQL for frequent pattern discovery Pin
pseudogrammaton5-Sep-14 2:55
pseudogrammaton5-Sep-14 2:55 
QuestionBoundless Binary Search Pin
Igor van den Hoven27-Aug-14 10:24
Igor van den Hoven27-Aug-14 10:24 
GeneralRe: Boundless Binary Search Pin
harold aptroot4-Sep-14 21:28
harold aptroot4-Sep-14 21:28 
GeneralRe: Boundless Binary Search Pin
Igor van den Hoven6-Sep-14 10:04
Igor van den Hoven6-Sep-14 10:04 
GeneralRe: Boundless Binary Search Pin
harold aptroot6-Sep-14 11:10
harold aptroot6-Sep-14 11:10 
GeneralRe: Boundless Binary Search Pin
Igor van den Hoven6-Sep-14 12:32
Igor van den Hoven6-Sep-14 12:32 
GeneralRe: Boundless Binary Search Pin
harold aptroot6-Sep-14 12:52
harold aptroot6-Sep-14 12:52 
GeneralRe: Boundless Binary Search Pin
Igor van den Hoven6-Sep-14 15:07
Igor van den Hoven6-Sep-14 15:07 
GeneralRe: Boundless Binary Search Pin
harold aptroot6-Sep-14 20:25
harold aptroot6-Sep-14 20:25 
AnswerRe: Boundless Binary Search Pin
Alan Balkany5-Nov-15 0:21
Alan Balkany5-Nov-15 0:21 
QuestionSurface calculation (sphere) - projection effect. [SOLVED ?] Pin
V.3-Aug-14 22:31
professionalV.3-Aug-14 22:31 
AnswerRe: Surface calculation (sphere) - projection effect. [SOLVED ?] Pin
Supreme Master27-Jul-15 9:24
Supreme Master27-Jul-15 9:24 
QuestionLock free algorithms Pin
Joe Woodbury1-Jul-14 8:15
professionalJoe Woodbury1-Jul-14 8:15 
AnswerRe: Lock free algorithms Pin
Michael Gazonda31-Jul-14 18:51
professionalMichael Gazonda31-Jul-14 18:51 
GeneralRe: Lock free algorithms Pin
Joe Woodbury31-Jul-14 19:21
professionalJoe Woodbury31-Jul-14 19:21 
GeneralRe: Lock free algorithms Pin
Michael Gazonda31-Jul-14 19:25
professionalMichael Gazonda31-Jul-14 19:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.