-
Notifications
You must be signed in to change notification settings - Fork 397
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
Conversation
Thanks for the contribution! Before we can merge this, we need @takezoe to sign the Salesforce.com Contributor License Agreement. |
Codecov Report
@@ 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
Continue to review full report at Codecov.
|
@@ -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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add docs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm
865ddca
to
f077ef7
Compare
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 fromDataFrame
, but actually, only schema is necessary to create features.