fgwc | R Documentation |
Fuzzy clustering with addition of spatial configuration of membership matrix
fgwc(data, pop, distmat, algorithm = "classic", fgwc_param, opt_param)
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. |
algorithm |
algorithm used for FGWC |
fgwc_param |
a vector that consists of FGWC parameter (see |
opt_param |
a vector that consists of optimization algorithm parameter (see |
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. There are seven optimisation algorithms that currently provided in this package, mainly from the \insertCiteyang2014;textualnaspaclust. The optimization algorithm uses the centroid as the parameter to be optimized. Here are the algorithm that can be used:
"classic"
- The classical algorithm of FGWC based on \insertCitefgwc;textualnaspaclust for centroid optimisation
and \insertCiteRunkler2006;textualnaspaclust for membership optimization.
"abc"
- Optimization using artificial bee colony algorithm based on \insertCiteKaraboga2007;textualnaspaclust
\insertCite@see also @fgwcabc1 and @fgwcabc2 for FGWC implementationnaspaclust.
"fpa"
- Optimization using flower pollination algorithm based on \insertCiteYang2012naspaclust.
"gsa"
- Optimization using gravitational search algorithm based on \insertCiterashedi2009;textualnaspaclust and
\insertCiteLi2017gsa;textualnaspaclust \insertCite@see also @fgwcgsa for FGWC implementationnaspaclust.
"hho"
- Optimization using harris-hawk optimization with "heidari"
\insertCiteHeidari2019naspaclust (default).
and "bairathi"
\insertCiteBairathi2018naspaclust.
"ifa"
- Optimization using intelligent firefly algorithm based on \insertCiteYang2009;textualnaspaclust,
as well as the intelligent improvement by \insertCiteintfa;textualnaspaclust \insertCite@see also @Nasution2020 for FGWC implementationnaspaclust.
"pso"
- Optimization using particle swarm optimization based on \insertCiteRunkler2006;textualnaspaclust and
\insertCiteBansal2011;textualnaspaclust for inertia option \insertCite@see also @fgwcpso; @putra2017 for FGWC implementationnaspaclust.
"tlbo"
- Optimization using teaching - learning based optimization based on \insertCiteRao2012;textualnaspaclust and
elitism improvement by \insertCiteRao2012b;textualnaspaclust.
Furthermore, there are 10 distance that can be used to calculate the membership (see cdist
for details).
the default parameter of FGWC (in case you do not want to tune anything) is
c(kind='u',ncluster=2,m=2,distance='euclidean',order=2,alpha=0.7,a=1,b=1,
max.iter=500,error=1e-5,randomN=1)
.
There is also a universal parameter to the optimization algorithm as well as the details. The default parameter
for the optimization algorithm is
c(vi.dist='uniform',npar=10,par.no=2,par.dist='euclidean',par.order=2,pso=TRUE,
same=10,type='sim.annealing',ei.distr='normal',vmax=0.7,wmax=0.9,wmin=0.4,
chaos=4,x0='F',map=0.7,ind=1,skew=0,sca=1)
If you do not define a certain parameter, the parameter will be set to its default value
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.
fgwcuv
, abcfgwc
, fpafgwc
,
gsafgwc
, hhofgwc
, ifafgwc
, psofgwc
, tlbofgwc
data('census2010')
data('census2010dist')
data('census2010pop')
# 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)
## FGWC with classical algorithm
res1 <- fgwc(census2010,census2010pop,census2010dist,'classic',param_fgwc,1)
## tune the ABC parameter
abc_param <- c(vi.dist='normal',npar=5,pso=FALSE,same=15,n.onlooker=5,limit=5)
## FGWC with ABC optimization algorithm
res2 <- fgwc(census2010,census2010pop,census2010dist,'abc',param_fgwc,abc_param)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.