insertExamples: insertExamples

Description Usage Arguments Note Examples

View source: R/gng.R

Description

Insert examples with optional labels.

Usage

1
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.

Note

It copies your examples twice in RAM. You might want to use object$.insertExamples.

Examples

1
2
3
4
5
X <- gng.preset.sphere(100)
gng <- GNG(X, train.online=TRUE)
# Add more examples
X = gng.preset.sphere(100)
insertExamples(gng, X)

gmum.r documentation built on May 29, 2017, 3:52 p.m.