Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SW-1281] Fix bad representation of predictionCol on H2OMOJOModel #1199

Merged
merged 5 commits into from May 15, 2019

Conversation

jakubhava
Copy link
Contributor

No description provided.

mn-mikke
mn-mikke previously approved these changes May 15, 2019
Copy link
Collaborator

@mn-mikke mn-mikke left a comment

Choose a reason for hiding this comment

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

Small nits, otherwise LGTM.

@@ -163,7 +163,7 @@ class H2OMOJOModel(override val uid: String)
val flattenedDF = H2OSchemaUtils.flattenDataFrame(dataset.toDF())
val relevantColumnNames = flattenedDF.columns.intersect(getFeaturesCols())
val args = relevantColumnNames.map(flattenedDF(_))
flattenedDF.select(col("*"), getModelUdf()(struct(args: _*)).as(getOutputCol()))
flattenedDF.select(col("*"), getModelUdf()(struct(args: _*)).as(getPredictionCol))
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: ditto


val parsedParams = metadata.params.asInstanceOf[JsonAST.JObject].obj.map(_._1)
val allowedParams = instance.params.map(_.name)
val filteredParams = parsedParams.filter(!allowedParams.contains(_))
Copy link
Collaborator

Choose a reason for hiding this comment

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

WDYT about using theintersect method?

Copy link
Contributor Author

@jakubhava jakubhava May 15, 2019

Choose a reason for hiding this comment

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

Thanks just for reference -> as per our discussion in the office, intersect is not a good fit, but diff is

@jakubhava jakubhava merged commit ae3f9c0 into master May 15, 2019
@jakubhava jakubhava deleted the jh/sw-1281 branch May 15, 2019 14:58
jakubhava added a commit that referenced this pull request May 15, 2019
jakubhava added a commit that referenced this pull request May 15, 2019
jakubhava added a commit that referenced this pull request May 15, 2019
jakubhava added a commit that referenced this pull request May 15, 2019
jakubhava added a commit that referenced this pull request May 15, 2019
)

(cherry picked from commit ae3f9c0)
(cherry picked from commit a0b6c64)
jakubhava added a commit that referenced this pull request May 15, 2019
)

(cherry picked from commit ae3f9c0)
(cherry picked from commit a0b6c64)
(cherry picked from commit b21ac58)
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.

None yet

2 participants