pygeoda.kernel_weights(geoda_obj, bandwidth, kernel, **kwargs)[source]

Distance-based Kernel Spatial Weights Create a kernel weights by specifying a bandwidth and a kernel method

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

  • bandwidth (float) – A float value represents the distance of bandwidth used in kernel function. For example, one can use the pygeoda.min_distthreshold() to get a distance that guarantees that every observation has at least 1 neighbor.

  • kernel (str) – A string value, which has to be one of {‘triangular’, ‘uniform’, ‘epanechnikov’, ‘quartic’, ‘gaussian’}

  • use_kernel_diagonals (bool, optional) – A bool flag indicates whether or not the lower order neighbors should be included in the weights structure. Defaults to False.

  • is_inverse (bool, optional) – A bool flag indicates whether or not to apply inverse on distance value. Defaults to False.

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

  • is_arc (bool, optional) – A bool flag indicates if compute arc distance or Euclidean distance. Defaults to False (Euclidean distance)

  • is_mile (bool, optional) – A bool flag indicates if the distance unit is mile or km. Defaults to True (mile).


An instance of Weight class

Return type