The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.

Introduction to fcmTFN

Introduction

The fcmTFN function extends the fuzzy c-means algorithm to handle ordinal data through a triangular fuzzy number (TFN) representation.

Example Dataset

data(sim_likert7)

head(sim_likert7)
#>   Q1 Q2 Q3 Q4 Q5 Q6 Q7 Q8 Q9 Q10 Q11 Q12
#> 1  2  2  3  2  2  3  2  1  2   2   2   2
#> 2  2  2  2  3  2  1  2  2  2   2   2   2
#> 3  2  1  2  2  2  3  2  2  2   2   2   2
#> 4  2  2  2  2  2  2  1  3  2   2   2   2
#> 5  2  2  2  2  2  3  2  3  1   2   2   2
#> 6  2  2  2  2  2  2  2  2  2   3   2   1

Running the Clustering Algorithm

result <- fcmTFN(
  data = sim_likert7,
  option = "B",
  k_values = 2:6
)
#> Running k = 2 
#> Running k = 3 
#> Running k = 4 
#> Running k = 5 
#> Running k = 6

summary(result)
#> 
#> Fuzzy C-Means Clustering for TFN
#> ---------------------------------
#> 
#> Optimal number of clusters (k):  3 
#> 
#> Weights:
#> wc = 0.61997 
#> ws = 0.38003 
#> 
#> Iterations: 11 
#> 
#> Scale configuration:
#> Type   : symmetric 
#> Option : B 
#> 
#> Xie-Beni values:
#> k = 2 : 0.067732 
#> k = 3 : 0.044298 
#> k = 4 : 4.477249e+14 
#> k = 5 : 4.077275e+15 
#> k = 6 : 3.137093e+15

Cluster Assignment

clusters <- cluster_assignment(result)

table(clusters)
#> clusters
#>   1   2   3 
#> 100 100 100

Cluster Quality

Prototype Interpretation

prototype_results(result, format = "table")
#> $Cluster_1
#>           l     c     r
#> Var1  3.007 4.007 5.007
#> Var2  3.061 4.061 5.060
#> Var3  2.970 3.970 4.969
#> Var4  3.008 4.008 5.007
#> Var5  3.062 4.061 5.061
#> Var6  3.006 4.006 5.006
#> Var7  2.972 3.972 4.971
#> Var8  3.028 4.027 5.027
#> Var9  2.993 3.993 4.992
#> Var10 3.006 4.006 5.005
#> Var11 3.005 4.005 5.005
#> Var12 2.971 3.970 4.970
#> 
#> $Cluster_2
#>           l     c     r
#> Var1  1.081 2.022 3.022
#> Var2  1.133 2.038 3.038
#> Var3  1.140 2.023 3.023
#> Var4  1.081 1.952 2.952
#> Var5  1.102 1.976 2.976
#> Var6  1.113 1.997 2.997
#> Var7  1.110 2.041 3.041
#> Var8  1.102 1.933 2.933
#> Var9  1.093 2.034 3.034
#> Var10 1.071 1.995 2.995
#> Var11 1.113 2.046 3.045
#> Var12 1.152 2.044 3.044
#> 
#> $Cluster_3
#>           l     c     r
#> Var1  4.969 5.969 6.851
#> Var2  5.060 6.060 6.930
#> Var3  5.060 6.060 6.912
#> Var4  5.030 6.030 6.909
#> Var5  4.957 5.957 6.918
#> Var6  4.945 5.945 6.859
#> Var7  5.018 6.018 6.881
#> Var8  5.029 6.029 6.930
#> Var9  4.989 5.989 6.881
#> Var10 4.989 5.989 6.891
#> Var11 4.994 5.994 6.898
#> Var12 4.985 5.985 6.888
plot_prototypes(result, view = "global")

Xie-Beni Index Visualization

plot_xb(result)

Conclusion

This vignette demonstrated the basic workflow for fuzzy clustering of ordinal data using the fcmTFN function from the fcmfd package.

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.