e_optics {cordillera} | R Documentation |
A rudimentary I/O interface to OPTICS in 'ELKI' reroutes input from R to elki via the command line, runs elki.optics on an Input file (config.txt), sets up a temporary directory opticsout in path, 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. No plans for using this in the future.
e_optics(x, minpts = 2, epsilon, path = tempdir(), keep = FALSE)
x |
numeric matrix or data frame |
minpts |
the minpts argument to |
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 tempdir(). |
keep |
should the optics results from |
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)