Open airman604 opened 7 years ago
In Concept01_timeseries_data.ipynb in Chapter 10, I believe you can simplify and speed up the following code:
def split_data(data, percent_train=0.80): num_rows = len(data) train_data, test_data = [], [] for idx, row in enumerate(data): if idx < num_rows * percent_train: train_data.append(row) else: test_data.append(row) return train_data, test_data
as follows:
def split_data(data, percent_train=0.80): num_rows = len(data)*percent_train return data[:num_rows], data[num_rows:]
I didn't want to open an issue for this and it is related to Chapter 10. Can you please add an example that uses batch_sequences_with_states method?
In Concept01_timeseries_data.ipynb in Chapter 10, I believe you can simplify and speed up the following code:
as follows: