esda.Spatial_Pearson¶
- class esda.Spatial_Pearson(connectivity=None, permutations=999)[source]¶
Global Spatial Pearson Statistic
- __init__(connectivity=None, permutations=999)[source]¶
Initialize a spatial pearson estimator
- Parameters
- connectivity: scipy.sparse matrix object
the connectivity structure describing the relationships between observed units. Will be row-standardized.
- permutations: int
the number of permutations to conduct for inference. if < 1, no permutational inference will be conducted.
- Attributes
- association_: numpy.ndarray (2,2)
array containg the estimated Lee spatial pearson correlation coefficients, where element [0,1] is the spatial correlation coefficient, and elements [0,0] and [1,1] are the “spatial smoothing factor”
- reference_distribution_: numpy.ndarray (n_permutations, 2,2)
distribution of correlation matrices for randomly-shuffled maps.
- significance_: numpy.ndarray (2,2)
permutation-based p-values for the fraction of times the observed correlation was more extreme than the simulated correlations.
Methods
__init__
([connectivity, permutations])Initialize a spatial pearson estimator
fit
(x, y)bivariate spatial pearson's R based on Eq.
get_params
([deep])Get parameters for this estimator.
set_params
(**params)Set the parameters of this estimator.