gradient_mini_batch: Mini_batch gradient descent

Description Usage Arguments Value Author(s)

View source: R/gradient_function.R

Description

Mini_batch gradient descent computes the gradient using a batch size of the dataset

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
gradient_mini_batch(
  df,
  var_X,
  var_y,
  nb_batch,
  learning_rate,
  max_iter,
  graph,
  epsilon
)

Arguments

df

dataset

var_X

names of the X columns

var_y

names of the Y columns

nb_batch

batch size

learning_rate

the learning rate

max_iter

number of iterations

graph

TRUE if you want to plot the cost list while the gradient descent is running.

epsilon

Tolerance's threshold of the cost list convergence.

Value

list of theta and the cost list

Author(s)

Frintz Elisa, NDiaye Deffa, Rives Alexandre


AlexandreRives/RegLog-EDA documentation built on Dec. 17, 2021, 7:50 a.m.