GithubHelp home page GithubHelp logo

huiminren / mtrajrec Goto Github PK

View Code? Open in Web Editor NEW
48.0 2.0 24.0 6.6 MB

Map-Constrained Trajectory Recovery (KDD'21)

License: MIT License

Python 100.00%
kdd21 multi-task-learning seq2seq trajectory-interpolation

mtrajrec's Issues

how to use the results

i use the code python multi_main.py,then get 3 files in the data/. ,and get 1 file in the results/. ,but now i don't know how to use those files, can you tell me the way to use them? 3q

Hour feature has some problem

In datasets.py file, def get_pro_features function

    def get_pro_features(self, ds_pt_list, hours, weather_dict):
        holiday = is_holiday(ds_pt_list[0].time)*1
        day = ds_pt_list[0].time.day
        # TODO: check hour data have some questions,
        hour = {'hour': np.bincount(hours).max()}  # find most frequent hours as hour of the trajectory
        weather = {'weather': weather_dict[(day, hour['hour'])]}
        features = self.one_hot(hour) + self.one_hot(weather) + [holiday]
        return features

I thought you mean get the frequent hours as hour of the trajectory, just like if I have hours = [12,12,12,12,13], the hour=12 but the code

hour = {'hour': np.bincount(hours).max()}  # find most frequent hours as hour of the trajectory

seems to get the number of the frequent hours, i.e. hour=4, not the hour.

So, I wanna know is my understanding correct, or is it other meaning?

get_rid_grid function seems incomplete

Please note that the code of "get_rid_grid" in models_utils.py is incomplete, and the part that calculates the grid cell indices for the intermediate coordinates is missing. Additionally, the calculated mid_xid and mid_yid values are not used anywhere in the code, so this part of the code would need to be completed and integrated into the rest of the logic to correctly handle the intermediate grid cells between two consecutive points.

a little confusion about train and evaluate

In the train process and evaluate process,epoch_train_id_loss is calculated.But in train id_loss calculate is epoch_train_id_loss = loss_train_ids.item(),while in evaluate is epoch_train_id_loss += loss_train_ids.item().How is this difference produced?

About the sample data

In the sample data provided, the longitude and latitude of the trajectory data used for training is not within the latitude and longitude range of the road network data. Could you provide the matched data?

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.