Maxpregions model (Tabu)
The maxpregions model, devised by [Duque_Anselin_Rey2010] , clusters a set of geographic areas into the maximum number of homogeneous regions such that the value of a spatially extensive regional attribute is above a predefined threshold value. In clusterPy we measure heterogeneity as the withincluster sum of squares from each area to the attribute centroid of its cluster.
The maxpregions algorithm is composed of two main blocks:
There are three methods for local improvement: Greedy (execMaxpGreedy), Tabu (execMaxpTabu), and Simulated Annealing (execMaxpSa). A detailed explanation of each method can be found in Duque, Anselin and Rey (2010) [Duque_Anselin_Rey2010].
For this version, the tabu search algorithm will stop after max(10,N/maxP) nonimproving moves.
layer.cluster('maxpTabu',vars,<threshold>,<wType>,<std>,<maxit>,<tabuLength>,<typeTabu>,<dissolve>,<dataOperations>)
Parameters: 


The dictionary structure must be as showed bellow.
>>> X = {}
>>> X[variableName1] = [function1, function2,....]
>>> X[variableName2] = [function1, function2,....]
Where functions are strings which represents the name of the functions to be used on the given variableName. Functions could be,’sum’,’mean’,’min’,’max’,’meanDesv’,’stdDesv’,’med’, ‘mode’,’range’,’first’,’last’,’numberOfAreas. By deffault just ID variable is added to the dissolved map.
Self Organizing Map(SOM)
SOM is an unsupervised neural network proposed by [Kohonen1990] which adjust its weights to represent, on a regular lattice, a data set distribution.
In [Kohonen1990] the neighbourhood of the Best Matching Unit (BMU) is defined in a general form, but in this algorithm it could be any contiguity matrix available for a Layer object (rook, queen, custom).
The original algorithm is commonly used with the output network layer represented by a regular hexagonal or rectangular lattice. In clusterPy we use a rectangular regular lattice (see [Schimidt_Rey_Skupin2010] for the effects of using different output layer topologies in SOM). Finally, the adaptative parameter is taken from the scalar version suggested by [Kohonen1990].
Additionaly In ClusterPy we use contiguity based neighbourhood for the weights updating process. For more information see [Kohonen2001].
layer.cluster('som',vars,<nRows>,<nCols>,<wType>,<iters>,<alphaType>,<initialDistribution>,<wType>,<fileName>)
Parameters: 


IMPORTANT NOTE:
Since this algorithm does not guarantee spatial contiguity of the resulting regions, clusterPy does not provide the dissolve option. to obtain the solution vector you will need to export the layer with the command “Layer.exportArcData”. The exported shape file will have an additional variable with the solution vector (i.e., ID of the region to which the area has been assigned).
Geo Self Organizing Map(geoSOM)
GeoSOM is an unsupervised neural network proposed by [Bacao_Lobo_Painho2004] , which adjust his weights to represent, on a regular lattice, a data set distribution. The difference between the algorithm suggested by [Bacao_Lobo_Painho2004] and the suggested by [Kohonen1990] is that the first one uses the geographical location of the output network layer to organize the values given in the input Layer.
layer.cluster('geoSom',vars,nRows,nCols,<wType>,<iters>,<alphaType>,<initialDistribution>,<wType>,<fileName>)
Parameters: 


IMPORTANT NOTE:
Since this algorithm does not guarantee spatial contiguity of the resulting regions, clusterPy does not provide the dissolve option. to obtain the solution vector you will need to export the layer with the command “Layer.exportArcData”. The exported shape file will have an additional variable with the solution vector (i.e., ID of the region to which the area has been assigned).