batch_gradient_descent: Batch gradient descent

Description Usage Arguments Value Author(s)

View source: R/gradient_function.R

Description

Batch gradient descent computes the gradient using the whole dataset

Usage

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

Arguments

df

dataset

var_X

names of the X columns

var_y

names of the Y columns

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.