Git Product home page Git Product logo

Comments (20)

kdgutier avatar kdgutier commented on July 29, 2024 1

from esrnn_torch.

kdgutier avatar kdgutier commented on July 29, 2024 1

from esrnn_torch.

chendiva avatar chendiva commented on July 29, 2024

Hi,
Will it affect the forecasting result when I add the exogenous variable?

from esrnn_torch.

chendiva avatar chendiva commented on July 29, 2024

Sorry , I am still confused, if I add the exogenous variable as you recommend, will it affect the result? Is the x variable in your example added by you? Or this x is originally included in the dataset and use for forecasting?

from esrnn_torch.

kdgutier avatar kdgutier commented on July 29, 2024

from esrnn_torch.

chendiva avatar chendiva commented on July 29, 2024

This also give me NaN for my y_hat

from esrnn_torch.

kdgutier avatar kdgutier commented on July 29, 2024

from esrnn_torch.

chendiva avatar chendiva commented on July 29, 2024

Hi, how can I decide the frequency then?

from esrnn_torch.

kdgutier avatar kdgutier commented on July 29, 2024

from esrnn_torch.

chendiva avatar chendiva commented on July 29, 2024

I actually use my dataset, not the M3 now. My dataset is daily base. so I set the frequency = 'D', but I then got the error like this:
image

from esrnn_torch.

kdgutier avatar kdgutier commented on July 29, 2024

from esrnn_torch.

chendiva avatar chendiva commented on July 29, 2024

Yes, I actually check the dataframe with this command: df.isnull().values.any(), which returns me False. But I still get the above result

from esrnn_torch.

kdgutier avatar kdgutier commented on July 29, 2024

from esrnn_torch.

kdgutier avatar kdgutier commented on July 29, 2024

from esrnn_torch.

Yu-1245 avatar Yu-1245 commented on July 29, 2024

Hi, there, I got the same problem with yours, have you solved it? I tried to slice the m4 data provided from the prepare_m4_data function, and found out that even I make sure the identifier in the training set and testing set are the same, it still generated NaN for the evaluation methods and the predictions, which was weird.

from esrnn_torch.

AzulGarza avatar AzulGarza commented on July 29, 2024

Hi!

I think this answer could be useful.

from esrnn_torch.

Yu-1245 avatar Yu-1245 commented on July 29, 2024

Hi,
I saw the answer you. I have checked my dataset and make the changed you mentioned, but it still generate NaN for me.
@FedericoGarza

from esrnn_torch.

chendiva avatar chendiva commented on July 29, 2024

Hi, there, I got the same problem with yours, have you solved it? I tried to slice the m4 data provided from the prepare_m4_data function, and found out that even I make sure the identifier in the training set and testing set are the same, it still generated NaN for the evaluation methods and the predictions, which was weird.

No, I haven't solved the problem yet, even I tried his method.

from esrnn_torch.

Worben avatar Worben commented on July 29, 2024

Hi,
I have the same problem with my dataset. When I tried to find out the reason, I figured out that the NaN values appears for the first time in the long_to_wide function, more precisely: in the for loop. Any idea how to solve this? my data is structured exactly according to the specifications

def long_to_wide(self, X_df, y_df):
data = X_df.copy()
data['y'] = y_df['y'].copy()
sorted_ds = np.sort(data['ds'].unique())
ds_map = {}
for dmap, t in enumerate(sorted_ds):
	ds_map[t] = dmap
data['ds_map'] = data['ds'].map(ds_map)
data = data.sort_values(by=['ds_map','unique_id'])
df_wide = data.pivot(index='unique_id', columns='ds_map')['y']

x_unique = data[['unique_id', 'x']].groupby('unique_id').first()
last_ds =  data[['unique_id', 'ds']].groupby('unique_id').last()
assert len(x_unique)==len(data.unique_id.unique())
df_wide['x'] = x_unique
df_wide['last_ds'] = last_ds
df_wide = df_wide.reset_index().rename_axis(None, axis=1)

ds_cols = data.ds_map.unique().tolist()
X = df_wide.filter(items=['unique_id', 'x', 'last_ds']).values
y = df_wide.filter(items=ds_cols).values

return X, y

from esrnn_torch.

kdgutier avatar kdgutier commented on July 29, 2024

Have you solved the issue Worben?

from esrnn_torch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.