Giter Site home page Giter Site logo

processmysteps's Introduction

ProcessMySteps

Backend for GatherMySteps

Running

The server is highly parameterable, use

python server.py --help

to get all the options.

Database access is not mandatory, however some functionalities may not work. You can set DB_NAME, DB_PASS, DB_HOST, DB_PORT and DB_NAME with environment variables. All of those must be set so that ProcessMySteps can connect with the database.

The start.sh starts a docker container with a valid database setup, and starts the server connected with it.

processmysteps's People

Contributors

ruipgil avatar

Stargazers

João Sardinha avatar

Watchers

James Cloos avatar  avatar  avatar  avatar

processmysteps's Issues

NotFittedError: This SGDClassifier instance is not fitted yet

run sh start.sh (without options):

env DB_PORT=$PMS_DOCKER_PORT DB_HOST=localhost DB_NAME=pmsteps DB_PASS=pmsteps DB_USER=pmsteps python server.py

go to http://ruipgil.com/GatherMySteps/ (or start locally)
fill out fields for input, destination, original, life

load GPX, see segmented timeline, press Continue

(1, array([], dtype=float64))
(256, [0, 1, 1, 4, 7, 10, 11, 12, 13])
[2018-08-25 00:10:01,539] ERROR in app: Exception on /next [POST]
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 2292, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1815, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1718, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1813, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1799, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "server.py", line 78, in next
    manager.process(payload)
  File "/Users/myuser/git/processmysteps/processmysteps/process_manager.py", line 375, in process
    result = self.adjust_to_annotate(track)
  File "/Users/myuser/git/processmysteps/processmysteps/process_manager.py", line 475, in adjust_to_annotate
    config['transportation']['min_time']
  File "/usr/local/lib/python2.7/site-packages/tracktotrip/track.py", line 124, in infer_transportation_mode
    segment.infer_transportation_mode(clf, min_time)
  File "/usr/local/lib/python2.7/site-packages/tracktotrip/segment.py", line 212, in infer_transportation_mode
    self.transportation_modes = speed_clustering(clf, self.points, min_time)
  File "/usr/local/lib/python2.7/site-packages/tracktotrip/transportation_mode.py", line 227, in speed_clustering
    info = classify(clf, points[from_index:to_index], min_time, from_index, to_index)
  File "/usr/local/lib/python2.7/site-packages/tracktotrip/transportation_mode.py", line 197, in classify
    [probs] = clf.predict([features], verbose=True)
  File "/usr/local/lib/python2.7/site-packages/tracktotrip/classifier.py", line 86, in predict
    probs = self.clf.predict_proba(features)
  File "/usr/local/lib/python2.7/site-packages/sklearn/linear_model/stochastic_gradient.py", line 761, in _predict_proba
    return self._predict_proba_lr(X)
  File "/usr/local/lib/python2.7/site-packages/sklearn/linear_model/base.py", line 282, in _predict_proba_lr
    prob = self.decision_function(X)
  File "/usr/local/lib/python2.7/site-packages/sklearn/linear_model/base.py", line 242, in decision_function
    "yet" % {'name': type(self).__name__})
NotFittedError: This SGDClassifier instance is not fitted yet
127.0.0.1 - - [25/Aug/2018 00:10:01] "POST /next HTTP/1.1" 500 -```

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.