psofgwc {naspaclust}R Documentation

Fuzzy Geographicaly Weighted Clustering with Particle Swarm Optimization

Description

Fuzzy clustering with addition of spatial configuration of membership matrix with centroid optimization using Particle Swarm Algorithm.

Usage

psofgwc(
  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",
  npar = 10,
  vmax = 0.7,
  pso.same = 10,
  c1 = 0.49,
  c2 = 0.49,
  w.inert = "sim.annealing",
  wmax = 0.9,
  wmin = 0.4,
  map = 0.4
)

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.

npar

number of particles. Can be defined as npar= in opt_param. Default is 10.

vmax

maximum velocity to be tolerated. Can be defined as vmax in opt_param. Default is 0.7

pso.same

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

c1

Cognitive scaling parameters. Can be defined as c1= in opt_param. Default is 0.49

c2

Social scaling parameters. Can be defined as c2= in opt_param. Default is 0.49,

w.inert

The inertia weight update method between "constant", "chaotic", "sim.annealing", "nat.exponent1", "nat.exponent2" based on Bansal (2011). Can be defined as type= in opt_param. Default is 'sim.annealing'

wmax

Maximum inertia weight. Can be defined as wmax in opt_param. Default is 0.9.

wmin

Minimum inertia weight. Can be defined as wmin in opt_param. Default is 0.4.

map

Chaotic mapping parameter. Userful when w.inert='chaotic'. Can be defined as map in opt_param. Default is 0.4.

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 Particle Swarm Optimization was developed by Kennedy and Eberhart (1995) in order to get a more optimal solution of a certain complex function. PSO was also improved by Bansal et al. (2011) by modifying the inertia weight. FGWC using PSO has been implemented previously by some studies (Wijayanto and Purwarianti 2014; Putra and Kurniawan 2017; Abdussamad 2020).

Value

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

References

Abdussamad S (2020). “Evaluation of Implementation Context Based Clustering In Fuzzy Geographically Weighted Clustering-Particle Swarm Optimization Algorithm.” Jurnal EECCIS, 14(1), 10–15. ISSN 2460-8122, https://jurnaleeccis.ub.ac.id/index.php/eeccis/article/view/609.

Bansal JC, Singh PK, Saraswat M, Verma A, Jadon SS, Abraham A (2011). “Inertia Weight strategies in Particle Swarm Optimization.” In 2011 Third World Congress on Nature and Biologically Inspired Computing. doi: 10.1109/nabic.2011.6089659, https://doi.org/10.1109/nabic.2011.6089659.

Kennedy J, Eberhart R (1995). “Particle swarm optimization.” In Proceedings of ICNN'95 - International Conference on Neural Networks, volume 4, 1942–1948. doi: 10.1109/ICNN.1995.488968, https://doi.org/10.1109/ICNN.1995.488968.

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

Putra FH, Kurniawan R (2017). “Clustering for Disaster Areas Endemic Dengue Hemorrhagic Fever Based on Factors had Caused in East Java Using Fuzzy Geographically Weighted Clustering - Particle Swarm Optimization.” Jurnal Aplikasi Statistika \& Komputasi Statistik, 8(01), 27. ISSN 2615-1367.

Wijayanto AW, Purwarianti A (2014). “Improvement of fuzzy geographically weighted clustering using particle swarm optimization.” In 2014 International Conference on Information Technology Systems and Innovation (ICITSI), 7–12. ISBN 978-1-4799-6527-4.

See Also

fpafgwc gsafgwc

Examples

data('census2010')
data('census2010dist')
data('census2010pop')
# First way
res1 <- psofgwc(census2010,census2010pop,census2010dist,3,2,'minkowski',4,npar=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 PSO parameter
pso_param <- c(vi.dist='uniform',npar=15,
         vmax=0.8, pso.same=10, c1=0.7, c2=0.6, type='chaotic',
                     wmax=0.8,wmin=0.3,map=0.3)
##FGWC with PSO
res2 <- fgwc(census2010,census2010pop,census2010dist,'pso',param_fgwc,pso_param)

[Package naspaclust version 0.2.1 Index]