# NOT RUN {
##Cluster the data with methods for regular sets
##Sample a regular dataset
set.seed(2804)
ds <- sampleFuncy(obsNr=50, k=4, timeNr=8, reg=TRUE)
##Cluster the functions with all available methods.
res <- funcit(data=Data(ds), clusters=Cluster(ds),
methods=c(1,2,3), seed=2404,
k=4)
summary(res)
Cluster(res)
##Additional method specific parameters for method fitfclust
res <- funcit(data=Data(ds), clusters=Cluster(ds), methods="fitfclust", seed=2405,
k=4, p=5, pert=0)
##Cluster the data with methods for irregular sets
##Sample an irregular dataset
set.seed(2804)
ds <- sampleFuncy(obsNr=50, k=4, timeNrMin=4, timeNrMax=8,
reg=FALSE)
data <- Data(ds)
clusters <- Cluster(ds)
res <- funcit(data=data, clusters=clusters,
methods=c("fitfclust","distclust", "iterSubspace"), seed=2406,
k=4, parallel=TRUE)
summary(res)
Cluster(res)
plot(res)
##Two reallife examples
# }
# NOT RUN {
data("genes")
data <- genes$data
clusters <- genes$clusters
##Cluster the functions with all available methods.
res <- funcit(data=data, clusters=clusters,
methods=c(1:7)[-4], seed=2404,
k=4)
summary(res)
Cluster(res)
# }
# NOT RUN {
# }
# NOT RUN {
data("electricity")
res <- funcit(data=electricity, methods=c("fitfclust","distclust",
"waveclust"), seed=2406, k=5, parallel=TRUE)
plot(res, legendPlace="topleft")
# }
Run the code above in your browser using DataLab