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

calculate_feature_matrix #5

Open
allaabdella2 opened this issue Mar 5, 2020 · 0 comments
Open

calculate_feature_matrix #5

allaabdella2 opened this issue Mar 5, 2020 · 0 comments
Labels
New Method Idea Proposal for new encoding method

Comments

@allaabdella2
Copy link

allaabdella2 commented Mar 5, 2020

#5 Comment:
I fixed this issue by updating pandas:
pip install pandas==0.24.0

es = make_ecommerce_entityset()
f1 = ft.Feature(es["log"]["product_id"])
f2 = ft.Feature(es["log"]["purchased"])
f3 = ft.Feature(es["log"]["value"])
f4 = ft.Feature(es["log"]["countrycode"])

features = [f1, f2, f3, f4]
ids = [0, 1, 2, 3, 4, 5]
feature_matrix = ft.calculate_feature_matrix(features, es,
instance_ids=ids)
print(feature_matrix)

The error:


AttributeError Traceback (most recent call last)
in
1 feature_matrix = ft.calculate_feature_matrix(features, es,
----> 2 instance_ids=ids)
/anaconda/envs/azureml_py36/lib/python3.6/site-packages/featuretools/computational_backends/calculate_feature_matrix.py in calculate_feature_matrix(features, entityset, cutoff_time, instance_ids, entities, relationships, cutoff_time_in_index, training_window, approximate, save_progress, verbose, chunk_size, n_jobs, dask_kwargs, progress_callback)
281
282 # ensure rows are sorted by input order
--> 283 feature_matrix = feature_matrix.reindex(pd.MultiIndex.from_frame(cutoff_time[["instance_id", "time"]],
284 names=feature_matrix.index.names))
285
AttributeError: type object 'MultiIndex' has no attribute 'from_frame'

@allaabdella2 allaabdella2 added the New Method Idea Proposal for new encoding method label Mar 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
New Method Idea Proposal for new encoding method
Projects
None yet
Development

No branches or pull requests

1 participant