deependersingla / deep_trader

This project uses reinforcement learning on stock market and agent tries to learn trading. The goal is to check if the agent can learn to read tape. The project is dedicated to hero in life great Jesse Livermore.
1.46k stars 504 forks source link

Singleton array array(<map object at 0x00000190A1D75EF0>, dtype=object) cannot be considered a valid collection #20

Open GenesisGupta opened 6 years ago

GenesisGupta commented 6 years ago

Microsoft Windows [Version 10.0.17134.285] (c) 2018 Microsoft Corporation. All rights reserved. Clink v0.4.9 [git:2fd2c2] Copyright (c) 2012-2016 Martin Ridgers http://mridgers.github.io/clink

Python 3.6 Anaconda

D:\Machine Learning\deep_trader-master\deep_trader-master\tensor-reinforcement>python dqn_model.py C:\AnacondaPython3_6\DeepLearning_Udemy\lib\site-packages\h5py__init__.py:34: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type. from ._conv import register_converters as _register_converters C:\AnacondaPython3_6\DeepLearning_Udemy\lib\site-packages\sklearn\cross_validation.py:44: DeprecationWarning: This module was deprecated in version 0.18 in favor of the model_selection module into which all the refactored classes and functions are moved. Also note that the interface of the new CV iterators are different from that of this module. This module will be removed in 0.20. "This module will be removed in 0.20.", DeprecationWarning) Traceback (most recent call last): File "dqn_model.py", line 11, in from train_stock import File "D:\Machine Learning\deep_trader-master\deep_trader-master\tensor-reinforcement\train_stock.py", line 25, in x_train, x_test, y_train, y_test = train_test_split(data, supervised_y_data, test_size=0.10, random_state=123) File "C:\AnacondaPython3_6\DeepLearning_Udemy\lib\site-packages\sklearn\model_selection_split.py", line 1689, in train_test_split arrays = indexable(arrays) File "C:\AnacondaPython3_6\DeepLearning_Udemy\lib\site-packages\sklearn\utils\validation.py", line 206, in indexable check_consistent_length(*result) File "C:\AnacondaPython3_6\DeepLearning_Udemy\lib\site-packages\sklearn\utils\validation.py", line 177, in check_consistent_length lengths = [_num_samples(X) for X in arrays if X is not None] File "C:\AnacondaPython3_6\DeepLearning_Udemy\lib\site-packages\sklearn\utils\validation.py", line 177, in lengths = [_num_samples(X) for X in arrays if X is not None] File "C:\AnacondaPython3_6\DeepLearning_Udemy\lib\site-packages\sklearn\utils\validation.py", line 126, in _num_samples " a valid collection." % x) TypeError: Singleton array array(<map object at 0x00000190A1D75EF0>, dtype=object) cannot be considered a valid collection.

siddhartha-mukherjee-india commented 5 years ago

I am also similar error. Will be really thankful for any help.