Learn R Programming

ruta (version 1.2.0)

evaluate_mean_squared_error: Evaluation metrics

Description

Performance evaluation metrics for autoencoders

Usage

evaluate_mean_squared_error(learner, data, ...)

evaluate_mean_absolute_error(learner, data, ...)

evaluate_binary_crossentropy(learner, data, ...)

evaluate_binary_accuracy(learner, data, ...)

evaluate_kullback_leibler_divergence(learner, data, ...)

Value

A named list with the autoencoder training loss and evaluation metric for the given data

Arguments

learner

A trained learner object

data

Test data for evaluation

...

Additional parameters passed to keras::\link[keras]{evaluate}.

See Also

\link{evaluation_metric}

Examples

Run this code
x <- as.matrix(sample(iris[, 1:4]))
x_train <- x[1:100, ]
x_test <- x[101:150, ]

# \donttest{
if (interactive() && keras::is_keras_available()) {
  autoencoder(2) |>
    train(x_train) |>
    evaluate_mean_squared_error(x_test)
}
# }

Run the code above in your browser using DataLab