Description Usage Arguments Examples
Construct GNG object. Can be used to train offline, or online.
1 2 3 4 5 |
x |
Passed data (matrix of data.frame) for offline training |
labels |
Every example can be associated with labels that are added to nodes later. By default empty |
beta |
Decrease the error variables of all node nodes by this fraction (forgetting rate). Default 0.99 |
alpha |
Decrease the error variables of the nodes neighboring to the newly inserted node by this fraction. Default 0.5 |
max.nodes |
Maximum number of nodes (after reaching this size it will continue running, but won't add new nodes) |
eps.n |
How strongly adapt neighbour node. Default |
eps.w |
How strongly adapt winning node. Default |
max.edge.age |
Maximum edge age. Decrease to increase speed of change of graph topology. Default |
train.online |
default FALSE. If used will run in online fashion |
max.iter |
Uf training offline will stop if exceedes max.iter iterations. Default |
dim |
Used for training online, specifies training example size |
min.improvement |
Used for offline (default) training.
Controls stopping criterion, decrease if training stops too early. Default |
lambda |
Every lambda iteration is added new vertex. Default 200 |
verbosity |
How verbose should the process be, as integer from [0,6], default: |
seed |
Seed for internal randomization |
k |
Utility constant, by default turned off. Good value is 1.3. Constant controlling speed of erasing obsolete nodes, see http://sund.de/netze/applets/gng/full/tex/DemoGNG/node20.html |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ## Not run:
X <- gng.preset.sphere(100)
y <- round(runif(100))
# Train in an offline manner
gng <- GNG(X, labels=y, max.nodes=20)
# Plot
plot(gng)
# Train in an online manner with utility (erasing obsolete nodes)
gng <- GNG(max.nodes=20, train.online=TRUE, k=1.3, dim=3)
insertExamples(gng, X, labels=y)
run(gng)
Sys.sleep(10)
terminate(gng)
# Plot
plot(gng)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.