Github user mengxr commented on a diff in the pull request:
https://github.com/apache/spark/pull/7412#discussion_r35735875
--- Diff: mllib/src/main/scala/org/apache/spark/mllib/fpm/PrefixSpan.scala
---
@@ -44,27 +46,43 @@ class PrefixSpan private (
private var maxPatternLength: Int) extends Logging with Serializable {
/**
+ * The maximum number of items allowed in a projected database before
local processing. If a
+ * projected database exceeds this size, another iteration of
distributed PrefixSpan is run.
+ */
+ private val maxLocalProjDBSize: Long = 10000
+
+ /**
* Constructs a default instance with default parameters
* {minSupport: `0.1`, maxPatternLength: `10`}.
*/
def this() = this(0.1, 10)
/**
+ * Get the minimal support (i.e. the frequency of occurrence before a
pattern is considered
+ * frequent).
+ */
+ def getMinSupport(): Double = this.minSupport
+
+ /**
* Sets the minimal support level (default: `0.1`).
*/
def setMinSupport(minSupport: Double): this.type = {
- require(minSupport >= 0 && minSupport <= 1,
- "The minimum support value must be between 0 and 1, including 0 and
1.")
+ require(minSupport >= 0 && minSupport <= 1, "The minimum support value
must be in [0, 1].")
this.minSupport = minSupport
this
}
/**
+ * Gets the maximal pattern length (i.e. the length of the longest
sequential pattern to consider.
+ */
+ def getMaxPatternLength(): Double = this.maxPatternLength
--- End diff --
remove `()`
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]