Skip to content

Conversation

@shchur
Copy link
Collaborator

@shchur shchur commented Apr 9, 2024

Description of changes:

  • Some lightweight feature engineering for MLForecast-based models:
    • Add two static features, encoding mean & std of the target time series for each item
    • For each continuous real-valued covariate, add a copy of this covariate that is mean-abs-scaled per item

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@shchur shchur requested a review from canerturkmen April 9, 2024 13:44
@yinweisu
Copy link
Contributor

yinweisu commented Apr 9, 2024

Previous CI Run Current CI Run

Copy link
Contributor

@canerturkmen canerturkmen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

for col in self.metadata.known_covariates_real:
# Normalize non-boolean features using mean_abs scaling
if not df[col].isin([0, 1]).all():
df[f"__scaled_{col}"] = df[col] / df[col].abs().groupby(df[ITEMID]).mean().reindex(df[ITEMID]).values
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice pandas sorcery :)

@yinweisu
Copy link
Contributor

yinweisu commented Apr 9, 2024

Previous CI Run Current CI Run

@yinweisu
Copy link
Contributor

yinweisu commented Apr 9, 2024

Previous CI Run Current CI Run

@shchur shchur merged commit a9948a4 into autogluon:master Apr 9, 2024
@shchur shchur deleted the normalize-mlf-features branch April 9, 2024 19:20
LennartPurucker pushed a commit to LennartPurucker/autogluon that referenced this pull request Jun 1, 2024
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.

3 participants