GitHub user BryanCutler opened a pull request:
https://github.com/apache/spark/pull/15288
[SPARK-17697][ML] Fixed bug in summary calculations that pattern match
against label without casting
## What changes were proposed in this pull request?
In calling LogisticRegression.evaluate and
GeneralizedLinearRegression.evaluate using a Dataset where the Label is not of
a double type, calculations pattern match against a double and throw a
MatchError. This fix casts the Label column to a DoubleType to ensure there is
no MatchError.
## How was this patch tested?
Added unit tests to call evaluate with a dataset that has Label as other
numeric types.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/BryanCutler/spark
binaryLOR-numericCheck-SPARK-17697
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/15288.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 #15288
----
commit 91f5be81a24eb14ae6206fa5f01cb2cf286504b6
Author: Bryan Cutler <[email protected]>
Date: 2016-09-28T22:15:08Z
added fix in LogisticRegression to evaluate with numeric types other than
double
commit 5c508611e0148b8224be6b06158d1ed4f349a70d
Author: Bryan Cutler <[email protected]>
Date: 2016-09-28T22:45:59Z
fixed same issue in GeneralizedLinearRegression
----
---
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]