Max-p
The max-p-region problem is a special case of constrained clustering where a finite number of geographical areas are aggregated into the maximum number of regions (max-p-regions), such that each region is geographically connected and the clusters could maximize internal homogeneity.
maxpGreedy()
A simulated annealing algorithm to solve the max-p-region problem
Arguments
Name | Type | Description |
| WeightsResult | The weights object |
| Array | The list of numeric vectors of selected variable. |
| Number | The number of iterations of greedy algorithm. Defaults to 1. |
| Array | The list of numeric array of selected minimum bounding variables. |
| Array | The list of minimum value that the sum value of bounding variables in each cluster should be greater than. |
| Array | The list of numeric array of selected maximum bounding variables. |
| Array | The list of minimum value that the sum value of bounding variables in each cluster should be less than. |
| String | The scaling methods {'raw', 'standardize', 'demean', 'mad', 'range_standardize', 'range_adjust'}. Defaults to 'standardize'. |
| String | The distance methods {"euclidean", "manhattan"}. Defaults to 'euclidean'. |
| 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):
maxpSA()
A simulated annealing algorithm to solve the max-p-region problem
Arguments
Name | Type | Description |
| WeightsResult | The weights object |
| Array | The list of numeric vectors of selected variable. |
| Number | The cooling rate of a simulated annealing algorithm. Defaults to 0.85 |
| Number | The number of iterations of simulated annealing. Defaults to 1 |
| Number | The number of iterations of greedy algorithm. Defaults to 1. |
| Array | The list of numeric array of selected minimum bounding variables. |
| Array | The list of minimum value that the sum value of bounding variables in each cluster should be greater than. |
| Array | The list of numeric array of selected maximum bounding variables. |
| Array | The list of minimum value that the sum value of bounding variables in each cluster should be less than. |
| String | The scaling methods {'raw', 'standardize', 'demean', 'mad', 'range_standardize', 'range_adjust'}. Defaults to 'standardize'. |
| String | The distance methods {"euclidean", "manhattan"}. Defaults to 'euclidean'. |
| Number | The seed for random number generator. |
Return
Type | Description |
ClusteringResult | The Clustering object: {'total_ss', 'within_ss', 'between_ss', 'ratio', 'clusters'} |
maxpTabu()
A simulated annealing algorithm to solve the max-p-region problem
Arguments
| WeightsResult | The weights object |
| Array | The list of numeric vectors of selected variable. |
| Number | The length of a tabu search heuristic of tabu algorithm. Defaults to 10. |
| Number | The number of non-improving moves. Defaults to 10. |
| Number | The number of iterations of greedy algorithm. Defaults to 1. |
| Array | The list of numeric array of selected minimum bounding variables. |
| Array | The list of minimum value that the sum value of bounding variables in each cluster should be greater than. |
| Array | The list of numeric array of selected maximum bounding variables. |
| Array | The list of minimum value that the sum value of bounding variables in each cluster should be less than. |
| String | The scaling methods {'raw', 'standardize', 'demean', 'mad', 'range_standardize', 'range_adjust'}. Defaults to 'standardize'. |
| String | The distance methods {"euclidean", "manhattan"}. Defaults to 'euclidean'. |
| Number | The seed for random number generator. |
Return
Type | Description |
ClusteringResult | The Clustering object: {'total_ss', 'within_ss', 'between_ss', 'ratio', 'clusters'} |
Last updated