Skip to content
Snippets Groups Projects
Commit 3713bb19 authored by sethah's avatar sethah Committed by Yanbo Liang
Browse files

[SPARK-17792][ML] L-BFGS solver for linear regression does not accept general...

[SPARK-17792][ML] L-BFGS solver for linear regression does not accept 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 <seth.hendrickson16@gmail.com>

Closes #15364 from sethah/linreg_numeric_type.
parent 49d11d49
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment