i have 1100 csv files of cryptocurrencies historical data including OHLCV and indicators…
- User
i have 1100 csv files of cryptocurrencies historical data including OHLCV and indicators and etc
each file has 113 columns and between 1000 to 2500 rows
i want to train a RNN model to predict close price of next day based on past 60 days i want to train model without combining all csv files
give me the proper implementation to train a RSTM RNN model on my dataset
- Assistant
- User
TypeError Traceback (most recent call last) Cell In[10], line 1 ----> 1 data_gen = DataGenerator(file_list=file_list, batch_size=batch_size, n_steps=60, scale=True, shuffle=True) 2 model = build_model((60, n_features)) # 60 days look-back, 112 features
TypeError: DataGenerator() takes no arguments
- Assistant
- User
{ "name": "NotImplementedError", "message": "", "stack": "--------------------------------------------------------------------------- NotImplementedError Traceback (most recent call last) Cell In[12], line 2 1 # Fit the model ----> 2 model.fit(data_gen, epochs=10)
File c:\Users\Fazel\AppData\Local\Programs\Python\Python310\lib\site-packages\keras\utils\traceback_utils.py:70, in filter_traceback..error_handler(*args, **kwargs) 67 filtered_tb = _process_traceback_frames(e.traceback) 68 # To get the full stack trace, call: 69 #
tf.debugging.disable_traceback_filtering()---> 70 raise e.with_traceback(filtered_tb) from None 71 finally: 72 del filtered_tbFile c:\Users\Fazel\AppData\Local\Programs\Python\Python310\lib\site-packages\keras\utils\data_utils.py:498, in Sequence.getitem(self, index) 488 @abstractmethod 489 def getitem(self, index): 490 """Gets batch at position
index. 491 492 Args: (...) 496 A batch 497 """ --> 498 raise NotImplementedErrorNotImplementedError: " }
- Assistant
- User
after model trained how should i evaluate it?
- Assistant
- User
what does this part do: if self.shuffle: c = list(zip(batch_x, batch_y)) np.random.shuffle batch_x, batch_y = zip(*c)
- Assistant
The code snippet you've provided is intended to shuffle the pairs of input sequences (
batch_x) and their corresponding target values () before returning them for training the model. This shuffling is a common practice in machine learning to ensure that the order of the data does not introduce any bias or undesired patterns into the model during training. However, there seems to be a mistake in the implementation. Let me first explain what the intended function of this code is and then provide the corrected version.