loss_function: Built-in loss functions

loss_functionR Documentation

Built-in loss functions

Description

These are built-in loss functions.

Usage

RSAVS_L2(x, param)

RSAVS_L1(x, param)

RSAVS_Huber(x, param, derivative = FALSE)

Arguments

x

input numeric vector

param

parameters needed for the function, takes the form of numeric vector. Unused for L1 and L2.

derivative

logical, whether the return is the loss value or the derivative.

Value

Loss(or derivative) value at x.

Examples

RSAVS_L2(1 : 10)
RSAVS_L1(1 : 10)
RSAVS_Huber(seq(from = -3, to = 3, by = 0.1), param = 1.345)
RSAVS_Huber(seq(from = -3, to = 3, by = 0.1), param = 1.345, derivative = TRUE)

fenguoerbian/RSAVS documentation built on Oct. 25, 2024, 3:16 p.m.