data("Lsun3D")
Data=Lsun3D$Data
InputDistances=as.matrix(dist(Data))
# \donttest{
projection=Pswarm(InputDistances)
# }
## Example One
# \donttest{
genUmatrixList=GeneratePswarmVisualization(Data,
projection$ProjectedPoints,projection$LC)
Cls=DBSclustering(k=3, Data, genUmatrixList$Bestmatches,
genUmatrixList$LC,PlotIt=TRUE)
# }
## Example Two
#automatic Clustering without GeneralizedUmatrix visualization
Cls=DBSclustering(k=3, Data, projection$ProjectedPoints,projection$LC,
PlotIt=TRUE)
if (FALSE) {
## Example Three
## Sometimes an automatic Clustering can be improved
## through an interactive approach,
## e.g. if Outliers exist (see [Thrun/Ultsch, 2017])
library(ProjectionBasedClustering)
Cls2=ProjectionBasedClustering::interactiveClustering(genUmatrixList$Umatrix,
genUmatrixList$Bestmatches, Cls)
}
# \dontshow{
data2=matrix(runif(n = 50),10,5)
distance=as.matrix(dist(data2))
res2=Pswarm(distance, LC = c(10,12))
Cls=DBSclustering(k=2, data2, res2$ProjectedPoints, res2$LC,
PlotIt=FALSE)
# }
Run the code above in your browser using DataLab