Builds the Keras loss function corresponding to a name

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

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

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

# S3 method for 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