Performance evaluation metrics for autoencoders
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, ...)
A trained learner object
Test data for evaluation
Additional parameters passed to keras::\link[keras]{evaluate}
.
A named list with the autoencoder training loss and evaluation metric for the given data
\link{evaluation_metric}
x <- as.matrix(sample(iris[, 1:4]))
x_train <- x[1:100, ]
x_test <- x[101:150, ]
# \donttest{
if (keras::is_keras_available()) {
autoencoder(2) |>
train(x_train) |>
evaluate_mean_squared_error(x_test)
}
#> $loss
#> [1] 20.27851
#>
#> $mean_absolute_percentage_error
#> [1] 124.0918
#>
# }