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

Add FeatureBuilder.fromSchema #325

Merged
merged 1 commit into from
May 26, 2019

Conversation

takezoe
Copy link
Contributor

@takezoe takezoe commented May 26, 2019

Describe the proposed solution

This pull request adds FeatureBuilder.fromSchema that allows to create features from schema.

Describe alternatives you've considered

FeatureBuilder already has a method to create features from DataFrame, but actually, only schema is necessary to create features.

@salesforce-cla
Copy link

Thanks for the contribution! Before we can merge this, we need @takezoe to sign the Salesforce.com Contributor License Agreement.

@codecov
Copy link

codecov bot commented May 26, 2019

Codecov Report

Merging #325 into master will decrease coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #325      +/-   ##
==========================================
- Coverage   86.51%   86.49%   -0.02%     
==========================================
  Files         329      329              
  Lines       10598    10599       +1     
  Branches      336      548     +212     
==========================================
- Hits         9169     9168       -1     
- Misses       1429     1431       +2
Impacted Files Coverage Δ
...la/com/salesforce/op/features/FeatureBuilder.scala 33.33% <100%> (+0.47%) ⬆️
...es/src/main/scala/com/salesforce/op/OpParams.scala 85.71% <0%> (-4.09%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c47ff42...f077ef7. Read the comment docs.

@@ -215,6 +216,7 @@ object FeatureBuilder {
}
responseFeature -> features
}
def fromDataFrame[ResponseType <: FeatureType : WeakTypeTag](data: DataFrame, response: String, nonNullable: Set[String] = Set.empty): (Feature[ResponseType], Array[Feature[_ <: FeatureType]]) = fromSchema(data.schema, response, nonNullable)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please add docs

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added

Copy link
Collaborator

@tovbinm tovbinm left a comment

Choose a reason for hiding this comment

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

Lgtm

@takezoe takezoe force-pushed the features-from-schema branch from 865ddca to f077ef7 Compare May 26, 2019 07:33
@tovbinm tovbinm merged commit b08dd94 into salesforce:master May 26, 2019
@takezoe takezoe deleted the features-from-schema branch May 26, 2019 15:54
This was referenced Jul 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants