e_optics {stops} | R Documentation |
A rudimentary I/O interface to OPTICS in ELKI reroots intput from R to elki via the command line, runs elki.optics on an Input file (configs.txt), sets up a temporary directory opticsout, reads in the contents of the elki output file clusterobjectorder.txt and deletes I/O files and directories. Returns the contents or clusterobjectorder.txt as a data frame. needs ELKI > 0.6.0 - Only tested with the ubuntu trusty binaries very rudimentary as of yet. API of ELKI is not fixed (will be with release 1.0.0). Is no longer used for the rest as it has been refactored to use dbscan::optics. That's why its now called e_optics.
e_optics(x, minpts = 2, epsilon, path = getwd(), keep = FALSE)
x |
numeric matrix or data frame |
minpts |
the minpts argument to elki. Defaults to 2. |
epsilon |
The epsilon parameter for OPTICS. Defaults to 2 times the range of x. |
path |
the path for storing the temporary files I/O files. Defaults to the current working directory. |
keep |
should the optics results form elki be stored in path. If TRUE, it will make a directory ./opticsout and a file config.txt |
a list with the contents of the elki output file as a data frame as element
$clusterobjectorder, which is the clusterobjectorder file from ELKI. The first column is the OPTICS ordering (so the ID of the points in successive order), followed by the data in x, the next column lists the reachability followed by the predecessor of each point x[i,] in the ordering in the last column
$eps
$minpts
data(iris) res<-e_optics(iris[,1:4],minpts=2,epsilon=100) print(res) summary(res) plot(res,withlabels=TRUE)