# CLASSIFICATION LOSSES
# BINARY CROSS ENTROPY #######################################################
binary_cross_entropy <- function(yHat, y){
if(y == 1)
return(-log(yHat))
else
return(-log(1 - yHat))
}
# CATEGORICAL CROSS ENTROPY ##################################################
# categorical_cross_entropy <- function(yHat, y){
# return(0)
# }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.