-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-20506][DOCS] 2.2 migration guide #17996
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
Closed
Changes from 6 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
ba10976
Migration guide 2.1->2.2
5a3d87b
Bump expected parity release number
ac2e50d
Update migration guide
d122dd8
Add string indexer fix to behavior changes section
85b0f6e
Add release highlights section
e27d9e4
Add FPGrowth to highlights list
fb9fb5b
Correct JIRA link for correlation
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
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 |
|---|---|---|
|
|
@@ -26,7 +26,7 @@ The primary Machine Learning API for Spark is now the [DataFrame](sql-programmin | |
| * MLlib will still support the RDD-based API in `spark.mllib` with bug fixes. | ||
| * MLlib will not add new features to the RDD-based API. | ||
| * In the Spark 2.x releases, MLlib will add features to the DataFrames-based API to reach feature parity with the RDD-based API. | ||
| * After reaching feature parity (roughly estimated for Spark 2.2), the RDD-based API will be deprecated. | ||
| * After reaching feature parity (roughly estimated for Spark 2.3), the RDD-based API will be deprecated. | ||
| * The RDD-based API is expected to be removed in Spark 3.0. | ||
|
|
||
| *Why is MLlib switching to the DataFrame-based API?* | ||
|
|
@@ -66,41 +66,59 @@ To use MLlib in Python, you will need [NumPy](http://www.numpy.org) version 1.4 | |
| [^1]: To learn more about the benefits and background of system optimised natives, you may wish to | ||
| watch Sam Halliday's ScalaX talk on [High Performance Linear Algebra in Scala](http://fommil.github.io/scalax14/#/). | ||
|
|
||
| # Highlights in 2.2 | ||
|
|
||
| The list below highlights some of the new features and enhancements added to MLlib in the `2.2` | ||
| release of Spark: | ||
|
|
||
| * `ALS` methods for _top-k_ recommendations for all users or items, matching the functionality | ||
| in `mllib` ([SPARK-19535](https://issues.apache.org/jira/browse/SPARK-19535)). Performance | ||
| was also improved for both `ml` and `mllib` | ||
| ([SPARK-11968](https://issues.apache.org/jira/browse/SPARK-11968) and | ||
| [SPARK-20587](https://issues.apache.org/jira/browse/SPARK-20587)) | ||
| * `Correlation` and `ChiSquareTest` stats functions for `DataFrames` | ||
| ([SPARK-19635](https://issues.apache.org/jira/browse/SPARK-19635) and | ||
| [SPARK-19635](https://issues.apache.org/jira/browse/SPARK-19635)) | ||
| * `FPGrowth` algorithm for frequent pattern mining | ||
| ([SPARK-14503](https://issues.apache.org/jira/browse/SPARK-14503)) | ||
| * `GLM` now supports the full `Tweedie` family | ||
| ([SPARK-18929](https://issues.apache.org/jira/browse/SPARK-18929)) | ||
| * `Imputer` feature transformer to impute missing values in a dataset | ||
| ([SPARK-13568](https://issues.apache.org/jira/browse/SPARK-13568)) | ||
| * `LinearSVC` for linear Support Vector Machine classification | ||
| ([SPARK-14709](https://issues.apache.org/jira/browse/SPARK-14709)) | ||
| * Logistic regression now supports constraints on the coefficients during training | ||
| ([SPARK-20047](https://issues.apache.org/jira/browse/SPARK-20047)) | ||
|
|
||
| # Migration guide | ||
|
|
||
| MLlib is under active development. | ||
| The APIs marked `Experimental`/`DeveloperApi` may change in future releases, | ||
| and the migration guide below will explain all changes between releases. | ||
|
|
||
| ## From 2.0 to 2.1 | ||
| ## From 2.1 to 2.2 | ||
|
|
||
| ### Breaking changes | ||
|
|
||
| **Deprecated methods removed** | ||
|
|
||
| * `setLabelCol` in `feature.ChiSqSelectorModel` | ||
| * `numTrees` in `classification.RandomForestClassificationModel` (This now refers to the Param called `numTrees`) | ||
| * `numTrees` in `regression.RandomForestRegressionModel` (This now refers to the Param called `numTrees`) | ||
| * `model` in `regression.LinearRegressionSummary` | ||
| * `validateParams` in `PipelineStage` | ||
| * `validateParams` in `Evaluator` | ||
| There are no breaking changes. | ||
|
|
||
| ### Deprecations and changes of behavior | ||
|
|
||
| **Deprecations** | ||
|
|
||
| * [SPARK-18592](https://issues.apache.org/jira/browse/SPARK-18592): | ||
| Deprecate all Param setter methods except for input/output column Params for `DecisionTreeClassificationModel`, `GBTClassificationModel`, `RandomForestClassificationModel`, `DecisionTreeRegressionModel`, `GBTRegressionModel` and `RandomForestRegressionModel` | ||
| There are no deprecations. | ||
|
|
||
| **Changes of behavior** | ||
|
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. Should we include #17233 in this section?
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. Thanks - didn't catch that one |
||
|
|
||
| * [SPARK-17870](https://issues.apache.org/jira/browse/SPARK-17870): | ||
| Fix a bug of `ChiSqSelector` which will likely change its result. Now `ChiSquareSelector` use pValue rather than raw statistic to select a fixed number of top features. | ||
| * [SPARK-3261](https://issues.apache.org/jira/browse/SPARK-3261): | ||
| `KMeans` returns potentially fewer than k cluster centers in cases where k distinct centroids aren't available or aren't selected. | ||
| * [SPARK-17389](https://issues.apache.org/jira/browse/SPARK-17389): | ||
| `KMeans` reduces the default number of steps from 5 to 2 for the k-means|| initialization mode. | ||
|
|
||
| * [SPARK-19787](https://issues.apache.org/jira/browse/SPARK-19787): | ||
| Default value of `regParam` changed from `1.0` to `0.1` for `ALS.train` method (marked `DeveloperApi`). | ||
| **Note** this does _not affect_ the `ALS` Estimator or Model, nor MLlib's `ALS` class. | ||
| * [SPARK-14772](https://issues.apache.org/jira/browse/SPARK-14772): | ||
| Fixed inconsistency between Python and Scala APIs for `Param.copy` method. | ||
| * [SPARK-11569](https://issues.apache.org/jira/browse/SPARK-11569): | ||
| `StringIndexer` now handles `NULL` values in the same way as unseen values. Previously an exception | ||
| would always be thrown regardless of the setting of the `handleInvalid` parameter. | ||
|
|
||
| ## Previous Spark versions | ||
|
|
||
| Earlier migration guides are archived [on this page](ml-migration-guides.html). | ||
|
|
||
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
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.
Hi, @MLnick .
Correlationissue is SPARK-19636.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.
Ah right thanks for catching that