Learn R Programming

gmum.r (version 0.2.1)

insertExamples: insertExamples

Description

Insert examples with optional labels.

Usage

insertExamples(object, examples, labels = c())

Arguments

object
GNG object
examples
matrix or data.frame with rows as examples. Note: if training online make sure number of columns matches dim parameter passed to GNG constructor.
labels
vector of labels, that will be associated with nodes in the graph. GNG will assign to each node a mean of labels of closest examples.

Examples

Run this code
X <- gng.preset.sphere(100)
gng <- GNG(X, train.online=TRUE)
# Add more examples
X = gng.preset.sphere(100)
insertExamples(gng, X)

Run the code above in your browser using DataLab