After I run the SamSPECTRAL algorithm, at the beginning of the resulting vector containing the assigned cluster-number for each datapoint, SamSPECTRAL seems to count up to the number of clusters one time. Let me explain by using this example.
The first 40 cluster-numbers for SamSPECTRAL:
[1] 8 8 8 8 8 8 8 8 8 9 10 11 12 13 14 15 16 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8
The first 40 cluster-numbers for a different algorithm (flowPeaks):
[1] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
As you can see, SamSPECTRAL starts to count from 8 to 16 (the number of clusters is 16). This behaviour is consistent and reproducible on all my datasets. It is also present, when there is more than just one cluster number at the beginning, albeit not as clearly.
The first 40 cluster-numbers for SamSPECTRAL:
[1] 5 5 5 7 7 5 7 7 7 7 8 7 9 10 7 7 5 5 7 7 5 7 7 7 7 5 7 7 5 5 7 7 7 7 7 7 7 7 5 7
The first 40 cluster-numbers for a different algorithm (flowPeaks):
[1] 2 2 2 1 1 2 1 2 1 1 1 1 1 2 1 1 2 2 1 1 2 1 1 1 1 2 1 1 2 2 1 1 1 1 1 1 1 1 2 1
The command I use to run SamSPECTRAL is
SamSPECTRAL(data.points=as.matrix(File),dimensions=c(1,2), normal.sigma = 250, separation.factor = 0.88, m=410)
sessionInfo()
R version 3.2.0 (2015-04-16)
Platform: x86_64-unknown-linux-gnu (64-bit)
Running under: Ubuntu 14.04.2 LTS
locale:
[1] LC_CTYPE=en_CA.UTF-8 LC_NUMERIC=C LC_TIME=en_CA.UTF-8 LC_COLLATE=en_CA.UTF-8 LC_MONETARY=en_CA.UTF-8
[6] LC_MESSAGES=en_CA.UTF-8 LC_PAPER=en_CA.UTF-8 LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_CA.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] plotrix_3.5-12 flowDensity_1.2.0 flowCore_1.34.3 car_2.0-25 sp_1.1-0 GEOmap_2.3-5 RFOC_3.3-3
[8] gplots_2.17.0 flowPeaks_1.10.0 SamSPECTRAL_1.22.0
loaded via a namespace (and not attached):
[1] pcaPP_1.9-60 Rcpp_0.11.6 DEoptimR_1.0-2 nloptr_1.0.4 RSEIS_3.4-5 bitops_1.0-6 tools_3.2.0
[8] lme4_1.1-7 nlme_3.1-120 lattice_0.20-31 mgcv_1.8-6 RPMG_2.1-7 Matrix_1.2-1 graph_1.46.0
[15] parallel_3.2.0 SparseM_1.6 mvtnorm_1.0-2 spam_1.0-1 cluster_2.0.1 gtools_3.5.0 fields_8.2-1
[22] caTools_1.17.1 maps_2.3-9 stats4_3.2.0 grid_3.2.0 nnet_7.3-9 robustbase_0.92-3 Biobase_2.28.0
[29] rrcov_1.3-8 gdata_2.16.1 minqa_1.2.4 corpcor_1.6.7 splancs_2.01-37 MASS_7.3-40 splines_3.2.0
[36] BiocGenerics_0.14.0 pbkrtest_0.4-2 Rwave_2.4 quantreg_5.11 KernSmooth_2.23-14