psofgwc | R Documentation |
Fuzzy clustering with addition of spatial configuration of membership matrix with centroid optimization using Particle Swarm Algorithm.
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
)
data |
an object of data with d>1. Can be |
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 |
order |
minkowski order. default is 2. |
alpha |
the old membership effect with [0,1], if |
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 |
npar |
number of particles. Can be defined as |
vmax |
maximum velocity to be tolerated. Can be defined as |
pso.same |
number of consecutive unchange to stop the iteration. Can be defined as |
c1 |
Cognitive scaling parameters. Can be defined as |
c2 |
Social scaling parameters. Can be defined as |
w.inert |
The inertia weight update method between |
wmax |
Maximum inertia weight. Can be defined as |
wmin |
Minimum inertia weight. Can be defined as |
map |
Chaotic mapping parameter. Userful when |
Fuzzy Geographically Weighted Clustering (FGWC) was developed by \insertCitefgwc;textualnaspaclust by adding neighborhood effects and population to configure the membership matrix in Fuzzy C-Means. Furthermore, the Particle Swarm Optimization was developed by \insertCiteKennedy1995;textualnaspaclust in order to get a more optimal solution of a certain complex function. PSO was also improved by \insertCiteBansal2011;textualnaspaclust by modifying the inertia weight. FGWC using PSO has been implemented previously by some studies \insertCitefgwcpso,putra2017naspaclust.
an object of class 'fgwc'
.
An 'fgwc'
object contains as follows:
converg
- the process convergence of objective function
f_obj
- objective function value
membership
- membership matrix
centroid
- centroid matrix
validation
- validation indices (there are partition coefficient (PC
), classification entropy (CE
),
SC index (SC
), separation index (SI
), Xie and Beni's index (XB
), IFV index (IFV
), and Kwon index (Kwon))
max.iter
- Maximum iteration
cluster
- the cluster of the data
finaldata
- The final data (with the cluster)
call
- the syntax called previously
time
- computational time.
fpafgwc
gsafgwc
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.