Cycle Objects For Visualizing Topological Data Analysis ResultsThe Cycle object represents a cycle found by performing
topological data analysis (using the TDA package) on a data
matrix or distance matrix.
Cycle(rips, dimen, J, color)
getCycle(rips, dimension = 1, target = NULL)
cycleSupport(cycle, view)
# S4 method for Cycle,matrix
plot(x, y, lwd = 2, ...)
# S4 method for Cycle
lines(x, view, ...)The Cycle function constructs and returns an object of the
Cycle class
The plot and lines methods return (invisibly) the Cycle
object that was their first argument.
The getCycle function extracts a single raw cycle from a Rips
diagram and returns it. The cycleSupport function combines such
a cycle with a layout/view matrix to extract a list of the coordinates
of the points contained in the cycle.
A Rips diagram from the TDA package.
An integer; the dimension of the cycle.
An integer; the index locating the cycle in the
cycleLocation portion of the Rips diagram. If NULL,
then looks for the most persistent cycle.
A character vector of length one; the color in which to display the cycle.
A Cycle object.
A (layout) matrix with coordinates showing where to plot each point supporting the cycle.
A (layout) matrix with coordinates showing where to plot each point supporting the cycle.
A number; the graphical line width parameter lwd.
The usual set of additional graphical parameters.
An integer; the dimension of the cycle.
An integer indexing the desired cycle. Note that the index
should be relative to other cuycles of the same dimension. If
NULL, gets the longest persisting cycle.
A raw cycle, meaning a simple element of the
cycleLocation part of a Rips diagram.
index:A matrix, containing the indices into the data matrix or distance matrix defining the simplices that realize the cycle.
dimension:A matrix; the dimension of the cycle.
color:A character vector; the color in which to display the cycle.
Produce a plot of a Cycle object.
Add a depiction of a cycle to an existing plot.
Kevin R. Coombes <krc@silicovore.com>
TDA, ripsDiag
data(CLL)
cyc1 <- Cycle(ripdiag, 1, 236, "forestgreen")
V <- cmdscale(daisydist)
plot(cyc1, V)
plot(V, pch = 16, col = "gray")
lines(cyc1, V)
Run the code above in your browser using DataLab