backprop_policy: 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
backprop_policy(
  policy_nn,
  critic_nn,
  newdata,
  n_epoch = 1,
  step_size = 0.1,
  batch_size = ceiling(nrow(newdata)/10),
  trace = FALSE
)

Arguments

policy_nn

policy neural network.

critic_nn

critic neural network.

newdata

data.frame of the inputs from policy and the outputs wanted from critic.

n_epoch

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

step_size

numeric : multiplier of the gradient.

batch_size

integer : size of batch of backpropagation.

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.