Skip to content

MBNP-107-Prepare-Data-to-Train-Model#6

Open
minhquanvus1 wants to merge 3 commits intomainfrom
MBNP-107-Stream-Data-ML
Open

MBNP-107-Prepare-Data-to-Train-Model#6
minhquanvus1 wants to merge 3 commits intomainfrom
MBNP-107-Stream-Data-ML

Conversation

@minhquanvus1
Copy link
Copy Markdown
Contributor

Hi everyone,

What?

  • I have implemented the function to prepare the data for trainining Machine Learning model, to complete Epic 2: Predict traffic state ahead of 10/15 minutes (for more background, see ticket: MBNP-107-Prepare the Training Data).

How

  • The Data needed to train ML model is: segment Id, and speed of bus on that segment. In order to know what segment the bus is running on at present, I follow Mr.Bách logic, which is to find the minimum distance between the current position of bus, and a particular point on a segment (I adjust a little bit to use Haversine formula to find distance between coordinates points), this segment Id is the segment that the bus is now running on.
  • Each incoming realtime data will be passed to this function, and return the segmentId of the segment that the bus is now running on, speed,...of the bus, all of which are encapsulated in the TrainingData object, and write to a .json file (or save to MongoDB)
  • The code is written in Java Spring Boot, and uses Apache Kafka to stream realtime data

Testing

  • I have used JUnit to write a unit test for the ConvertTimeStamp function to check if it does what is expected. Further testing is on the way

Please review my code to see if anything should be better

Thank you very much
Quan

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

Successfully merging this pull request may close these issues.

1 participant