I'm trying to create a classifier to distinguish different boats by their trajectories. I have training data of the longitude and latitude of a boat and time in seconds.

Vessels like a ferry will have a straight predictable trajectory between two points, whereas fishing vessels can have zig-zag like trajectories for example.

My initial approach is to create features for example the mean speed, standard deviation of the speed, standard deviation on the course, such that each trajectory table is distilled into 1 row of features. Then I can train something like a random forest classifier on these rows.

Is this a good approach, any other suggestions that could account for the characteristic trajectory shapes.


  • $\begingroup$ Are there other types of vessels in your dataset? Otherwise, ferry and fishing boats are easy to distinguish as the first one goes from A to B while the second return to A. (BTW, AIS data and the like generally give you the type of vessels?) $\endgroup$
    – tagoma
    Sep 4, 2017 at 18:16
  • $\begingroup$ Yes there are more types. I'm actually most interested in classifying the different fishing vessels $\endgroup$ Sep 4, 2017 at 18:27
  • $\begingroup$ If you want to use a classifical model, search for "trajectory classification" or even "gait recognition" to get ideas for features. If you want to learn the features with a modern model, try a seq2seq RNN. $\endgroup$
    – Emre
    Sep 6, 2017 at 6:04

1 Answer 1


Your data contains spatial and temporal data, which means that you can account for location and speed.

Not sure how global the coordinates are, but perhaps grouping them per region might be interesting. It would be like putting all coordinates that you're given and defining zones of interests (zone A, B, C, etc.). Perhaps, some boats only sail in specific regions. Indeed, yachts might be found more often in the Caribbeans than in the Arctic sea. Of course, the number of zones you want to define needs to be fine-tuned.

Assuming that your data accounts for an entire trip from port A to B, you could, of course, use the length of the journey as a feature, as I'm assuming that not all boats travel the same distances. You could also use the overall direction of the trip as the angle between port A and port B.

You've already accounted for speed by computing the mean, standard deviation, and other metrics. What you could also do is fit a polynomial of the speed, and use its coefficients as features. Perhaps certain boats have a more steady speed than other boats.

Following the same thought, you could perhaps fit a polynomial describing the course of each boat and use its coefficients as features. View the course here as the change of angle. This should capture how much "zig zagging" a boat does. Of course, you'll need to fine-tune to pick the right polynomial.

Good luck!


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.