$ uname -r
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Multi-Class Summary Function based on Hand and Till (2001) | |
#Based on caret:::twoClassSummary | |
require(compiler) | |
multiClassSummaryAUC <- cmpfun(function (data, lev = NULL, model = NULL){ | |
#Load Libraries | |
require(Metrics) | |
require(caret) | |
#print(data) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#' See: https://stats.stackexchange.com/a/58786/103349 | |
dtw.dist.naomit <- function(query, ref, ...) { | |
queryTrimmed <- na.omit(query) | |
refTrimmed <- na.omit(ref) | |
dif <- length(queryTrimmed) - length(refTrimmed) | |
if (dif > 0) { | |
# refTrimmed is too short and has to be extended in order to avoid | |
# (out of warping window) errors during dtw |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#' Functions plots multiple 'roc' objects into one plot | |
#' @param rocs | |
#' A list of 'roc' objects. Every list item has a name. | |
#' @param breaks | |
#' A vector of integers representing ticks on the x- and y-axis | |
#' @param legentTitel | |
#' A string which is used as legend titel | |
ggrocs <- function(rocs, breaks = seq(0,1,0.1), legendTitel = "Legend") { | |
if (length(rocs) == 0) { | |
stop("No ROC objects available in param rocs.") |