|
|
@ -118,12 +118,14 @@ Now, you need to prepare the data for training by performing two tasks:
|
|
|
|
print('Training data shape: ', train.shape)
|
|
|
|
print('Training data shape: ', train.shape)
|
|
|
|
print('Test data shape: ', test.shape)
|
|
|
|
print('Test data shape: ', test.shape)
|
|
|
|
```
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
You can see the shape of the data:
|
|
|
|
You can see the shape of the data:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
```output
|
|
|
|
Training data shape: (1416, 1)
|
|
|
|
Training data shape: (1416, 1)
|
|
|
|
Test data shape: (48, 1)
|
|
|
|
Test data shape: (48, 1)
|
|
|
|
|
|
|
|
```
|
|
|
|
1. Scale the data to be in the range (0, 1).
|
|
|
|
2. Scale the data to be in the range (0, 1).
|
|
|
|
|
|
|
|
|
|
|
|
```python
|
|
|
|
```python
|
|
|
|
scaler = MinMaxScaler()
|
|
|
|
scaler = MinMaxScaler()
|
|
|
|