binarize.kMeans | R Documentation |
Binarizes a vector of real-valued data using the k-means clustering algorithm. The data is first split into 2 clusters.The values belonging to the cluster with the smaller centroid are set to 0, and the values belonging to the greater centroid are set to 1.
binarize.kMeans(vect,
nstart=1,
iter.max=10,
dip.test=TRUE,
na.rm=FALSE)
vect |
A real-valued vector to be binarized (at least 3 measurements). |
nstart |
The number of restarts for k-means. See |
iter.max |
The maximum number of iterations for k-means. See |
dip.test |
If set to |
na.rm |
If set to |
Returns an object of class BinarizationResult
.
kmeans
,
BinarizationResult
,
BoolNet::binarizeTimeSeries()
result <- binarize.kMeans(iris[,"Petal.Length"])
print(result)
plot(result, twoDimensional=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.