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

Introduced FeatureBuilder.fromDataFrame function allowing materializing features from a DataFrame #18

Merged
merged 1 commit into from
Jun 1, 2018

Conversation

tovbinm
Copy link
Collaborator

@tovbinm tovbinm commented Jun 1, 2018

I moved this functionality from TestFeatureBuilder to a top level FeatureBuilder as it can be quite powerful for very simple applications, in which there is a dataset/dataframe available and once would like to automatically create features from it.

Example usage:

case class MyClass(s: String, l: Long, label: Double)
val data: DataFrame = Seq(MyClass("blah1", 10, label = 2.0)).toDS.toDF()
val (label, Array(fs, fl)) = FeatureBuilder.fromDataFrame[RealNN](data, response = "label")

…ng features from a DataFrame

I moved this functionality from TestFeatureBuilder to a top level FeatureBuilder as it can be quite powerful for very simple applications, in which there is a dataset/dataframe available and once would like to automatically create features from it.

Example usage:

case class MyClass(s: String, l: Long, label: Double)
val data: DataFrame = Seq(MyClass("blah1", 10, label = 2.0)).toDS.toDF()
val (label, Array(fs, fl)) = FeatureBuilder.fromDataFrame[RealNN](data, response = "label")
@tovbinm tovbinm requested a review from marcovivero June 1, 2018 20:50
@tovbinm tovbinm merged commit 028be59 into master Jun 1, 2018
@tovbinm tovbinm deleted the mt/feature-builder-df branch June 1, 2018 21:01
tovbinm added a commit that referenced this pull request Jun 1, 2018
…erializing features from a DataFrame (#18)"

This reverts commit 028be59.
@tovbinm tovbinm restored the mt/feature-builder-df branch June 1, 2018 21:01
@tovbinm tovbinm deleted the mt/feature-builder-df branch June 1, 2018 21:29
ericwayman pushed a commit that referenced this pull request Feb 8, 2019
…ng features from a DataFrame (#18)

I moved this functionality from TestFeatureBuilder to a top level FeatureBuilder as it can be quite powerful for very simple applications, in which there is a dataset/dataframe available and once would like to automatically create features from it.

Example usage:

case class MyClass(s: String, l: Long, label: Double)
val data: DataFrame = Seq(MyClass("blah1", 10, label = 2.0)).toDS.toDF()
val (label, Array(fs, fl)) = FeatureBuilder.fromDataFrame[RealNN](data, response = "label")
emitc2h added a commit that referenced this pull request Feb 24, 2022
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