backprop: Backpropagate data on a neural network

Description Usage Arguments Value

View source: R/backprop.R

Description

Backpropagate data on a neural network

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
backprop(
  nn,
  newdata,
  n_epoch = 100,
  step_size = 0.1,
  lr = 1,
  batch_size = ceiling(nrow(newdata)/10),
  algo = "backprop",
  trace = FALSE
)

Arguments

nn

neural network

newdata

data.frame of the inputs and the outputs

n_epoch

integer : number of iterations of backpropagation going through every data once.

step_size

numeric : multiplier of the gradient.

lr

numeric : learning rate. new_param = old_param x (1-lr) + lrxbackproped_param

batch_size

integer : size of batch of backpropagation.

algo

character : convergence algorithm either "backprop" or "rprop+".

trace

logical : printing last ran epoch?

Value

list of neural network (class : nn) and the mean Loss


wiper8/AI documentation built on Dec. 23, 2021, 5:15 p.m.