huiminren / mtrajrec Goto Github PK
View Code? Open in Web Editor NEWMap-Constrained Trajectory Recovery (KDD'21)
License: MIT License
Map-Constrained Trajectory Recovery (KDD'21)
License: MIT License
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?
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?
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.
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
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?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.