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

[BUG] create_lagged_component_names does not return target column names #2574

Open
ETTAN93 opened this issue Oct 28, 2024 · 1 comment
Open
Labels
bug Something isn't working

Comments

@ETTAN93
Copy link

ETTAN93 commented Oct 28, 2024

image

From the documentation above, the function create_lagged_component_names is supposed to return the names of the target columns. However, when I run the function below, I get back an empty list:

from darts.utils.data.tabularization import create_lagged_component_names, create_lagged_training_data, create_lagged_prediction_data
target_lags = None
past_cov_lags = list(range(-8, 0))
future_cov_lags = list(range(-22, 21))

lagged_data_component_names = create_lagged_component_names(
    target_series=hf_data_dict['target_fit'],
    past_covariates=hf_data_dict['past_cov_fit'],
    future_covariates=hf_data_dict['future_cov_fit'],
    lags=target_lags,
    lags_past_covariates=past_cov_lags,
    lags_future_covariates=future_cov_lags,
    output_chunk_length=3,
    use_static_covariates=False
)
lagged_data_component_names[1]

This what my target_fit, past_cov_fit and future_cov_fit looks like:
image
image

As far as I understand the last n (forecast_horizon) names in lagged_data_component_names[0][-forecast_horizon:] should be equivalent to the output in lagged_data_component_names[1]?

Since my target name is edm_power_feed_in_diff and my output_chunk_length=3, I would expect create_lagged_component_names[1] to return [edm_power_feed_in_diff_hrz1, edm_power_feed_in_diff_hrz2, edm_power_feed_in_diff_hrz3] ?

@ETTAN93 ETTAN93 added bug Something isn't working triage Issue waiting for triaging labels Oct 28, 2024
@dennisbader
Copy link
Collaborator

Hi @ETTAN93 , it's indeed a bug that happens when lags=None (target lags). I'll open a fix soon.

@madtoinou madtoinou removed the triage Issue waiting for triaging label Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants