KS <- function (pred, obs) {
require("ROCR")
p <- prediction(as.numeric(pred), obs)
perf <- ROCR::performance(p, "tpr", "fpr")
ks <- max(attr(perf, "y.values")[[1]] - (attr(perf, "x.values")[[1]]))
return(ks)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.