PrefixSpanModel¶
-
class
pyspark.mllib.fpm.
PrefixSpanModel
(java_model)[source]¶ Model fitted by PrefixSpan
New in version 1.6.0.
Examples
>>> data = [ ... [["a", "b"], ["c"]], ... [["a"], ["c", "b"], ["a", "b"]], ... [["a", "b"], ["e"]], ... [["f"]]] >>> rdd = sc.parallelize(data, 2) >>> model = PrefixSpan.train(rdd) >>> sorted(model.freqSequences().collect()) [FreqSequence(sequence=[['a']], freq=3), FreqSequence(sequence=[['a'], ['a']], freq=1), ...
Methods
call
(name, *a)Call method of java_model
Gets frequent sequences
Methods Documentation
-
call
(name, *a)¶ Call method of java_model
-