Git Product home page Git Product logo

al-smarthome's People

Contributors

bminor-wsu avatar cppbari avatar dianejcookwsu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

al-smarthome's Issues

Getting error while running the code al.py

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.