huang-xx / TrafficPredict

Pytorch implementation for "TrafficPredict: Trajectory Prediction for Heterogeneous Traffic-Agents"
109 stars 41 forks source link

Questions : preprocess #6

Open CHIH-CHIA opened 5 years ago

CHIH-CHIA commented 5 years ago

Hi, I have some doubts about the pre-processing part. Why does it want to multiply by two and then reduce one ( *2 - 1 ) at "frame_preprocess"? What is the relationship between this and normalization?

data[:, 3] = ( (data[:, 3] - min_position_x) / (max_position_x - min_position_x) ) 2 - 1 data[:, 4] = ( (data[:, 4] - min_position_y) / (max_position_y - min_position_y) ) 2 - 1

huang-xx commented 5 years ago

@CHIH-CHIA This step normalizes the date to the range of [-1,1]. You can also normalizes to the range of [0,1] if you want, there will be no significant difference in results.