class_graph | R Documentation |
A graph in which members of the same class have edges.
class_graph(labels, sparse = TRUE)
labels |
A vector of class labels. |
sparse |
A logical value, indicating whether to use sparse matrices in the computation. Default is TRUE. |
A class_graph object, which is a list containing the following components:
adjacencyA matrix representing the adjacency of the graph.
paramsA list of parameters used in the construction of the graph.
labelsA vector of class labels.
class_indicesA list of vectors, each containing the indices of elements belonging to a specific class.
class_freqA table of frequencies for each class.
levelsA vector of unique class labels.
classesA character string indicating the type of graph ("class_graph").
data(iris)
labels <- iris[,5]
cg <- class_graph(labels)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.