我有来自 GPS 的数据,格式为
1.('latitude', 'longitude','Timestamp').
2.('latitude', 'longitude','Timestamp').
3.('latitude', 'longitude','Timestamp').
我正在将此数据更改为以下形式
'latitude_1', 'longitude_1', 'Timestamp_1', 'latitude_2', 'longitude_2', 'Timestamp_2, Timestamp_2-Timestamp_1.
使用这种格式,我正在训练一个LinearRegressionWithSGD
spark 模型,其中 labelTimestamp_2-Timestamp_1
和 features 是latitude_1, longitude_1, latitude_2, longitude_2
。
但是当我给出 Origin(纬度和经度)和目的地(纬度和经度)时,结果非常糟糕。
请指导我这种方法是否正确?如果没有,那么如何从给定的数据构建预测模型来进行预测Estimated Time of Arrival
。