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

add recent power values as features #115

Merged
merged 8 commits into from
Feb 20, 2024
Merged

add recent power values as features #115

merged 8 commits into from
Feb 20, 2024

Conversation

peterdudfield
Copy link
Contributor

@peterdudfield peterdudfield commented Feb 20, 2024

Pull Request

Description

Add recent values values as a feature. Before we jsut have the recent power mean is a recent time period.

TODO run experiment with and without this. The experiment should perhaps just be trying to forecast 1 hour in 15 mins blocks. And we would expect this to make a difference

How Has This Been Tested?

CI tests

  • Yes

Checklist:

  • My code follows OCF's coding style guidelines
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked my code and corrected any misspellings

@peterdudfield peterdudfield marked this pull request as draft February 20, 2024 08:53
@peterdudfield peterdudfield marked this pull request as ready for review February 20, 2024 11:14
elif len(recent_power_values) > self._n_recent_power_values:
recent_power_values = recent_power_values[
len(recent_power_values) - self._n_recent_power_values :
]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Changes might need to be made when we use the flag --no-live-pv, to remove PV features during inference for metadata only backtests.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yea, good shout, ill have a look at that. Probably the same for the mean power values above.

Although the default is 0 values, so it might be ok

Copy link
Collaborator

Choose a reason for hiding this comment

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

The new features would need to be removed from here:

def get_features_without_pv(self, x: X, is_training: bool = False) -> Features:

Copy link
Collaborator

Choose a reason for hiding this comment

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

currently these pv features are hardcoded (in line 48):
pv_derived_features = ["recent_power", "h_max", "h_median", "h_mean"]
nan_pv_derived_features = ["recent_power_nan", "h_max_nan", "h_median_nan", "h_mean_nan"]

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think I found it

@zakwatts
Copy link
Collaborator

Looks good. It would probably make sense to add a test somewhere for the --no-live-pv. (which is my bad as I didn't make one when i first implemented this!)

Copy link
Collaborator

@zakwatts zakwatts left a comment

Choose a reason for hiding this comment

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

Looks good

@peterdudfield peterdudfield merged commit 96b5c5a into main Feb 20, 2024
1 check passed
@peterdudfield peterdudfield deleted the issue/recent-power branch February 20, 2024 13:20
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.

2 participants