#' calculates mean squared error from predictions vs actual for continuous data
#'
#' \code{mse(predictions, actual)}
#'
#' @param predictions vector of predicted values
#' @param actual vector of actual values
#'
#' @details means squared error is simply the sum of squared differences
#' between predictions and actual values divided by the number of values.
mse = function(predictions, actual){
sum((predictions - actual)^2)/length(actual)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.