Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)] on win32
Type "copyright", "credits" or "license()" for more information.
RESTART: C:\Users\sujan\Documents\2020_Papers\Data_Solar\2020_paper1\P5\Stock-price-prediction-using-GAN-Capstone-Group1-master\Code\2. Autoencoder.py
Number of training days: 1747. Number of test days: 750.
VAE(
(encoder): HybridSequential(
(0): Dense(None -> 400, linear)
(1): GELU(
)
(2): Dense(None -> 4, linear)
(3): Dense(None -> 400, linear)
(4): GELU(
)
(5): Dense(None -> 4, linear)
(6): Dense(None -> 400, linear)
(7): GELU(
)
(8): Dense(None -> 4, linear)
)
(decoder): HybridSequential(
(0): Dense(None -> 400, linear)
(1): GELU(
)
(2): Dense(None -> 35, Activation(sigmoid))
(3): Dense(None -> 400, linear)
(4): GELU(
)
(5): Dense(None -> 35, Activation(sigmoid))
(6): Dense(None -> 400, linear)
(7): GELU(
)
(8): Dense(None -> 35, Activation(sigmoid))
)
)
Training completed in 47 seconds.
The shape of the newly created (from the autoencoder) features is (2497, 35).
------ pca.n_components_ ------
3
[0.66342705 0.0908217 0.05160403]
Traceback (most recent call last):
File "C:\Users\sujan\AppData\Local\Programs\Python\Python37\lib\site-packages\pandas\core\internals.py", line 4857, in create_block_manager_from_blocks
placement=slice(0, len(axes[0])))]
File "C:\Users\sujan\AppData\Local\Programs\Python\Python37\lib\site-packages\pandas\core\internals.py", line 3205, in make_block
return klass(values, ndim=ndim, placement=placement)
File "C:\Users\sujan\AppData\Local\Programs\Python\Python37\lib\site-packages\pandas\core\internals.py", line 125, in init
'{mgr}'.format(val=len(self.values), mgr=len(self.mgr_locs)))
ValueError: Wrong number of items passed 3, placement implies 4
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\sujan\Documents\2020_Papers\Data_Solar\2020_paper1\P5\Stock-price-prediction-using-GAN-Capstone-Group1-master\Code\2. Autoencoder.py", line 160, in
VAE_features = get_autoencoder("Apple")
File "C:\Users\sujan\Documents\2020_Papers\Data_Solar\2020_paper1\P5\Stock-price-prediction-using-GAN-Capstone-Group1-master\Code\2. Autoencoder.py", line 147, in get_autoencoder
VAE_features = pd.DataFrame(principalComponents, columns = ['VAE_PCA_1', 'VAE_PCA_2', 'VAE_PCA_3', 'VAE_PCA_4'])
File "C:\Users\sujan\AppData\Local\Programs\Python\Python37\lib\site-packages\pandas\core\frame.py", line 379, in init
copy=copy)
File "C:\Users\sujan\AppData\Local\Programs\Python\Python37\lib\site-packages\pandas\core\frame.py", line 536, in _init_ndarray
return create_block_manager_from_blocks([values], [columns, index])
File "C:\Users\sujan\AppData\Local\Programs\Python\Python37\lib\site-packages\pandas\core\internals.py", line 4866, in create_block_manager_from_blocks
construction_error(tot_items, blocks[0].shape[1:], axes, e)
File "C:\Users\sujan\AppData\Local\Programs\Python\Python37\lib\site-packages\pandas\core\internals.py", line 4843, in construction_error
passed, implied))
ValueError: Shape of passed values is (3, 2497), indices imply (4, 2497)