
Last chance! 50% off unlimited learning
Sale ends in
# NOT RUN {
library(penaltyLearning)
library(data.table)
data(neuroblastomaProcessed, envir=environment())
pid.vec <- c("1", "4")
chr <- 2
incorrect.labels <-
neuroblastomaProcessed$errors[profile.id%in%pid.vec & chromosome==chr]
pid.chr <- paste0(pid.vec, ".", chr)
target.mat <- neuroblastomaProcessed$target.mat[pid.chr, , drop=FALSE]
pred.dt <- data.table(profile.id=pid.vec, pred.log.lambda=1.5)
roc.list <- list(
labels=ROChange(incorrect.labels, pred.dt, "profile.id"),
targets=targetIntervalROC(target.mat, pred.dt$pred.log.lambda))
err <- data.table(incorrect=names(roc.list))[, {
roc.list[[incorrect]]$roc
}, by=incorrect]
library(ggplot2)
ggplot()+
ggtitle("incorrect targets is an approximation of incorrect labels")+
scale_size_manual(values=c(labels=2, targets=1))+
geom_segment(aes(
min.thresh, errors,
color=incorrect,
size=incorrect,
xend=max.thresh, yend=errors),
data=err)
# }
Run the code above in your browser using DataLab