File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
mllib/src/main/scala/org/apache/spark/mllib/fpm Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,12 @@ class PrefixSpan private (
53
53
*/
54
54
def this () = this (0.1 , 10 )
55
55
56
+ /**
57
+ * Get the minimal support (i.e. the frequency of occurrence before a pattern is considered
58
+ * frequent).
59
+ */
60
+ def getMinSupport (): Double = this .minSupport
61
+
56
62
/**
57
63
* Sets the minimal support level (default: `0.1`).
58
64
*/
@@ -63,10 +69,16 @@ class PrefixSpan private (
63
69
this
64
70
}
65
71
72
+ /**
73
+ * Gets the maximal pattern length (i.e. the length of the longest sequential pattern to consider.
74
+ */
75
+ def getMaxPatternLength (): Double = this .maxPatternLength
76
+
66
77
/**
67
78
* Sets maximal pattern length (default: `10`).
68
79
*/
69
80
def setMaxPatternLength (maxPatternLength : Int ): this .type = {
81
+ // TODO: support unbounded pattern length when maxPatternLength = 0
70
82
require(maxPatternLength >= 1 ,
71
83
" The maximum pattern length value must be greater than 0." )
72
84
this .maxPatternLength = maxPatternLength
You can’t perform that action at this time.
0 commit comments