Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion needed regarding creating simplified data analysis scripts with IMU data integration #627

Closed
xubowenhaoren opened this issue Mar 10, 2021 · 6 comments

Comments

@xubowenhaoren
Copy link
Contributor

xubowenhaoren commented Mar 10, 2021

In our previous email conversations and as indicated in issues #624 and #626, we face difficulties and challenges with generating the pre-defined trips and running the MobilityNet data analysis. Today my project admin suggested another approach: an API that provides a simplified IMU data integration with the E-mission data. This API should also serve as the foundational work for future research that fully integrates the IMU data into the e-mission motion prediction models.

Roughly in my view, this API should realistically be a Python/Jupyter data analysis notebook with the following requirements:

  1. Connects to an instance of the e-mission server
  2. Accepts a user UUID (e.g. email) and use it to fetch all processed trip data
  3. For each trip segment, fetch all corresponding IMU data from the SQLite phone UserCache
  4. Also for each trip segment, check and fetch user input ground truth.

Naturally, a prerequisite for this data analysis script is the correct trip segmentation (start/end detection). This is not in the scope of this data analysis script.

What I have already done: (Please note that the UI is not fully integrated yet)

  1. Allow the user to modify each trip segment on the "trip detail" page.
  2. Store the user input to the UserCache, and fetch any existing user input from the UserCache.

image
image

What I think I need to do to make this notebook working, especially for the requirements 1 and 2 above:

  • Either write the Python equivalent code for the e-mission server connection (rebuilding the wheel)
  • Or decouple the existing E-mission JS code and call them

My questions:

  • When you worked on the MobilityNet scripts, how did you get the server data to run analysis in Jupyter?
  • Is this plan easier than the "alternative plan" that I proposed here and in the email conversation?
@xubowenhaoren
Copy link
Contributor Author

I think I got it. After reading more in the e-mission-phone code (context), I now know how to send a POST request to get all trips of a given day.

Note this only works for the prompted auth login.

POST http://URL:PORT/timeline/getTrips/2021-03-01

{
    "user": "ACTUAL_USERNAME"
}

@shankari
Copy link
Contributor

@xubowenhaoren glad you figured it out.
The MobilityNet scripts do pull data from the server using a similar POST call
https://github.com/MobilityNet/mobilitynet-analysis-scripts/blob/master/emeval/input/spec_details.py#L18

you may have noticed that the MobilityNet server only supports skip login for this very reason.
If you don't have skip login, you can also dump individual user data using the scripts in bin/debug

@shankari
Copy link
Contributor

Naturally, a prerequisite for this data analysis script is the correct trip segmentation (start/end detection). This is not in the scope of this data analysis script.

IMHO, although classification is the standard ML problem in this space, segmentation is a critical prerequisite for it. Consider the features that you may want to use for mode classification - speed, start/end location etc.

If your segmentation is wrong, the input features to the training algorithm will also be wrong - e.g. instead of the speed of an auto segment being 50kmph, because of the bad segmentation that combines walk + auto, it may look like it is actually 25kmph. So your trained model will be wrong.

Training on wrong data -> Bad results

Just my opinion :)

@shankari
Copy link
Contributor

indicated in issues #624 and #626,

can you highlight again what these issues are:

@xubowenhaoren
Copy link
Contributor Author

indicated in issues #624 and #626,

can you highlight again what these issues are:

I added more tips regarding #626. However, due to a change of the plan, I won't continue working on #624 and #626 for the time being.

@xubowenhaoren
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants