Learn R Programming

bmrm (version 3.0)

gradient: Return or set gradient attribute

Description

Return or set gradient attribute

Usage

gradient(x, ...)

# S3 method for default gradient(x, ...)

gradient(x, ...) <- value

# S3 method for default gradient(x, ...) <- value

Arguments

x
any R object
...
additional paramters
value
new gradient value to set

Value

attr(x,"gradient")

Details

gradient attribute isused by loss/risk function to return the gradient of the function at a given point together with the function value