Skip to contents

This class is used to create loss functions.

Public fields

id

`character(1)`
Unique identifier of the loss function.

fun

`function(y_true, y_pred, ...)`
Loss function.

label

`character(1)`
Label of the loss function.

properties

`character()`
Additional properties of the loss function.

Methods


Method new()

Creates a new instance of this [R6][R6::R6Class] class.

Usage

LossFunction$new(id, label, properties, fun)

Arguments

id

(`character(1)`)
Unique identifier of the loss function.

label

(`character(1)`)
Label of the loss function.

properties

(`character()`)
Additional properties of the loss function.

fun

(`function(y_true, y_pred, ...)`)
Loss function.


Method clone()

The objects of this class are cloneable with this method.

Usage

LossFunction$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.