Skip to content

Conversation

@sethah
Copy link
Contributor

@sethah sethah commented Oct 5, 2016

What changes were proposed in this pull request?

Before, we computed instances in LinearRegression in two spots, even though they did the same thing. One of them did not cast the label column to DoubleType. This patch consolidates the computation and always casts the label column to DoubleType.

How was this patch tested?

Added a unit test to check all solvers. This test failed before this patch.

@sethah
Copy link
Contributor Author

sethah commented Oct 5, 2016

cc @jkbradley @yanboliang

@sethah
Copy link
Contributor Author

sethah commented Oct 5, 2016

also ping @BenFradet

@SparkQA
Copy link

SparkQA commented Oct 6, 2016

Test build #66404 has finished for PR 15364 at commit c1cdf63.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

Copy link
Contributor

@yanboliang yanboliang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@BenFradet
Copy link
Contributor

Lgtm 👍

@yanboliang
Copy link
Contributor

yanboliang commented Oct 7, 2016

Merged into master and branch-2.0, thanks!

@asfgit asfgit closed this in 3713bb1 Oct 7, 2016
asfgit pushed a commit that referenced this pull request Oct 7, 2016
… general numeric label column types

## What changes were proposed in this pull request?

Before, we computed `instances` in LinearRegression in two spots, even though they did the same thing. One of them did not cast the label column to `DoubleType`. This patch consolidates the computation and always casts the label column to `DoubleType`.

## How was this patch tested?

Added a unit test to check all solvers. This test failed before this patch.

Author: sethah <[email protected]>

Closes #15364 from sethah/linreg_numeric_type.

(cherry picked from commit 3713bb1)
Signed-off-by: Yanbo Liang <[email protected]>
uzadude pushed a commit to uzadude/spark that referenced this pull request Jan 27, 2017
… general numeric label column types

## What changes were proposed in this pull request?

Before, we computed `instances` in LinearRegression in two spots, even though they did the same thing. One of them did not cast the label column to `DoubleType`. This patch consolidates the computation and always casts the label column to `DoubleType`.

## How was this patch tested?

Added a unit test to check all solvers. This test failed before this patch.

Author: sethah <[email protected]>

Closes apache#15364 from sethah/linreg_numeric_type.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants