DSC_EMM {rEMM} | R Documentation |
DSC Interface for EMM and tNN (package stream)
Description
Provides Data Stream Clusterer (DSC) interfaces for EMM and tNN so they can be used in the stream framework.
Usage
DSC_EMM(formula = NULL, threshold = 0.2, measure = "euclidean", distFun = NULL,
centroids = identical(tolower(measure), "euclidean"),
lambda = 0)
DSC_tNN(formula = NULL, threshold = 0.2, measure = "euclidean",
centroids = identical(tolower(measure), "euclidean"), lambda = 0)
get_EMM(dsc)
set_EMM(dsc, x)
Arguments
formula |
|
threshold |
A |
measure |
A |
distFun |
Specify a function passed on as method to |
centroids |
A |
lambda |
A |
dsc |
an object of class |
x |
an object of class |
Details
DSC_tNN and DSC_EMM wrap the clustering algorithms so they can be used with the stream framework.
See DSC
for details.
get_EMM()
and set_EMM()
can be used to access the EMM object inside the DSC_EMM object.
Value
An object of class "DSC_EMM"
or "DSC_tNN"
.
Examples
library(stream)
### tNN clustering example
stream <- DSD_Gaussians()
stream
cl <- DSC_tNN(threshold = .1)
cl
update(cl, stream, 100)
cl
get_centers(cl)
get_weights(cl)
plot(cl, stream)
## EMM clustering example
data("EMMsim")
plot(EMMsim_train, pch = NA)
lines(EMMsim_train, col = "gray")
points(EMMsim_train, pch = EMMsim_sequence_train)
stream <- DSD_Memory(EMMsim_train)
stream
cl <- DSC_EMM(threshold = 0.1, measure = "euclidean", lambda = .1)
update(cl, stream, n = 200)
cl
reset_stream(stream)
plot(cl, stream, n = 200, method = "pca")
# inspect and recluster the EMM in the DSC_EMM object
emm <- get_EMM(cl)
plot(emm)
emm <- recluster_hclust(emm, k = 4, method = "average")
plot(emm)
set_EMM(cl, emm)
reset_stream(stream)
plot(cl, stream, n = 200, method = "pca")