You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! I tried to run the code but got some issues. Can you help me how to run the code. I am interested to work in this area. Version:
Python: Python 3.7.1
Scikit-learn : 0.23.2
Numpy: 1.19.2
Joblib: 0.17.0
Run command: python al.py --data data files data
I tried python al.py --data data also
The data file I'm using is the same file given in repository
Error:
Traceback (most recent call last):
File "al.py", line 566, in
main(sys.argv)
File "al.py", line 561, in main
train_model()
File "al.py", line 442, in train_model
cf.clf.fit(cf.data, cf.labels)
File "C:\Users\hp.conda\envs\tensorflow_env\lib\site-packages\sklearn\ensemble_forest.py", line 304, in fit
accept_sparse="csc", dtype=DTYPE)
File "C:\Users\hp.conda\envs\tensorflow_env\lib\site-packages\sklearn\base.py", line 432, in _validate_data
X, y = check_X_y(X, y, **check_params)
File "C:\Users\hp.conda\envs\tensorflow_env\lib\site-packages\sklearn\utils\validation.py", line 72, in inner_f
return f(**kwargs)
File "C:\Users\hp.conda\envs\tensorflow_env\lib\site-packages\sklearn\utils\validation.py", line 802, in check_X_y
estimator=estimator)
File "C:\Users\hp.conda\envs\tensorflow_env\lib\site-packages\sklearn\utils\validation.py", line 72, in inner_f
return f(**kwargs)
File "C:\Users\hp.conda\envs\tensorflow_env\lib\site-packages\sklearn\utils\validation.py", line 623, in check_array
"if it contains a single sample.".format(array))
ValueError: Expected 2D array, got 1D array instead:
array=[].
Reshape your data either using array.reshape(-1, 1) if your data has a single feature or array.reshape(1, -1) if it contains a single sample.
The error showing the data needs to be in 2D format. How to do that? Please help.
The text was updated successfully, but these errors were encountered:
I was able to reproduce your error and found where the issue was. The bugfix has been made and pushed to the repo. Please pull the latest version and it should start working properly.
Hi! I tried to run the code but got some issues. Can you help me how to run the code. I am interested to work in this area.
Version:
Python: Python 3.7.1
Scikit-learn : 0.23.2
Numpy: 1.19.2
Joblib: 0.17.0
Run command:
python al.py --data data files data
I tried python al.py --data data also
The data file I'm using is the same file given in repository
Error:
Traceback (most recent call last):
File "al.py", line 566, in
main(sys.argv)
File "al.py", line 561, in main
train_model()
File "al.py", line 442, in train_model
cf.clf.fit(cf.data, cf.labels)
File "C:\Users\hp.conda\envs\tensorflow_env\lib\site-packages\sklearn\ensemble_forest.py", line 304, in fit
accept_sparse="csc", dtype=DTYPE)
File "C:\Users\hp.conda\envs\tensorflow_env\lib\site-packages\sklearn\base.py", line 432, in _validate_data
X, y = check_X_y(X, y, **check_params)
File "C:\Users\hp.conda\envs\tensorflow_env\lib\site-packages\sklearn\utils\validation.py", line 72, in inner_f
return f(**kwargs)
File "C:\Users\hp.conda\envs\tensorflow_env\lib\site-packages\sklearn\utils\validation.py", line 802, in check_X_y
estimator=estimator)
File "C:\Users\hp.conda\envs\tensorflow_env\lib\site-packages\sklearn\utils\validation.py", line 72, in inner_f
return f(**kwargs)
File "C:\Users\hp.conda\envs\tensorflow_env\lib\site-packages\sklearn\utils\validation.py", line 623, in check_array
"if it contains a single sample.".format(array))
ValueError: Expected 2D array, got 1D array instead:
array=[].
Reshape your data either using array.reshape(-1, 1) if your data has a single feature or array.reshape(1, -1) if it contains a single sample.
The error showing the data needs to be in 2D format. How to do that? Please help.
The text was updated successfully, but these errors were encountered: