-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-8998][MLlib] Collect enough frequent prefixes before local processing in PrefixSpan (new) #7412
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
+155
−69
Closed
[SPARK-8998][MLlib] Collect enough frequent prefixes before local processing in PrefixSpan (new) #7412
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
91fd7e6
Add new algorithm PrefixSpan and test file.
zhangjiajin 575995f
Modified the code according to the review comments.
zhangjiajin 951fd42
Delete Prefixspan.scala
zhangjiajin a2eb14c
Delete PrefixspanSuite.scala
zhangjiajin 89bc368
Fixed a Scala style error.
zhangjiajin 1dd33ad
Modified the code according to the review comments.
zhangjiajin 4c60fb3
Fix some Scala style errors.
zhangjiajin ba5df34
Fix a Scala style error.
zhangjiajin 574e56c
Add new object LocalPrefixSpan, and do some optimization.
zhangjiajin ca9c4c8
Modified the code according to the review comments.
zhangjiajin 22b0ef4
Add feature: Collect enough frequent prefixes before projection in Pr…
zhangjiajin 078d410
fix a scala style error.
zhangjiajin 4dd1c8a
initialize file before rebase.
zhangjiajin a8fde87
Merge branch 'master' of https://github.com/apache/spark
zhangjiajin 6560c69
Add feature: Collect enough frequent prefixes before projection in Pr…
zhangjiajin baa2885
Modified the code according to the review comments.
zhangjiajin 095aa3a
Modified the code according to the review comments.
zhangjiajin b07e20c
Merge branch 'master' of https://github.com/apache/spark into Collect…
zhangjiajin d2250b7
remove minPatternsBeforeLocalProcessing, add maxSuffixesBeforeLocalPr…
zhangjiajin 64271b3
Modified codes according to comments.
zhangjiajin 6e149fa
Fix splitPrefixSuffixPairs
01c9ae9
Add getters
cb2a4fc
Inline code for readability
da0091b
Use lists for prefixes to reuse data
1235cfc
Use Iterable[Array[_]] over Array[Array[_]] for database
c2caa5c
Readability improvements and comments
87fa021
Improve extend prefix readability
ad23aa9
Merge pull request #1 from feynmanliang/SPARK-8998-collectBeforeLocal
zhangjiajin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add getters
- Loading branch information
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -53,6 +53,12 @@ class PrefixSpan private ( | |
| */ | ||
| 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`). | ||
| */ | ||
|
|
@@ -63,10 +69,16 @@ class PrefixSpan private ( | |
| this | ||
| } | ||
|
|
||
| /** | ||
| * Gets the maximal pattern length (i.e. the length of the longest sequential pattern to consider. | ||
| */ | ||
| def getMaxPatternLength(): Double = this.maxPatternLength | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. remove
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OK |
||
|
|
||
| /** | ||
| * Sets maximal pattern length (default: `10`). | ||
| */ | ||
| def setMaxPatternLength(maxPatternLength: Int): this.type = { | ||
| // TODO: support unbounded pattern length when maxPatternLength = 0 | ||
| require(maxPatternLength >= 1, | ||
| "The maximum pattern length value must be greater than 0.") | ||
| this.maxPatternLength = maxPatternLength | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove
()There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK