本文整理汇总了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])