Github user yanboliang commented on a diff in the pull request:
https://github.com/apache/spark/pull/15788#discussion_r89059280
--- Diff:
mllib/src/main/scala/org/apache/spark/ml/r/GeneralizedLinearRegressionWrapper.scala
---
@@ -52,7 +59,15 @@ private[r] class GeneralizedLinearRegressionWrapper
private (
def residuals(residualsType: String): DataFrame =
glm.summary.residuals(residualsType)
def transform(dataset: Dataset[_]): DataFrame = {
- pipeline.transform(dataset).drop(glm.getFeaturesCol)
+ if (rFamily == "binomial") {
+ pipeline.transform(dataset)
+ .drop(PREDICTED_LABEL_PROB_COL)
--- End diff --
Yeah, I totally agree the hard-coded column names issues should be fixed,
and already have some ideas in my mind to improve SparkR ML wrappers(which
include this). This can be placed in the plan of next release version and I
will write simple design documents for reviewing.
For the ```ProbabilityToPrediction``` issue, the idea of
```SQLTransformer``` sounds good and I will try to fix it in follow-up PR.
Thanks.
---
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]