deep_trader icon indicating copy to clipboard operation
deep_trader copied to clipboard

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

Open GenesisGupta opened this issue 6 years ago • 1 comments

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.

GenesisGupta avatar Oct 22 '18 11:10 GenesisGupta

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