OptimStride {vegsoup} | R Documentation |
Compute a series of clusterings (strides) by different methods and quantify their quality using a Fisher test.
OptimStride(x, k, ft.threshold = 1e-3, alternative = "greater", method = c("ward", "flexible", "pam", "kmeans", "wards", "fanny", "FCM", "KM", "optpart"), fast = FALSE, ...) ## S4 method for signature 'VegsoupOptimstride' method(x, ...) ## S4 method for signature 'VegsoupOptimstride' stride(x, method, ...) ## S4 method for signature 'VegsoupOptimstride' threshold(x, ...) ## S4 method for signature 'VegsoupOptimstride' optimclass1(x, ...) ## S4 method for signature 'VegsoupOptimstride' optimclass2(x, threshold = 2, ...) ## S4 method for signature 'VegsoupOptimstride' getK(x) ## S4 method for signature 'VegsoupOptimstride' peaks(x, ...) ## S4 method for signature 'VegsoupOptimstride' which.max(x)
x |
for |
k |
maximum number of cluster to compute ( |
ft.threshold |
threshold value of Fisher test, defaults to |
alternative |
alternative indicates the alternative hypothesis of the Fisher exact test
and must be one of "two.sided", "greater" or "less" (see
|
threshold |
threshold value for OptimClass2. See ‘Details’ |
method |
any method supported by |
fast |
accelerate computations using package |
... |
additional arguments passed to |
The implementation follows the method of Tichy et al. (2010) and uses a Fisher test
(FisherTest
) to identify the number of ‘faithful’ species. This sensitivity
of this statistic can be controlled by setting a threshold value. Per default this value
(argument ft.threshold
) is set to it's lowest meaningful bound 1e-3
.
Partitioning/clustering methods, type of distance matrix and standardization are taken from the
input object. Generic methods for 'VegsoupOptimstride'
are detailed in the
‘Methods’ section.
Optimstride |
|
method |
character. The computed methods. |
stride |
list. A list with length equal to |
optimclass1, optimclass2 |
matrix with dimnames. Rows are methods and columns are the respective values of |
peaks, |
signature(obj = "VegsoupOptimstride")
:
retrieves the names of the computed method(s). These are the method arguments as accepted
by VegsoupPartition
.
signature(obj = "VegsoupOptimstride")
:
returns the number of faithful species for each partition and number of k.
signature(obj = "VegsoupOptimstride")
:
retrieves the threshold values set for the Fisher test.
signature(obj = "VegsoupOptimstride")
:
returns a matrix with the counts of faithful species, those achieving
ft.trshold
.
signature(obj = "VegsoupOptimstride")
:
the computed maximum value of k
, the length of each stride.
signature(obj = "VegsoupOptimstride")
:
the peaks along the stride.
signature(obj = "VegsoupOptimstride")
:
returns the number of k that coincides with the highest number of faithful species,
per method.
Roland Kaiser
Tichy, L., Chytry, M., Hajek, M., Talbot, S.S., and Botta-Dukat, Z. (2010). Optimclass: Using species-to-cluster fidelity to determine the optimal partition in classification of ecological communities. Journal of Vegetation Science, 21(2):287-299.
require(vegsoup) # a dummy example using simulated data x <- coenoflex(50, 100) x <- OptimStride(x, k = 10, method = c("ward", "flexible", "pam")) summary(x) # get the computed clustering methods method(x) # the threshold of the Fisher test threshold(x) # matrix of results for OptimClass1 optimclass1(x) boxplot(t(optimclass1(x))) # the number of faithful species for each partition and method # warning, method dispatch will break if package optpart is loaded stride(x) stride(x, method = "flexible") # for method flexible # plot method for class VegsoupOptimstride plot(x) plot(x, method = "flexible") # get k where the curve peaks peaks(x) # get k with the maximum number of faithful species which.max(x)