GitHub user zhengruifeng opened a pull request:
https://github.com/apache/spark/pull/12718
[SPARK-14938][ML] replace rdd with dataset
## What changes were proposed in this pull request?
Replace rdd with dataset in ML.
From:
{{code}}
dataset.select($(labelCol), $(featuresCol)).rdd.map {
case Row(label: Double, features: Vector) =>
LabeledPoint(label, features)
}
{{code}}
To:
{{code}}
dataset.select($(labelCol), $(featuresCol)).as[LabeledPoint].rdd
{{code}}
## How was this patch tested?
manual tests
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/zhengruifeng/spark use_dataset
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/12718.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #12718
----
commit 6256df1db761b62a482b652df3e33b74c67a3710
Author: Zheng RuiFeng <[email protected]>
Date: 2016-04-26T13:20:50Z
replace rdd with dataset
commit d3df6d4f247da32945feeef0ecae0d5c970b4ac2
Author: Zheng RuiFeng <[email protected]>
Date: 2016-04-26T23:15:11Z
fix a nit
----
---
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]