pysal.explore.esda.
Moran_Local
(y, w, transformation='r', permutations=999, geoda_quads=False)[源代码]¶当地莫兰统计
参数: |
|
---|
笔记
有关技术详细信息,请参阅 [Ans95] .
实例
>>> import pysal.lib
>>> import numpy as np
>>> np.random.seed(10)
>>> w = pysal.lib.io.open(pysal.lib.examples.get_path("desmith.gal")).read()
>>> f = pysal.lib.io.open(pysal.lib.examples.get_path("desmith.txt"))
>>> y = np.array(f.by_col['z'])
>>> from pysal.explore.esda.moran import Moran_Local
>>> lm = Moran_Local(y, w, transformation = "r", permutations = 99)
>>> lm.q
array([4, 4, 4, 2, 3, 3, 1, 4, 3, 3])
>>> lm.p_z_sim[0]
0.24669152541631179
>>> lm = Moran_Local(y, w, transformation = "r", permutations = 99, geoda_quads=True)
>>> lm.q
array([4, 4, 4, 3, 2, 2, 1, 4, 2, 2])
注意:随机组件结果在架构中的值略有不同,因此结果已从doctest中删除,并将移动到以架构为条件的单元测试中。
属性: |
|
---|
方法
by_col \(df,cols[,w,inplace,pvalue,outvals]) |
在数据帧上计算Moran_局部统计的函数 |
calc |
__init__
(y, w, transformation='r', permutations=999, geoda_quads=False)[源代码]¶初始化自身。请参阅帮助(键入(self))以获得准确的签名。
方法
__init__ \(Y,W[,转换,…]) |
初始化自身。 |
by_col \(df,cols[,w,inplace,pvalue,outvals]) |
在数据帧上计算Moran_局部统计的函数 |
calc \(W,Z) |