Class: PrefixSpan

eclairjs/mllib/fpm.PrefixSpan

Constructs a default instance with default parameters {minSupport: `0.1`, maxPatternLength: `10`, maxLocalProjDBSize: `32000000L`}.

Constructor

new PrefixSpan()

:: Experimental :: A parallel PrefixSpan algorithm to mine frequent sequential patterns. The PrefixSpan algorithm is described in J. Pei, et al., PrefixSpan: Mining Sequential Patterns Efficiently by Prefix-Projected Pattern Growth ([[http://doi.org/10.1109/ICDE.2001.914830]]).
Source:
See:
  • [[https://en.wikipedia.org/wiki/Sequential_Pattern_Mining Sequential Pattern Mining (Wikipedia)]]

Methods

getMaxLocalProjDBSize() → {Promise.<number>}

Gets the maximum number of items allowed in a projected database before local processing.
Source:
Returns:
Type
Promise.<number>

getMaxPatternLength() → {Promise.<number>}

Gets the maximal pattern length (i.e. the length of the longest sequential pattern to consider.
Source:
Returns:
Type
Promise.<number>

getMinSupport() → {Promise.<number>}

Get the minimal support (i.e. the frequency of occurrence before a pattern is considered frequent).
Source:
Returns:
Type
Promise.<number>

run(data) → {module:eclairjs/mllib/fpm.PrefixSpanModel}

Finds the complete set of frequent sequential patterns in the input sequences of itemsets.
Parameters:
Name Type Description
data module:eclairjs/rdd.RDD sequences of itemsets.
Source:
Returns:
a [[PrefixSpanModel]] that contains the frequent patterns
Type
module:eclairjs/mllib/fpm.PrefixSpanModel

setMaxLocalProjDBSize(maxLocalProjDBSize)

Sets the maximum number of items (including delimiters used in the internal storage format) allowed in a projected database before local processing (default: `32000000L`).
Parameters:
Name Type Description
maxLocalProjDBSize number
Source:
Returns:

setMaxPatternLength(maxPatternLength)

Sets maximal pattern length (default: `10`).
Parameters:
Name Type Description
maxPatternLength number
Source:
Returns:

setMinSupport(minSupport) → {module:eclairjs/mllib/fpm.PrefixSpan}

Sets the minimal support level (default: `0.1`).
Parameters:
Name Type Description
minSupport number
Source:
Returns:
Type
module:eclairjs/mllib/fpm.PrefixSpan