本文整理匯總了Python中nupic.encoders.geospatial_coordinate.GeospatialCoordinateEncoder.coordinateForPosition方法的典型用法代碼示例。如果您正苦於以下問題:Python GeospatialCoordinateEncoder.coordinateForPosition方法的具體用法?Python GeospatialCoordinateEncoder.coordinateForPosition怎麽用?Python GeospatialCoordinateEncoder.coordinateForPosition使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類nupic.encoders.geospatial_coordinate.GeospatialCoordinateEncoder
的用法示例。
在下文中一共展示了GeospatialCoordinateEncoder.coordinateForPosition方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: testCoordinateForPosition3D
# 需要導入模塊: from nupic.encoders.geospatial_coordinate import GeospatialCoordinateEncoder [as 別名]
# 或者: from nupic.encoders.geospatial_coordinate.GeospatialCoordinateEncoder import coordinateForPosition [as 別名]
def testCoordinateForPosition3D(self):
scale = 30 # meters
encoder = GeospatialCoordinateEncoder(scale, 60)
coordinate = encoder.coordinateForPosition(
-122.229194, 37.486782, 1500
)
self.assertEqual(coordinate.tolist(), [-90102, -142918, 128710])
示例2: testCoordinateForPosition
# 需要導入模塊: from nupic.encoders.geospatial_coordinate import GeospatialCoordinateEncoder [as 別名]
# 或者: from nupic.encoders.geospatial_coordinate.GeospatialCoordinateEncoder import coordinateForPosition [as 別名]
def testCoordinateForPosition(self):
scale = 30 # meters
encoder = GeospatialCoordinateEncoder(scale, 60)
coordinate = encoder.coordinateForPosition(
-122.229194, 37.486782
)
self.assertEqual(coordinate.tolist(), [-453549, 150239])
示例3: testCoordinateForPositionOrigin3D
# 需要導入模塊: from nupic.encoders.geospatial_coordinate import GeospatialCoordinateEncoder [as 別名]
# 或者: from nupic.encoders.geospatial_coordinate.GeospatialCoordinateEncoder import coordinateForPosition [as 別名]
def testCoordinateForPositionOrigin3D(self):
scale = 1 # meters
encoder = GeospatialCoordinateEncoder(scale, 60)
coordinate = encoder.coordinateForPosition(0,0,0)
# see WGS80 defining parameters (semi-major axis) on
# http://en.wikipedia.org/wiki/Geodetic_datum#Parameters_for_some_geodetic_systems
self.assertEqual(coordinate.tolist(), [6378137, 0, 0])
示例4: testCoordinateForPositionOrigin
# 需要導入模塊: from nupic.encoders.geospatial_coordinate import GeospatialCoordinateEncoder [as 別名]
# 或者: from nupic.encoders.geospatial_coordinate.GeospatialCoordinateEncoder import coordinateForPosition [as 別名]
def testCoordinateForPositionOrigin(self):
scale = 30 # meters
encoder = GeospatialCoordinateEncoder(scale, 60)
coordinate = encoder.coordinateForPosition(0, 0)
self.assertEqual(coordinate.tolist(), [0, 0])