[英]How to compute RMSE between two GPS coordinates (latitude and longitude) in Python
早上好家伙,
我想计算两个 gps 坐标(纬度和经度)之间的 RMSE 误差。
你知道我是否以及如何将它应用于已知的坐标对吗?
使用 numpy 您可以对经度执行以下操作,对纬度执行相同操作。
import numpy as np
longitude = [1,2,3,4,5]
longitude_pred = [1.6,2.5,2.9,3,4.1]
MSE_longitude = np.square(np.subtract(longitude, longitude_pred)).mean()
RMSE_longitude = np.sqrt(MSE)
如果您的坐标是形状 [2, n] 的矩阵:
import numpy as np
long_lat = [[1,2,3,4,5], [1,2,3,4,5]]
long_lat_pred = [[1.6,2.5,2.9,3,4.1], [1.6,2.5,2.9,3,4.1]]
MSE_long_lat = np.square(np.subtract(long_lat, long_lat_pred)).mean(axis=1)
RMSE_long_lat = np.sqrt(MSE)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.