Questions tagged [featuretools]
Featuretools is a Python library for automated feature engineering on relational datasets using a technique called Deep Feature Synthesis.
200
questions
1
vote
1
answer
35
views
Use primitive_options on Featuretools to calc feature_matrix
I have a dataset with more than 30.000 rows like the picture below and need to generate some features with the featuretools library.
import pandas as pd
import featuretools as ft
# Read in the full ...
0
votes
1
answer
46
views
How can I get automatical features with dfs, using featuretools, when I have only one dataframe?
I am trying to figure out how Featuretools works and I am testing it on the Housing Prices dataset on Kaggle. Because the dataset is huge, I'll work here with only a set of it.
The dataframe is:
train=...
0
votes
0
answers
18
views
Featuretools support for order / time in Spark EntitySets; is it possible?
https://featuretools.alteryx.com/en/stable/guides/using_spark_entitysets.html#Supported-Primitives mentions:
When creating a feature matrix from a Spark EntitySet, only certain
primitives can be used....
0
votes
1
answer
38
views
How can I use get_valid_primitives when I have only one dataframe in Featuretools?
I am trying to figure out how Featuretools works and I am testing it on the Housing Prices dataset on Kaggle. Because the dataset is huge, I'll work here with only a set of it.
The dataframe is:
train=...
0
votes
1
answer
30
views
there is a question about remove_highly_correlated_features
I'm working on the featuretools package.I have a question about functions "remove_highly_correlated_features".In the documentation:"We make the assumption that, for a pair of features, ...
0
votes
1
answer
44
views
How to implement a function containing imputation methods to aggregation primitives in featuretools?
I'd like to use mean/median/mode imputation methods for null values in a dataset.
The output is supposed to be a table with aggregated values already. I just have really no idea on how to do it..
0
votes
1
answer
23
views
Load features created by custom primitives
I created some features base on custom primitives with help of featuretools and saved them into memory. Then I want load them with featuretools.load_features function. But I get the error RuntimeError:...
0
votes
1
answer
75
views
Featuretools - unable to add relationship in Entityset
I'm writing a notebook using this data from Kaggle. Here's a screenshot of the two tables just to show we have ID columns in both.
Here's my code when trying to set up the Entity Set and add a ...
0
votes
1
answer
42
views
Featuretools /woodwork :'Entity' object has no attribute 'ww'
featuretools==0.27.1
woodwork==0.10.0
Anyone has ideas?
es_1 = ft.demo.load_mock_customer(return_entityset=True)
es_1['products'].ww
AttributeError Traceback (most recent ...
0
votes
1
answer
46
views
FeatureTools deal with aggregation like count(distinct day())
I'm dealing with data by featuretools, and after checking the result. I find out that maybe count distinct day() could be better than count(). But I'm new to ft, and couldn't find a way to get these ...
0
votes
0
answers
52
views
How to use Featuretools to create features on new test data?
I have used Featuretools to generate features for a single table using a script like this:
es = ft.EntitySet(id = 'data')
es = es.entity_from_dataframe(entity_id = 'df', dataframe = X,
...
0
votes
1
answer
277
views
ModuleNotFoundError: No module named 'featuretools' even though I have installed featuretools
I keep getting the error ModuleNotFoundError: No module named 'featuretools' in Jupyter Notebook. However, it looks like it has been successfully installed when I install it in the terminal. I have ...
-1
votes
1
answer
54
views
The logics of the creation of aggregated features with featuretools
I have a dataset what contains several columns, including date, instance_id, numerical_x and categorical_y. I use featuretools package for feature generation as it has powerful ability to take time ...
1
vote
1
answer
43
views
Enable/force featuretools to use 2 or more columns to group by
How to enable or force featuretools to create featuretools groupby features using 2 or more columns as group bys.
For example I have columns x, y, z
how to set groupby_primitives_options or something ...
0
votes
2
answers
65
views
Proper way to pass cutoff_time to dfs in featuretools 1.0.0
Recently I've updated featuretools to v1.0.0 and faced the following issue. I have instances that vary within time and I want to build time dependent features for them. Besides, I want to save some ...
0
votes
0
answers
86
views
Index names must be exactly matched currently
I am trying to add koalas dataframe in an entitySet. Here is the code for it
subset_kdf_fp_eta_gt_prd.spark.print_schema()
root
|-- booking_code: string (nullable = true)
|-- order_id: string (...
1
vote
2
answers
2k
views
[featuretools]'EntitySet' object has no attribute 'entity_from_dataframe'
I tried to learn featuretools following documentation from featuretools.com.
A error came up:
AttributeError: 'EntitySet' object has no attribute 'entity_from_dataframe'
Could you help me?
Thank you.
...
0
votes
1
answer
180
views
Unable to add relationship in featuretools entity set
New to feature tools, getting this error while creating entity
Unable to add relationship because child column 'order_id' in 'orders' is also its index
I suspect that featuretools expect one to many ...
0
votes
1
answer
69
views
Parallelizing feature tools dfs
I tried a similar code to this snippet
ft.dfs(entityset = es,
target_entity = ...,
n_jobs=-1,) # or n_jobs=40
But it doesn't seem to work on a machine with 40 threads:
S CPU% MEM% ...
1
vote
1
answer
218
views
Features Created by FeatureTools Build Inconsistent Models
I have an imbalanced dataset which has 200 million data from class 0 and 8000 data from class 1. I followed two different approaches to build a model.
Randomly sample a new dataset which has a ratio ...
0
votes
1
answer
79
views
Using multiple Ids in featuretools
I have a dataset which I would like to conduct automatic feature engineering on. However it is time series based, so in order to make it work I have to use 2 things as ids, the object id and the date.
...
0
votes
1
answer
65
views
Applying Featuretools output to another dataframe
I have a dataframe which the target features, which looks like this:
x x1 y
1 2 3
2 3 4
Now I use feautretools to automatically do feature engineering, using this line of code:
es = ft.EntitySet(id = ...
0
votes
1
answer
83
views
Is it possible to calculate a feature matrix only for test data?
I have more than 100,000 rows of training data with timestamps and would like to calculate a feature matrix for new test data, of which there are only 10 rows. Some of the features in the test data ...
0
votes
1
answer
71
views
Regarding featuretools, the rank results are wrong
Using Featuretools, I want to convert the value of a certain feature to rank.
This will be the exact question. If anyone can help me, please answer.
First, the following code uses the rank function of ...
0
votes
1
answer
94
views
in featuretools, How to Custom Primitives of 2 columns?
I created Custom Primitives like below.
class Correlate(TransformPrimitive):
name = 'correlate'
input_types = [Numeric,Numeric]
return_type = Numeric
commutative = True
compatibility = [Library.PANDAS,...
0
votes
1
answer
43
views
Featuretools documentation of specifying primitive options is wrong?
The documentation says:
Specifying for Individual Primitives
Options for individual primitives or groups of primitives are set by the primitive_options parameter of DFS. This parameter maps any ...
0
votes
1
answer
53
views
In featuretools, How to control the application of where_primitives?
In featuretools we have various primitive application control mechanisms to custom apply the primitives to select entities and columns.
They are very neatly documented here
The ignore_entities and ...
1
vote
0
answers
153
views
Featuretools taking too long to build features without using CPU cores
I'm using featuretools Deep Feature Sintesys to build features for a dataset of 40k rows and 200 columns. I choose about 40 transformation primitivies, as you can see in the code bellow:
...
0
votes
1
answer
57
views
Featuretools - RollingSum
I am trying to create the custom primitive rolling-sum features using featuretools and below is the code:-
class RollingSumOnDatetime(TransformPrimitive):
"""Calculates the rolling ...
0
votes
1
answer
268
views
Featuretools: Generate rolling sum, mean etc. using Pandas 'rolling' but with an offset in days
I am trying to create a custom TransformPrimitive in Featuretools to calculate rolling statistics like the rolling sum or mean.
This article explains well how to go about such task using Pandas. It ...
0
votes
1
answer
77
views
Can featuretools be used on a vaex dataframe?
I'm trying to play with automated feature engineering - I've got it to work on raw dataframes but I'm not sure to do it on out of memory dataframes such as vaex. My purpose is to find a way to use ...
0
votes
2
answers
88
views
Custom Multiple Input Primitive Bug returns "TypeError: issubclass() arg 1 must be a class"
I am using Featuretools library to try to generate custom features involving customer transactions. I tested the function and it returns the answer so I am not sure why I am getting this error.
I ...
1
vote
1
answer
73
views
How to get trans_primitives of highest entity in featuretools?
In the classic mock customer dataset example in featuretools, if I have to derive trans_primitives like month, day, year etc. of transaction_time attribute of transactions entity. How do I do that?
...
1
vote
1
answer
115
views
How to implement custom naming for multioutput primitives in FeatureTools
As of version v0.12.0, FeatureTools allows you to assign custom names to multi-output primitives: https://github.com/alteryx/featuretools/pull/794. By default, the when you define custom multi-output ...
2
votes
2
answers
548
views
deep feature synthesis depth for transformation primitives | featuretools
I am trying to use the featuretools library to make new features on a simple dataset, however, whenever I try to use a bigger max_depth, nothing happens... Here is my code so far:
# imports
import ...
0
votes
1
answer
47
views
Using training_window in the featuretools dfs on the nasa turbofan example returns empty features
I am trying some experiments using the Remaining Useful Life prediction example on the Turbofan Engine Degradation Simulation Data Set from NASA. I want to use a small number of data points before the ...
1
vote
1
answer
292
views
featuretools: how can I apply `time_since`, `time_since_first` primitives on integer type of time index?
When the time index is integer(e.g. starting from 0 for each user), running dfs shows warnings:
UnusedPrimitiveWarning: Some specified primitives were not used during DFS:
agg_primitives: ['...
1
vote
1
answer
57
views
featuretools: manual derivation of the features generated by dfs?
Code example:
import featuretools as ft
es = ft.demo.load_mock_customer(return_entityset=True)
# Normalized one more time
es = es.normalize_entity(
new_entity_id="device",
...
0
votes
1
answer
89
views
How to normalize the entity having multiple values for the one feature in featuretools?
Below is an example:
buy_log_df = pd.DataFrame(
[
["2020-01-02", 0, 1, 2, 2],
["2020-01-02", 1, 1, 1, 3],
["2020-01-02", 2, 2, 1, 1],
[...
0
votes
1
answer
60
views
Do `normalize_entity()`, `add_relationships()` are logically same in featuretools?
Example:
buy_log_df = pd.DataFrame(
[
["2020-01-01", 0, 1, 2, 2, 200],
["2020-01-02", 1, 1, 1, 3, 100],
["2020-01-02", 2, 2, 1, 1, 100],
...
0
votes
1
answer
254
views
Featuretools import error in azure databricks
I would like to test the featuretools functionality in azure databricks notebooks. However getting the module error as below
ModuleNotFoundError: No module named 'featuretools'
Source code for ...
1
vote
1
answer
119
views
calculate time-windowed profiles with featuretools dfs
i am having trouble understand the cutoff_dates concept.
what i am really looking for is calculating different features by a time window that is let's say 60 days back (without the current transaction)...
1
vote
1
answer
94
views
Use FeatureTools to aggregate monthly data from daily
I'm trying to use FeatureTools to create a dataset for use in customer churn analysis. I have a raw dataset of orders that include fields like:
customer_id, order_id, order_month, order_datetime, ...
0
votes
1
answer
64
views
Selected primitives are incompatible with Koalas EntitySets: time_since_previous, avg_time_between, trend, avg_time_between, trend
I am using featuretools 0.20.0 and koalas 1.3.0.
create feature matrix for all customers
feature_matrix_cust, feature_defs = ft.dfs(
enter code here`entityset=es4,
target_entity="customers_ks&...
1
vote
1
answer
61
views
featuretools: why does dfs() do redundant calculation?
Below is the example code from the official docs
import featuretools as ft
es = ft.demo.load_mock_customer(return_entityset=True)
feature_matrix, feature_defs = ft.dfs(
entityset=es,
...
1
vote
1
answer
150
views
How do I create features in featuretools for rows with the same id and a time index?
I have a Dataframe like this
data = {'Customer':['C1', 'C1', 'C1', 'C2', 'C2', 'C2', 'C3', 'C3', 'C3'],
'NumOfItems':[3, 2, 4, 5, 5, 6, 10, 6, 14],
'PurchaseTime':["2014-01-01&...
0
votes
1
answer
125
views
featuretools generated null columns while there should be values
Background:
In using the automated feature engineering library featuretools, I first built 2 datasets member and order in the entityset. I build a relationship between them by implying ft.Relationship(...
2
votes
1
answer
129
views
Python featuretools difference by data group
I'm trying to use featuretools to calculate time-series functions. Specifically, I'd like to subtract current(x) from previous(x) by a group-key (user_id), but I'm having trouble in adding this kind ...
1
vote
1
answer
237
views
FeatureTools - How to Add 2 Columns Together?
I'm stuck. Using Featuretools, all I want to do is create a new column that sums two columns together from my dataset, creating a "stacked" feature of sorts. Do this for all columns in my ...
0
votes
1
answer
67
views
unable to process data using featuretools
this is my data set while trying to use featuretools
data
Unit Price Customer Name Product Category Region Profit Quantity ordered new Sales Order ID
0 2.88 Janice Fletcher ...