An open source python library for automated feature engineering
An open source python library for automated feature engineering
"One of the holy grails of machine learning is to automate more and more of the feature engineering process." ― Pedro Domingos, A Few Useful Things to Know about Machine Learning
Featuretools is a python library for automated feature engineering. See the documentation for more information.
Install with pip
python -m pip install featuretoolsor from the Conda-forge channel on conda:
conda install -c conda-forge featuretoolsYou can install add-ons individually or all at once by running:
python -m pip install "featuretools[complete]"Premium Primitives - Use Premium Primitives from the premium-primitives repo
python -m pip install "featuretools[premium]"NLP Primitives - Use Natural Language Primitives from the nlp-primitives repo
python -m pip install "featuretools[nlp]"Dask Support - Use Dask to run DFS with njobs > 1
python -m pip install "featuretools[dask]"Below is an example of using Deep Feature Synthesis (DFS) to perform automated feature engineering. In this example, we apply DFS to a multi-table dataset consisting of timestamped customer transactions.
>> import featuretools as ft
>> es = ft.demo.load_mock_customer(return_entityset=True)
>> es.plot()Featuretools can automatically create a single table of features for any "target dataframe"
>> feature_matrix, features_defs = ft.dfs(entityset=es, target_dataframe_name="customers")
>> feature_matrix.head(5)…We now have a feature vector for each customer that can be used for machine learning. See the documentation on Deep Feature Synthesis for more examples.
Featuretools contains many different types of built-in primitives for creating features. If the primitive you need is not included, Featuretools also allows you to define your own custom primitives.
Predict Next Purchase
In this demonstration, we use a multi-table dataset of 3 million online grocery orders from Instacart to predict what a customer will buy next. We show how to generate features with automated feature engineering and build an accurate machine learning pipeline using Featuretools, which can be reused for multiple prediction problems. For more advanced users, we show how to scale that pipeline to a large dataset using Dask.
For more examples of how to use Featuretools, check out our demos page.
The Featuretools community welcomes pull requests. Instructions for testing and development are available here.
The Featuretools community is happy to provide support to users of Featuretools. Project support can be found in four places depending on the type of question:
featuretools tag.If you use Featuretools, please consider citing the following paper:
James Max Kanter, Kalyan Veeramachaneni. Deep feature synthesis: Towards automating data science endeavors. IEEE DSAA 2015.
BibTeX entry:
@inproceedings{kanter2015deep,
author = {James Max Kanter and Kalyan Veeramachaneni},
title = {Deep feature synthesis: Towards automating data science endeavors},
booktitle = {2015 {IEEE} International Conference on Data Science and Advanced Analytics, DSAA 2015, Paris, France, October 19-21, 2015},
pages = {1--10},
year = {2015},
organization={IEEE}
}Featuretools is an open source project maintained by Alteryx. To see the other open source projects we’re working on visit Alteryx Open Source. If building impactful data science pipelines is important to you or your business, please get in touch.
And Primitive has unnecessary inputs
Update allowed types for instance_vals in query_by_values
RollingMean: index values must not have NaT
How can we handle few missing time indices in featuretools? Even one missing timestamp in the time index leads to all time based features being null
DFS with n_jobs > 1 fails
Add tests that confirm primitive input_types are the expected shapes
Determine way to speed up calculate_feature_matrix
Please update the link in the repo to https://featuretools.alteryx.com/en/stable/
Use polars for primitive calculation for faster feature value generation
Support Datetime Feature +/- pd.Timedelta