hopfield: Learn & Feed

Description Usage Arguments See Also Examples

Description

Learn and feed a hopfield brain.

Usage

1
2
3
4
5
6
7
8
9

Arguments

brain

An object of class brain as returned by brain.

data

A data.frame of training or test data.

...

Bare column names.

scale

Set to TRUE to scale the data with balance.

print

Whether to print results in the console.

See Also

get_training

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
train_data <- dplyr::tibble(
  a = c(0, 1),
  b = c(1, 1),
  c = c(0, 1),
  d = c(1, 1)
)

test_data <- dplyr::tibble(
  a = c(0, 0),
  b = c(1, 1),
  c = c(0, 1),
  d = c(1, 1)
)

brain() %>%
  hopfield(10) %>%
  learn_data(train_data) %>%
  learn_pattern(a, b, c, d) %>%
  learn() %>%
  feed_data(test_data) %>%
  feed(a, b, c, d)

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