oraclesai.weights.SpatialWeights

class SpatialWeights(w: W, definition: SpatialWeightsDefinition = None)
A SpatialWeights instance represents a spatial weights matrix calculated for some data

and a spatial neighboring relationship specified by an instance of SpatialWeightsDefinition.

Methods

__init__(w[, definition])

as_pysal_weights()

Convert the current SpatialWeight object to its pysal representation

create(data, sw_def)

Computes a SpatialWeights object for the given data.

from_pysal_weights(w)

Creates a SpatialWeight object from an existing pysal weights object

Attributes

definition

The class:oraclesai.weights.SpatialWeightsDefinition that describes the current spatial weights

neighbors

A dictionary containing the list of neighbors' indexes for each observation

weights

A dictionary containing the weights for each sample