gradGeneric <- function(Y, Y_hat, weight=NULL){ if(is.null(weight)){ Y_hat - Y } else{ weight * (Y_hat - Y) } }
Add the following code to your website.
REMOVE THIS Copy to clipboard
For more information on customizing the embed code, read Embedding Snippets.