R/RcppExports.R

Defines functions binary_cross_entropy mean_squared_error

Documented in binary_cross_entropy mean_squared_error

# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

#' Mean squared error
#'
#' Computes the mean squared error of two vectors
#'
#' @param ypred vector of predictions
#' @param ytrue vector of true labels
#' @export
mean_squared_error <- function(ypred, ytrue) {
    .Call(`_glasp_mean_squared_error`, ypred, ytrue)
}

#' Binary cross-entropy loss
#'
#' Computes the binary cross-entropy loss (log-loss) of two vectors
#'
#' @param ypred vector of predicted probabilities
#' @param ytrue vector of true labels {0, 1}
#' @export
binary_cross_entropy <- function(ypred, ytrue) {
    .Call(`_glasp_binary_cross_entropy`, ypred, ytrue)
}
jlaria/glasp documentation built on Dec. 5, 2022, 6:42 a.m.