pygeoda.neighbor_match_test(geoda_obj, data, k, **kwargs)[source]

Local Neighbor Match Test The local neighbor match test is to assess the extent of overlap between k-nearest neighbors in geographical space and k-nearest neighbors in multi-attribute space.

  • geoda_obj (geoda) – An instance of geoda class.

  • data (list or dataframe) – A list of numeric vectors of selected variable or a data frame of selected variables e.g. guerry[[‘Crm_prs’, ‘Literacy’]]

  • k (int) – A positive integer number for k-nearest neighbors searching.

  • scale_method (str, optional) – One of the scaling methods {‘raw’, ‘standardize’, ‘demean’, ‘mad’, ‘range_standardize’, ‘range_adjust’} to apply on input data. Default is ‘standardize’ (Z-score normalization).

  • distance_method (str, optional) – The type of distance metrics used to measure the distance between input data. Options are {‘euclidean’, ‘manhattan’}. Default is ‘euclidean’.

  • power (float, optional) – The power (or exponent) of a number says how many times to use the number in a multiplication.

  • is_inverse (bool, optional) – FALSE (default) or TRUE, apply inverse on distance value.

  • is_arc (bool, optional) – FALSE (default) or TRUE, compute arc distance between two observations.

  • is_mile (bool, optional) TRUE (default) –


A dict with values for key “Cardinality” and “Probability”.

Return type