Closed geli666 closed 1 year ago
What data type is your X_train
? Can you recreate the issue with something small and self contained?
What data type is your
X_train
? Can you recreate the issue with something small and self contained?
thank you for help! I have recreated the issue.
So your X is just a list of arrays? That won't work. You need y to be a one dimensional array and X to be two dimensional.
Thank you for help! Because I reset operator so that the model could accept the 3-dimensional data through adding a cycle. Therefore, for the first error I faced, could I change the type of data in gplearn/_program.py directly?
It's not something that supported out of the box, so yes, you would have to change the source code.
It's not something that supported out of the box, so yes, you would have to change the source code. Thank you for your assistance with this matter!
Describe the bug
if I set the parameter--const_range as (-1.0,1.0), then when I use mdl.fit(X_train, y_train.values), a error appeared(AttributeError: 'list' object has no attribute 'shape'). """ Traceback (most recent call last): File "/opt/anaconda3/lib/python3.8/site-packages/joblib/externals/loky/process_executor.py", line 436, in _process_worker r = call_item() File "/opt/anaconda3/lib/python3.8/site-packages/joblib/externals/loky/process_executor.py", line 288, in __call__ return self.fn(*self.args, **self.kwargs) File "/opt/anaconda3/lib/python3.8/site-packages/joblib/_parallel_backends.py", line 595, in __call__ return self.func(*args, **kwargs) File "/opt/anaconda3/lib/python3.8/site-packages/joblib/parallel.py", line 262, in __call__ return [func(*args, **kwargs) File "/opt/anaconda3/lib/python3.8/site-packages/joblib/parallel.py", line 262, inActual behavior
Steps to reproduce the behavior
System information
Linux-5.14.15-1.el8.elrepo.x86_64-x86_64-with-glibc2.10 Python 3.8.3 (default, Jul 2 2020, 16:21:59) [GCC 7.3.0] NumPy 1.19.3 SciPy 1.6.3 Scikit-Learn 0.24.2 Joblib 1.1.0 gplearn 0.4.1