bmrm (version 4.1)

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 is used by loss/risk function to return the gradient of the function at a given point together with the function value