to_keras.ruta_loss_named: Obtain a Keras loss

View source: R/loss.R

to_keras.ruta_loss_contractionR Documentation

Obtain a Keras loss

Description

Builds the Keras loss function corresponding to a name

Usage

## S3 method for class 'ruta_loss_contraction'
to_keras(x, learner, ...)

## S3 method for class 'ruta_loss_correntropy'
to_keras(x, ...)

## S3 method for class 'ruta_loss_variational'
to_keras(x, learner, ...)

## S3 method for class 'ruta_loss_named'
to_keras(x, ...)

Arguments

x

A "ruta_loss_named" object

learner

The learner object including the keras model which will use the loss function

...

Rest of parameters, ignored

Value

A function which returns the corresponding loss for given true and predicted values

References


ruta documentation built on Jan. 9, 2023, 1:20 a.m.