CIA-Oceanix / TrAISformer

Pytorch implementation of TrAISformer---A generative transformer for AIS trajectory prediction (https://arxiv.org/abs/2109.03958).
Other
108 stars 37 forks source link

please define the input data variables #14

Closed khavernathy closed 1 year ago

khavernathy commented 1 year ago

Hi, I can see the input data is a list of dictionaries that contain

The N appears to be an arbitrary number of AIS transmissions for the history of an MMSI. What are the 6 float values specifically?

Could you please explain or point to the part of the paper that describes these inputs?

For example

>>> f = pickle.load(open(".../TrAISformer/data/ct_dma/ct_dma_test.pkl", "rb"))
>>> f[0]["traj"][0]
array([8.64908000e-02, 8.63617407e-01, 3.53333333e-01, 1.55555556e-01,
       1.55318019e+09, 2.09155000e+08])
khavernathy commented 1 year ago

It appears to be

lat
lon
SOG
COG
start time
end time

is that right? For a given MMSI, all of the "start time" and "end time" are the same, though.

khavernathy commented 1 year ago

I see also that

lat, lon, sog, and cod have been standardized, i.e. range = [0,1).

Could you specify how this was done?

dnguyengithub commented 1 year ago

Hello,

  1. The format of traj is [lat, log, sog, cog, unix_timestamp, mmsi]

  2. To scale the data, just do x_scaled = (x - x_min)/(x_max - x_min)

khavernathy commented 1 year ago

Many thanks. What is the x_max for sog? 30 knots? Sorry to bother so much, I just want to get it right. @dnguyengithub

dnguyengithub commented 1 year ago

Yes 30 knots

khavernathy commented 1 year ago

@dnguyengithub is the maximum course 72? (or 360?) for purposes of scaling 0->1. The code in config_trAISformer.py seems to suggest that it's 72.

    if dataset_name == "ct_dma": #==============================

        # When mode == "grad" or "pos_grad", sog and cog are actually dlat and 
        # dlon    
        lat_size = 250
        lon_size = 270
        sog_size = 30
        cog_size = 72
sontung2310 commented 1 year ago

@khavernathy Hi, do you get the answer for the maximum course? Does it 72 or 360? Thank you!