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

About Code #22

Open
igodrr opened this issue Sep 4, 2024 · 1 comment
Open

About Code #22

igodrr opened this issue Sep 4, 2024 · 1 comment

Comments

@igodrr
Copy link

igodrr commented Sep 4, 2024

Hello, I think there is a piece of code that does not match the description in the article:
# Koopman Forecasting residual, forecast = x_enc, None for i in range(self.num_blocks): time_var_input, time_inv_input = self.disentanglement(residual) time_inv_output = self.time_inv_kps[i](time_inv_input) time_var_backcast, time_var_output = self.time_var_kps[i](time_var_input) residual = residual - time_var_backcast if forecast is None: forecast = (time_inv_output + time_var_output) else: forecast += (time_inv_output + time_var_output)
Here, residual is not the residual of time_var_input, but rather time_var_input with the time-invariant part added. So, I think you should write residual = time_var_input before performing the subtraction. The article describes it this way:
image
I’m not sure if my understanding is correct, and I look forward to your response.

@igodrr
Copy link
Author

igodrr commented Sep 4, 2024

Additionally, I have another point of confusion: Why is the same frequency mask used on the residual as the original data to separate time-variant and time-invariant information? The Fourier transform with the defined mask should have already stripped away the time-invariant information selected by the mask in the first layer. So, what is the intention behind applying it again to the residual? I look forward to your explanation.

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

No branches or pull requests

1 participant