PandasDataset.from_long_dataframe's static_features is putting things always as static real instead of static cat #2898
Bateoriginal
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Do you know who I should contact to create PandasDataset with the from_long_dataframe method? multiple_ts_long_dataset's ['feat_static_cat'] is always empty whereas multiple_ts_long_dataset's['feat_static_real'] always have the values. I want my values in the ['feat_static_cat'] not in ['feat_static_real'] .
This is what I have tried so far:
static_features_df = filtered_zf_df[["SKU", "SKU_DESC", "SUBDEPT_ID", "SUBDEPT_DESC", "DEPT_ID", "DEPT_DESC"]].drop_duplicates().set_index("SKU")
static_features_df["SKU_DESC"] = static_features_df["SKU_DESC"].astype('category')
static_features_df["SUBDEPT_DESC"] = static_features_df["SUBDEPT_DESC"].astype('category')
static_features_df["DEPT_DESC"] = static_features_df["DEPT_DESC"].astype('category')
static_features_df["SUBDEPT_ID"] = static_features_df["SUBDEPT_ID"].astype('category')
static_features_df["DEPT_ID"] = static_features_df["DEPT_ID"].astype('category')
multiple_ts_long_dataset = PandasDataset.from_long_dataframe(
filtered_zf_df,
target="SALES",
item_id="SKU",
feat_dynamic_real=["AVG_UNIT_PRICE", "NUNIQUE_LOYAL_CARD_NO", "COUNT_TX_ID"],
static_features=static_features_df,
)
Beta Was this translation helpful? Give feedback.
All reactions