hhofgwc {naspaclust}R Documentation

Fuzzy Geographicaly Weighted Clustering with Harris-Hawk Optimization

Description

Fuzzy clustering with addition of spatial configuration of membership matrix with centroid optimization using Harris-Hawk Algorithm.

Usage

hhofgwc(
  data,
  pop = NA,
  distmat = NA,
  ncluster = 2,
  m = 2,
  distance = "euclidean",
  order = 2,
  alpha = 0.7,
  a = 1,
  b = 1,
  error = 1e-05,
  max.iter = 100,
  randomN = 0,
  vi.dist = "uniform",
  nhh = 10,
  hh.alg = "heidari",
  A = c(2, 1, 0.5),
  p = 0.5,
  hh.same = 10,
  levy.beta = 1.5,
  update.type = 5
)

Arguments

data

an object of data with d>1. Can be matrix or data.frame. If your data is univariate, bind it with 1 to get a 2 columns.

pop

an n*1 vector contains population.

distmat

an n*n distance matrix between regions.

ncluster

an integer. The number of clusters.

m

degree of fuzziness or fuzzifier. Default is 2.

distance

the distance metric between data and centroid, the default is euclidean, see cdist for details.

order

minkowski order. default is 2.

alpha

the old membership effect with [0,1], if alpha equals 1, it will be same as fuzzy C-Means, if 0, it equals to neighborhood effect.

a

spatial magnitude of distance. Default is 1.

b

spatial magnitude of population. Default is 1.

error

error tolerance. Default is 1e-5.

max.iter

maximum iteration. Default is 500.

randomN

random seed for initialisation (if uij or vi is NA). Default is 0.

vi.dist

a string of centroid population distribution between 'uniform' (default) and 'normal'. Can be defined as vi.dist= in opt_param.

nhh

number of harris-hawk eagles. Can be defined as npar= in opt_param. Default is 10.

hh.alg

String between default is 'heidari' and default is 'bairathi'. The algorithm for HHO, Can be defined as algo in opt_param. default is 'heidari'.

A

a 3 vectors which represents initial energy and cut-off for exploitation and exploration. In opt_param, they can be defined as 'a1' for initial energy, 'a2' for exploitation cut-off and 'a3' for exploration cut-off respectively. default is c("a1"=2,"a2"=1,"a3"=0.5).

p

a real number between 0 and 1. The eagle's movement probability

hh.same

number of consecutive unchange to stop the iteration. Can be defined as same= in opt_param.

levy.beta

The skewness of levy flight. Can be defined as beta in opt_param. Default is 1.5

update.type

An integer. The type of energy A[1] update. Can be selected from 1 to 5. Can be defined as update.type in opt_param. Default is 5.

Details

Fuzzy Geographically Weighted Clustering (FGWC) was developed by Mason and Jacobson (2007) by adding neighborhood effects and population to configure the membership matrix in Fuzzy C-Means. Furthermore, the Harris-Hawk Optimization was developed by Bairathi and Gopalani (2018) and the technique is also upgraded by Heidari et al. (2019) by adding progressive rapid dives in order to get a more optimal solution of a certain complex function.

Value

an object of class 'fgwc'.
An 'fgwc' object contains as follows:

References

Bairathi D, Gopalani D (2018). “A Novel Swarm Intelligence Based Optimization Method: Harris' Hawk Optimization.” In Advances in Intelligent Systems and Computing, 832–842. Springer International Publishing. doi: 10.1007/978-3-030-16660-1_81, https://doi.org/10.1007/978-3-030-16660-1_81.

Heidari AA, Mirjalili S, Faris H, Aljarah I, Mafarja M, Chen H (2019). “Harris hawks optimization: Algorithm and applications.” Future Generation Computer Systems, 97, 849–872. doi: 10.1016/j.future.2019.02.028, https://doi.org/10.1016/j.future.2019.02.028.

Mason GA, Jacobson RD (2007). “Fuzzy Geographically Weighted Clustering.” In Proceedings of the 9th International Conference on Geocomputation, 1–7.

See Also

fpafgwc gsafgwc

Examples

data('census2010')
data('census2010dist')
data('census2010pop')
# First way
res1 <- hhofgwc(census2010,census2010pop,census2010dist,3,2,'euclidean',4,nhh=10)
# Second way
# initiate parameter
param_fgwc <- c(kind='v',ncluster=3,m=2,distance='minkowski',order=3,
               alpha=0.5,a=1.2,b=1.2,max.iter=1000,error=1e-6,randomN=10)
## tune the HHO parameter
hho_param <- c(vi.dist='normal',npar=5,same=15,algo='bairathi',a1=3,a2=1,a3=0.4)
##FGWC with HHO
res2 <- fgwc(census2010,census2010pop,census2010dist,'hho',param_fgwc,hho_param)

[Package naspaclust version 0.2.1 Index]