pygeoda.Weight

class pygeoda.Weight(gda_w)[source]

GeoDa Weight class

__init__(gda_w)[source]

Constructor of Weight class.

Parameters

gda_w (Object) – A libgeoda GeoDaWeight pointer

Methods

__init__(gda_w)

Constructor of Weight class.

get_neighbors(idx)

Get neighbors of idx-th observation

has_isolates()

Check if any observation has no neighbors

is_symmetric()

Check if weights matrix is symmetric

max_neighbors()

Get the maximum number of neighbors

mean_neighbors()

Get the mean number of neighbors

median_neighbors()

Get the median number of neighbors

min_neighbors()

Get minmum number of neighbors

save_weights(out_path, layer_name, id_name, …)

Save current spatial weights to a file.

spatial_lag(values)

Compute spatial lagged values for values of selected variable

weights_sparsity()

Get sparsity computed from weights matrix

weights_type()

Get Weights type