Code Monkey home page Code Monkey logo

trajminer's People

Contributors

arthurpaulino avatar falcaopetri avatar lucaspetry avatar stickler-ci avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

trajminer's Issues

Manhattan distance (adjusted)

For distances within cities, the Manhattan distance may be a more accurate approximation for trajectory lengths due to the rectangular shapes of the blocks.

There's a challenge, though: the streets may not be aligned with the x/y axes and the Manhattan distance would be distorted if computed without applying a rotation first.

Example: New York City

Notice how the components of the Manhattan distance would match the distance across the streets most of the times if we applied a counter-clockwise rotation of approximately 30ΒΊ on the image.

This could be done if the user provided a base vector, which indicates the direction of a straight line on the map. As default, the base vector could be simply (0, 1) (north).

Change similarity measures for better handling attribute thresholds and distance functions

It is not really straightforward to input thresholds, distance functions, and weights to similarity measures considering only the order of the attributes in the dataset. Some suggestions of improvement include:

  • Passing thresholds, distances, and weights as dictionaries, in which the keys are the attribute names;
  • Ignoring attributes for which no threshold/distance/weight has been given. Maybe a warning could be issued in this case, as there's a good chance that the user forgot to define something.

Example CSV

Hi! I am interested in using your library for analyzing animal trajectories. However, I haven't been able to load my trajectory CSVs using "CSVTrajectoryLoader". I suspect I am not loading a correctly formatted file. Could I see and example file you used to test the loader function?

Thank you for all your work in this library!

Implement trajectory segmentation utility

Implement utility for segmenting trajectories based on given columns:

  • Segment every time a value changes;
  • Define a threshold for the difference tolerated in the segmentation process.

Question about the repository

This repository looks cool :)

I'd love to participate and help, but it's kind of hard to understand what it's really about. Is it a collection of functions? A set of interconnected classes with a major purpose? How can your code help people, exactly?

Best regards.

TrajectorySegmenter does not work as expected

Tried to segment the Starkey dataset whenever the haversine distance between points was greater than 100m. After segmentation, the stats of the new dataset are wrong. For instance, the attribute count before segmenting was 6 (min, max, count), and after the min became 1 and the max 36.

Implement utility for filtering/preprocessing trajectories

Implement utility with features such as:

  • Remove duplicate trajectory points (e.g. equal attributes within a time interval);
  • Remove noise points based on different criteria (e.g. an abrupt speed increase);
  • Remove trajectories that are too short or too long;
  • Etc.

Create standard interface for filters and transformations

Currently, preprocessing tools do not follow a standard API. It would be a good practice to create a wrapper with methods like fit, transform, set_params, and make the appropriate changes to existing functions/objects.

Besides improving the code quality, a standard API for preprocessing tools makes it possible to design a pipeline for stacking transformations.

Optimize numpy calls

Calling numpy.function(obj) is usually slower than calling obj.function(), if possible. For instance:

$ python -m timeit -s "import numpy as np; m=np.ones((1000, 1000))" "np.transpose(m)"
500000 loops, best of 5: 419 nsec per loop
$ python -m timeit -s "import numpy as np; m=np.ones((1000, 1000))" "m.transpose()"
2000000 loops, best of 5: 128 nsec per loop

I was checking out your repo and I saw that you used the slower call a few times (e.g.: np.transpose). So I think you'd like to change those.

Implement persistence method for TrajectoryData

Implement a method (e.g. to_csv) for persisting TrajectoryData.
There could be methods for persisting data in other formats (e.g. json, kml, etc). Maybe it would be a good idea to create a method called to_file and have the data type passed as a parameter.

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.