AZP

The automatic zoning procedure (AZP) was initially outlined in Openshaw (1977) as a way to address some of the consequences of the modifiable areal unit problem (MAUP). In essence, it consists of a heuristic to find the best set of combinations of contiguous spatial units into p regions, minimizing the within sum of squares as a criterion of homogeneity. The number of regions needs to be specified beforehand.

azpGreedy()

A simulated annealing algorithm to solve the AZP problem

function azpGreedy(
    WeightResult w,
    Number k, 
    Array vals,
    Number inits,
    Array init_region,
    Array min_bound_values, 
    Array min_bounds,
    Array max_bound_values, 
    Array max_bounds,
    String scale_method,
    String distance_type,
    Number seed)

Arguments

Name

Type

Description

weights

WeightsResult

The weights object WeightsResult

k

Number

The number of spatially constrained clusters

vals

Array

The list of numeric vectors of the selected variable.

inits

Number

The number of construction re-runs, which is for ARiSeL "automatic regionalization with initial seed location"

init_region

Array

The initial regions that the local search starts with. Default is empty. means the local search starts with a random process to "grow" clusters

min_bounds_values

Array

The list of numeric array of selected minimum bounding variables.

min_bounds

Array

The list of minimum values that the sum value of bounding variables in each cluster should be greater than.

max_bounds_values

Array

The list of numeric arrays of selected maximum bounding variables.

max_bounds

Array

The list of minimum value that the sum value of bounding variables in each cluster should be less than.

scale_method

String

The scaling methods {'raw', 'standardize', 'demean', 'mad', 'range_standardize', 'range_adjust'}. Defaults to 'standardize'.

distance_method

String

The distance methods {"euclidean", "manhattan"}. Defaults to 'euclidean'.

seed

Number

The seed for random number generator.

Return

Type

Description

ClusteringResult

The Clustering object: {'total_ss', 'within_ss', 'between_ss', 'ratio', 'clusters'}

Examples

Try it yourself in the playground (jsgeoda + deck.gl):

azpSA()

A simulated annealing algorithm to solve the AZP problem

Arguments

Name

Type

Description

weights

WeightsResult

The weights object WeightsResult

k

Number

The number of spatially constrained clusters

vals

Array

The list of numeric vectors of selected variable.

cooling_rate

Number

The number of iterations of simulated annealing. Defaults to 1

sa_maxit

Number

The number of iterations of simulated annealing. Defaults to 1

inits

Number

The number of construction re-runs, which is for ARiSeL "automatic regionalization with initial seed location"

init_region

Array

The initial regions that the local search starts with. Default is empty. means the local search starts with a random process to "grow" clusters

min_bounds_values

Array

The list of numeric array of selected minimum bounding variables.

min_bounds

Array

The list of minimum value that the sum value of bounding variables in each cluster should be greater than.

max_bounds_values

Array

The list of numeric array of selected maximum bounding variables.

max_bounds

Array

The list of minimum value that the sum value of bounding variables in each cluster should be less than.

scale_method

String

The scaling methods {'raw', 'standardize', 'demean', 'mad', 'range_standardize', 'range_adjust'}. Defaults to 'standardize'.

distance_method

String

The distance methods {"euclidean", "manhattan"}. Defaults to 'euclidean'.

seed

Number

The seed for random number generator.

Return

Type

Description

ClusteringResult

The Clustering object: {'total_ss', 'within_ss', 'between_ss', 'ratio', 'clusters'}

azpTabu()

A tabu algorithm to solve the AZP problem

Arguments

Name

Type

Description

weights

WeightsResult

The weights object WeightsResult

k

Number

The number of spatially constrained clusters

values

Array

The list of numeric vectors of selected variable.

tabu_length

Number

The length of a tabu search heuristic of tabu algorithm. Defaults to 10.

conv_tabu

Number

The number of non-improving moves. Defaults to 10.

inits

Number

The number of construction re-runs, which is for ARiSeL "automatic regionalization with initial seed location"

init_region

Array

The initial regions that the local search starts with. Default is empty. means the local search starts with a random process to "grow" clusters

min_bounds_values

Array

The list of numeric array of selected minimum bounding variables.

min_bounds

Array

The list of minimum value that the sum value of bounding variables in each cluster should be greater than.

max_bounds_values

Array

The list of numeric array of selected maximum bounding variables.

max_bounds

Array

The list of minimum value that the sum value of bounding variables in each cluster should be less than.

scale_method

String

The scaling methods {'raw', 'standardize', 'demean', 'mad', 'range_standardize', 'range_adjust'}. Defaults to 'standardize'.

distance_method

String

The distance methods {"euclidean", "manhattan"}. Defaults to 'euclidean'.

seed

Number

The seed for random number generator.

Return

Type

Description

ClusteringResult

The Clustering object: {'total_ss', 'within_ss', 'between_ss', 'ratio', 'clusters'}

Last updated

Was this helpful?