kootenpv / whereami

Uses WiFi signals :signal_strength: and machine learning to predict where you are
GNU Affero General Public License v3.0
5.12k stars 246 forks source link

(Python 2.7) predict_proba throws AttributeError #2

Closed rfilmyer closed 8 years ago

rfilmyer commented 8 years ago

Running OS X El Capitan (10.11.6), Python 2.7.11, whereami 0.1.17

predict works properly, but predict_proba makes the calculations (which I can tell because it takes a few seconds) and then throws an AttributeError.

Rogers-MacBook-Air:~ roger$ whereami predict_proba
Traceback (most recent call last):
  File "/Users/roger/anaconda/bin/whereami", line 11, in <module>
    sys.exit(main())
  File "/Users/roger/anaconda/lib/python2.7/site-packages/whereami/__main__.py", line 10, in main
    predict_proba()
  File "/Users/roger/anaconda/lib/python2.7/site-packages/whereami/predict.py", line 9, in predict_proba
    print({x: y for x, y in zip(lp.clf.classes_, lp.predict_proba(sample())[0])})
AttributeError: 'Pipeline' object has no attribute 'clf'
rfilmyer commented 8 years ago

Update: I see you were able to reproduce the bug?

kootenpv commented 8 years ago

It should have been fixed by now. Please give the latest version a try, 0.1.20 (or higher). pip install -U --no-cache whereami

Still thanks for posting!

rfilmyer commented 8 years ago

Yep, fixed!