activate: Activate

Description Usage Arguments Note Examples

Description

Activate the brain.

Usage

1
2
3
4
5
6

Arguments

brain

An object of class brain as returned by brain.

...

Bare column name of input.

scale

Set to TRUE to scale the data with balance.

name

Name of element to activate net is the network/brain, you can also activate individual neuron.

data

A data.frame.

rate

Learning rate, if specified the brain propagates the error.

print

Whether to print the predictions.

Note

If rate is specified the network propagates the error, otherwise the error is not propagated.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
train <- dplyr::tibble(
  x = rep(c(0, 0, 1, 1), 100),
  y = rep(c(0, 1, 0, 1), 100)
)

targets <- dplyr::tibble(
  z = rep(c(0, 1, 1, 0), 100)
)

brain() %>%
  perceptron(c(2,3,1)) %>%
  train_output(x, y, data = train) %>%
  activate_data(targets) %>%
  activate(z, rate = .003)

brain-r/brain documentation built on May 21, 2019, 4:05 a.m.