pysal.explore.esda.
Moran_Local_Rate
(e, b, w, adjusted=True, transformation='r', permutations=999, geoda_quads=False)[源代码]¶调整了利率变量的本地Moran统计数据[assuncao1999]_
参数: |
|
---|
实例
>>> import pysal.lib
>>> import numpy as np
>>> np.random.seed(10)
>>> w = pysal.lib.io.open(pysal.lib.examples.get_path("sids2.gal")).read()
>>> f = pysal.lib.io.open(pysal.lib.examples.get_path("sids2.dbf"))
>>> e = np.array(f.by_col('SID79'))
>>> b = np.array(f.by_col('BIR79'))
>>> from pysal.explore.esda.moran import Moran_Local_Rate
>>> lm = Moran_Local_Rate(e, b, w, transformation = "r", permutations = 99)
>>> lm.q[:10]
array([2, 4, 3, 1, 2, 1, 1, 4, 2, 4])
>>> lm = Moran_Local_Rate(e, b, w, transformation = "r", permutations = 99, geoda_quads=True)
>>> lm.q[:10]
array([3, 4, 2, 1, 3, 1, 1, 4, 3, 4])
注意:随机组件结果在架构中的值略有不同,因此结果已从doctest中删除,并将移动到以架构为条件的单元测试中。
方法
by_col \(df,events,populations[,w,…]) |
在数据帧上计算Moran_本地速率统计的函数 |
calc |
__init__
(e, b, w, adjusted=True, transformation='r', permutations=999, geoda_quads=False)[源代码]¶初始化自身。请参阅帮助(键入(self))以获得准确的签名。
方法
__init__ \(E,B,W[,已调整,…]) |
初始化自身。 |
by_col \(df,events,populations[,w,…]) |
在数据帧上计算Moran_本地速率统计的函数 |
calc \(W,Z) |